vdr-plugin-softhddevice-drm-gles 1.6.2
cAudioDecoder Class Reference

Audio Decoder. More...

#include <codec_audio.h>

Public Member Functions

 cAudioDecoder (cSoftHdAudio *)
 Create a new audio decoder for the given audio context.
 
 ~cAudioDecoder (void)
 
void Open (AVCodecID, AVCodecParameters *=nullptr, AVRational={ .num=1,.den=90000 })
 Open and initiate the audio decoder.
 
void Close (void)
 Close the audio decoder.
 
void Decode (const AVPacket *)
 Decode an audio packet.
 
void FlushBuffers (void)
 Flush the audio decoder buffers.
 
void SetPassthroughMask (int)
 Set audio pass-through mask.
 
AVCodecID GetCodecId () const
 

Private Member Functions

int DecodePassthrough (const AVPacket *, AVFrame *)
 Passthrough audio data.
 
int UpdateFormat (void)
 Handle audio format changes.
 
void ResetSpdif (void)
 

Private Attributes

cSoftHdAudiom_pAudio
 audio module
 
AVCodecContextm_pAudioCtx = nullptr
 ffmpeg audio codec context
 
AVCodecID m_codecId = AV_CODEC_ID_NONE
 current codec id
 
AVFramem_pFrame
 decoded ffmpeg audio frame
 
int64_t m_lastPts = AV_NOPTS_VALUE
 last seen PTS
 
int m_passthroughMask
 passthrough mask to be set
 
int m_currentPassthrough
 current passthrough mask
 
int m_currentSampleRate
 current sample rate
 
int m_currentNumChannels
 current number of channels
 
int m_currentHwSampleRate
 current hw sample rate
 
int m_currentHwNumChannels
 current number of hw channels
 
uint16_t m_spdifOutput [(MAX_FRAME_SIZE *4+16)/2]
 SPDIF output buffer.
 
int m_spdifIndex
 index into SPDIF output buffer
 
int m_spdifRepeatCount
 SPDIF repeat counter.
 

Detailed Description

Audio Decoder.

Definition at line 81 of file codec_audio.h.

Member Function Documentation

◆ GetCodecId()

AVCodecID cAudioDecoder::GetCodecId ( ) const
inline

Definition at line 90 of file codec_audio.h.

References m_codecId.

Referenced by cSoftHdDevice::PlayAudio().

Member Data Documentation

◆ m_codecId

AVCodecID cAudioDecoder::m_codecId = AV_CODEC_ID_NONE
private

current codec id

Definition at line 95 of file codec_audio.h.

Referenced by Close(), FlushBuffers(), GetCodecId(), and Open().

◆ m_currentHwNumChannels

int cAudioDecoder::m_currentHwNumChannels
private

current number of hw channels

Definition at line 103 of file codec_audio.h.

Referenced by Decode(), Open(), and UpdateFormat().

◆ m_currentHwSampleRate

int cAudioDecoder::m_currentHwSampleRate
private

current hw sample rate

Definition at line 102 of file codec_audio.h.

Referenced by Decode(), DecodePassthrough(), Open(), and UpdateFormat().

◆ m_currentNumChannels

int cAudioDecoder::m_currentNumChannels
private

current number of channels

Definition at line 101 of file codec_audio.h.

Referenced by Decode(), Open(), and UpdateFormat().

◆ m_currentPassthrough

int cAudioDecoder::m_currentPassthrough
private

current passthrough mask

Definition at line 99 of file codec_audio.h.

Referenced by Decode(), Open(), and UpdateFormat().

◆ m_currentSampleRate

int cAudioDecoder::m_currentSampleRate
private

current sample rate

Definition at line 100 of file codec_audio.h.

Referenced by Decode(), Open(), and UpdateFormat().

◆ m_lastPts

int64_t cAudioDecoder::m_lastPts = AV_NOPTS_VALUE
private

last seen PTS

Definition at line 97 of file codec_audio.h.

Referenced by Close(), Decode(), and FlushBuffers().

◆ m_passthroughMask

int cAudioDecoder::m_passthroughMask
private

passthrough mask to be set

Definition at line 98 of file codec_audio.h.

Referenced by cAudioDecoder(), Decode(), DecodePassthrough(), Open(), SetPassthroughMask(), and UpdateFormat().

◆ m_pAudio

cSoftHdAudio* cAudioDecoder::m_pAudio
private

audio module

Definition at line 93 of file codec_audio.h.

Referenced by Decode(), DecodePassthrough(), and UpdateFormat().

◆ m_pAudioCtx

AVCodecContext* cAudioDecoder::m_pAudioCtx = nullptr
private

ffmpeg audio codec context

Definition at line 94 of file codec_audio.h.

Referenced by Close(), Decode(), DecodePassthrough(), FlushBuffers(), Open(), and UpdateFormat().

◆ m_pFrame

AVFrame* cAudioDecoder::m_pFrame
private

decoded ffmpeg audio frame

Definition at line 96 of file codec_audio.h.

Referenced by cAudioDecoder(), Decode(), and ~cAudioDecoder().

◆ m_spdifIndex

int cAudioDecoder::m_spdifIndex
private

index into SPDIF output buffer

Definition at line 105 of file codec_audio.h.

Referenced by DecodePassthrough(), ResetSpdif(), and UpdateFormat().

◆ m_spdifOutput

uint16_t cAudioDecoder::m_spdifOutput[(MAX_FRAME_SIZE *4+16)/2]
private

SPDIF output buffer.

Definition at line 104 of file codec_audio.h.

Referenced by DecodePassthrough().

◆ m_spdifRepeatCount

int cAudioDecoder::m_spdifRepeatCount
private

SPDIF repeat counter.

Definition at line 106 of file codec_audio.h.

Referenced by DecodePassthrough(), ResetSpdif(), and UpdateFormat().


The documentation for this class was generated from the following files: