vdr-plugin-softhddevice-drm-gles 1.6.7
Audio Module

Audio Interface. More...

Classes

class  cAlsaDevice
 Alsa Interface. More...
 
class  cSoftHdAudio
 Audio Interface. More...
 
class  cAudioProcessor
 Audio Manipulation. More...
 
class  cPidController
 PID Controller. More...
 
class  cSoftHdRingbuffer
 Ringbuffer (FIFO) Implementation. More...
 

Functions

static void AlsaNoopCallback (__attribute__((unused)) const char *file, __attribute__((unused)) int line, __attribute__((unused)) const char *function, __attribute__((unused)) int err, __attribute__((unused)) const char *fmt,...)
 Empty log callback.
 
static const charalsaToFFmpegChannel (const char *alsaName)
 FFmpeg does not have channels called "RL" or "RR" So "rename" Alsas RL (rear left) and RR (rear right) to FFmpegs BL (back left) and BR (back right) to make the channelmap filter parser happy.
 
static std::vector< std::string > GetFFmpegChannelLayoutAsArray (const AVChannelLayout &layout)
 Put FFmpeg channel layout in a dynamic array of strings.
 
static bool LayoutsMatch (const std::vector< std::string > &ff, const std::vector< std::string > &alsa)
 Check, if FFmpeg and Alsa channel layout match.
 
static bool LayoutIsValid (const std::vector< std::string > &channelLayout)
 Check, if the channel layout has channels named "NA" (N/A, silent)
 
std::vector< std::string > cAlsaDevice::GetChannelLayoutAsArray (void)
 Put ALSA channel layout in a dynamic array of strings.
 
std::string cSoftHdAudio::BuildChannelMapFilter (const AVChannelLayout &)
 Build the "|"-separated mappings list for the channelmap filter.
 

Detailed Description

Audio Interface.

Handles the audio stream

Function Documentation

◆ AlsaNoopCallback()

static void AlsaNoopCallback ( __attribute__((unused)) const char file,
__attribute__((unused)) int  line,
__attribute__((unused)) const char function,
__attribute__((unused)) int  err,
__attribute__((unused)) const char fmt,
  ... 
)
static

Empty log callback.

Definition at line 30 of file alsadevice.cpp.

Referenced by cAlsaDevice::Init().

◆ alsaToFFmpegChannel()

static const char * alsaToFFmpegChannel ( const char alsaName)
static

FFmpeg does not have channels called "RL" or "RR" So "rename" Alsas RL (rear left) and RR (rear right) to FFmpegs BL (back left) and BR (back right) to make the channelmap filter parser happy.

Definition at line 595 of file alsadevice.cpp.

Referenced by cAlsaDevice::GetChannelLayoutAsArray().

◆ BuildChannelMapFilter()

std::string cSoftHdAudio::BuildChannelMapFilter ( const AVChannelLayout layout)
private

Build the "|"-separated mappings list for the channelmap filter.

Parameters
layoutcurrent FFmpeg channel layout
Returns
mapping string to feed into the channelmap filter

Definition at line 142 of file audio.cpp.

References cAlsaDevice::GetChannelLayoutAsArray(), GetFFmpegChannelLayoutAsArray(), L_SOUND, LayoutIsValid(), LayoutsMatch(), LOGDEBUG2, LOGWARNING, and cSoftHdAudio::m_alsa.

Referenced by cSoftHdAudio::InitFilter().

◆ GetChannelLayoutAsArray()

std::vector< std::string > cAlsaDevice::GetChannelLayoutAsArray ( void  )

Put ALSA channel layout in a dynamic array of strings.

Parameters
pcmHandlecurrent Alsa PCM handle
Returns
ALSA channel layout as an array of strings

Definition at line 612 of file alsadevice.cpp.

References alsaToFFmpegChannel(), and cAlsaDevice::m_pPCMHandle.

Referenced by cSoftHdAudio::BuildChannelMapFilter(), and cAlsaDevice::Setup().

◆ GetFFmpegChannelLayoutAsArray()

static std::vector< std::string > GetFFmpegChannelLayoutAsArray ( const AVChannelLayout layout)
static

Put FFmpeg channel layout in a dynamic array of strings.

Parameters
layoutcurrent FFmpeg channel layout
Returns
ffmpeg layout as an array of strings

Definition at line 81 of file audio.cpp.

Referenced by cSoftHdAudio::BuildChannelMapFilter().

◆ LayoutIsValid()

static bool LayoutIsValid ( const std::vector< std::string > &  channelLayout)
static

Check, if the channel layout has channels named "NA" (N/A, silent)

Parameters
channelLayoutchannel layout
Returns
true if the channel layout doesn't contain "NA" (N/A, silent)

Definition at line 128 of file audio.cpp.

Referenced by cSoftHdAudio::BuildChannelMapFilter().

◆ LayoutsMatch()

static bool LayoutsMatch ( const std::vector< std::string > &  ff,
const std::vector< std::string > &  alsa 
)
static

Check, if FFmpeg and Alsa channel layout match.

Parameters
ffArray of FFmpeg channel layout
alsaArray of Alsa channel layout
Returns
true if the channel layouts match

Definition at line 106 of file audio.cpp.

Referenced by cSoftHdAudio::BuildChannelMapFilter().