13#ifndef __CODEC_AUDIO_H
14#define __CODEC_AUDIO_H
20#include <libavcodec/avcodec.h>
int DecodePassthrough(const AVPacket *, AVFrame *)
Passthrough audio data.
int UpdateFormat(void)
Handle audio format changes.
AVCodecContext * m_pAudioCtx
ffmpeg audio codec context
int m_currentHwSampleRate
current hw sample rate
void FlushBuffers(void)
Flush the audio decoder buffers.
int m_currentHwNumChannels
current number of hw channels
void Decode(const AVPacket *)
Decode an audio packet.
AVFrame * m_pFrame
decoded ffmpeg audio frame
int m_spdifIndex
index into SPDIF output buffer
int m_currentPassthroughMask
current passthrough mask
int m_passthroughMask
passthrough mask to be set
AVCodecID m_codecId
current codec id
AVCodecID GetCodecId() const
void SetPassthroughMask(int)
Set audio pass-through mask.
int m_spdifRepeatCount
SPDIF repeat counter.
uint16_t m_spdifOutput[(MAX_FRAME_SIZE *4+16)/2]
SPDIF output buffer.
std::mutex m_mutex
decoder mutex
int64_t m_lastPts
last seen PTS
int m_currentSampleRate
current sample rate
void ResetSpdif(void)
Rest the internal SPDIF burst buffer.
cSoftHdAudio * m_pAudio
audio module
int m_currentNumChannels
current number of channels
void Open(AVCodecID, AVCodecParameters *=nullptr, AVRational={ .num=1,.den=90000 })
Open and initiate the audio decoder.
void Close(void)
Close the audio decoder.
CodecFrameSizes
Codec frame sizes for spdif.
IEC61937Type
IEC Data type.
IEC61937Preamble
IEC Preambles.
PassthroughMask
Bits used for the passthrough mask.
@ TRUEHD_FRAME_SIZE
(not used)
@ IEC61937_TRUEHD
TrueHD data (not used)
@ IEC61937_DTS3
DTS type III (2048 samples)
@ IEC61937_DTS2
DTS type II (1024 samples)
@ IEC61937_DTSHD
DTS HD data (not used)
@ 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.