21#include <libavcodec/avcodec.h>
183 if (
avpkt->size < 5) {
241 if (
avpkt->size < 6) {
247 ((
avpkt->data[5] >> 2) & 0x3f);
Audio and Alsa Interface Header File.
AVCodecContext * m_pAudioCtx
ffmpeg audio codec context
int m_currentHwSampleRate
current hw sample rate
int m_currentHwNumChannels
current number of hw channels
AVFrame * m_pFrame
decoded ffmpeg audio frame
int m_spdifIndex
index into SPDIF output buffer
int m_passthroughMask
passthrough mask to be set
AVCodecID m_codecId
current codec id
int m_currentPassthrough
current passthrough mask
int m_spdifRepeatCount
SPDIF repeat counter.
uint16_t m_spdifOutput[(MAX_FRAME_SIZE *4+16)/2]
SPDIF output buffer.
int64_t m_lastPts
last seen PTS
int m_currentSampleRate
current sample rate
cSoftHdAudio * m_pAudio
audio module
int m_currentNumChannels
current number of channels
void SetTimebase(AVRational *timebase)
Audio Decoder Header File.
void Filter(AVFrame *, AVCodecContext *)
Send audio frame to filter and enqueue it.
int Setup(AVCodecContext *, int, int, int)
Alsa setup wrapper.
void EnqueueSpdif(uint16_t *, int, AVFrame *)
Enqueue prepared spdif bursts in audio output queue.
int DecodePassthrough(const AVPacket *, AVFrame *)
Passthrough audio data.
int UpdateFormat(void)
Handle audio format changes.
void FlushBuffers(void)
Flush the audio decoder buffers.
void Decode(const AVPacket *)
Decode an audio packet.
cAudioDecoder(cSoftHdAudio *)
Create a new audio decoder for the given audio context.
void SetPassthroughMask(int)
Set audio pass-through mask.
void Open(AVCodecID, AVCodecParameters *=nullptr, AVRational={ .num=1,.den=90000 })
Open and initiate the audio decoder.
void Close(void)
Close the audio decoder.
@ IEC61937_DTS3
DTS type III (2048 samples)
@ IEC61937_DTS2
DTS type II (1024 samples)
@ IEC61937_EAC3
E-AC-3 data.
@ IEC61937_DTS1
DTS type I (512 samples)
@ CODEC_EAC3
E-AC-3 bit mask.
@ CODEC_AC3
AC-3 bit mask.
#define LOGDEBUG2
log to LOG_DEBUG and add a prefix
#define LOGERROR
log to LOG_ERR
#define LOGFATAL
log to LOG_ERR and abort