summaryrefslogtreecommitdiff
path: root/dxr3audiodecoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'dxr3audiodecoder.h')
-rw-r--r--dxr3audiodecoder.h44
1 files changed, 24 insertions, 20 deletions
diff --git a/dxr3audiodecoder.h b/dxr3audiodecoder.h
index 8cc3c31..5be42d2 100644
--- a/dxr3audiodecoder.h
+++ b/dxr3audiodecoder.h
@@ -32,43 +32,47 @@
#include "dxr3log.h"
// ==================================
-// decode audio to mp2 or use DD :)
-
+//! Decode given audiostream in usable audioformat
+/*!
+ Here we can decode lpcm, ac3 and pcm to useable
+ bitstream for ffmpeg. ffmpeg will convert
+ the datastream into mp2.
+*/
class cDxr3AudioDecoder
{
public:
cDxr3AudioDecoder();
~cDxr3AudioDecoder();
- void Init(void); // init in const?
+ void Init();
void Decode(const uint8_t* buf, int length, uint32_t pts, cDxr3SyncBuffer &aBuf);
void DecodeLpcm(const uint8_t* buf, int length, uint32_t pts, cDxr3SyncBuffer &aBuf);
void DecodeAc3Dts(const uint8_t* pPes, const uint8_t* buf, int length, uint32_t pts, cDxr3SyncBuffer &aBuf);
- int GetRate(void) const { return rate; }
- int GetChannelCount(void) const { return channels; }
- int GetFrameSize(void) const { return frameSize; }
- void Reset(void) { ac3dtsDecoder.Clear(); rbuf.Clear(); }
+ int GetRate() const { return m_Rate; }
+ int GetChannelCount() const { return m_Channels; }
+ int GetFrameSize() const { return m_FrameSize; }
+ void Reset() { m_AC3dtsDecoder.Clear(); m_RBuf.Clear(); }
private:
bool HeadCheck(unsigned long head);
- struct Dxr3Codec Codec;
+ struct Dxr3Codec m_Codec;
- cRingBufferFrame rbuf;
- cMultichannelAudio ac3dtsDecoder;
+ cRingBufferFrame m_RBuf;
+ cMultichannelAudio m_AC3dtsDecoder;
- bool audioSynched;
- bool decoderOpened;
- uint8_t lastHeader[4];
- int rate;
- int channels;
- uint32_t frameSize;
- uint8_t pcmbuf[AVCODEC_MAX_AUDIO_FRAME_SIZE];
- int volume;
- bool foundHeader;
- bool decodeAudio;
+ bool m_AudioSynched;
+ bool m_DecoderOpened;
+ uint8_t m_LastHeader[4];
+ int m_Rate;
+ int m_Channels;
+ uint32_t m_FrameSize;
+ uint8_t m_PcmBuf[AVCODEC_MAX_AUDIO_FRAME_SIZE];
+ int m_Volume;
+ bool m_FoundHeader;
+ bool m_DecodeAudio;
cDxr3AudioDecoder(cDxr3AudioDecoder&); // no copy constructor
};