13#ifndef __CODEC_AUDIO_H
14#define __CODEC_AUDIO_H
19#include <libavcodec/avcodec.h>
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
AVCodecID GetCodecId() const
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
CodecFrameSizes
Codec frame sizes for spdif.
int DecodePassthrough(const AVPacket *, AVFrame *)
Passthrough audio data.
int UpdateFormat(void)
Handle audio format changes.
void FlushBuffers(void)
Flush the audio decoder buffers.
IEC61937Type
IEC Data type.
IEC61937Preamble
IEC Preambles.
void Decode(const AVPacket *)
Decode an audio packet.
void SetPassthroughMask(int)
Set audio pass-through mask.
PassthroughMask
Bits used for the passthrough mask.
void Open(AVCodecID, AVCodecParameters *=nullptr, AVRational={ .num=1,.den=90000 })
Open and initiate the audio decoder.
void Close(void)
Close the audio decoder.
@ 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.