diff options
Diffstat (limited to 'dxr3audiodecoder.h')
-rw-r--r-- | dxr3audiodecoder.h | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/dxr3audiodecoder.h b/dxr3audiodecoder.h index 7d575d3..33bde7b 100644 --- a/dxr3audiodecoder.h +++ b/dxr3audiodecoder.h @@ -33,31 +33,47 @@ // ================================== // decode audio to mp2 or use DD :) -class cDxr3AudioDecoder +class cDxr3AudioDecoder { public: cDxr3AudioDecoder(); ~cDxr3AudioDecoder(); - void Init(void); // init in const? + void Init(void); // init in const? - 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); + 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(void) const { return rate; } - int GetChannelCount(void) const { return channels; } - int GetFrameSize(void) const { return frameSize; } - void Reset(void) { ac3dtsDecoder.Clear(); rbuf.Clear(); } - private: bool HeadCheck(unsigned long head); - - struct Dxr3Codec Codec; + + struct Dxr3Codec Codec; cRingBufferFrame rbuf; cMultichannelAudio ac3dtsDecoder; - + bool audioSynched; bool decoderOpened; uint8_t lastHeader[4]; |