38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
#ifndef F7A4D851_0C9D_4A3E_8B52_39B6E1F2C7D1
|
|
#define F7A4D851_0C9D_4A3E_8B52_39B6E1F2C7D1
|
|
/*
|
|
*******************************************************************************
|
|
* INCLUDE
|
|
*******************************************************************************
|
|
*/
|
|
#include "../core/AudioDecoder.h"
|
|
#include <opus/opus.h>
|
|
|
|
namespace Video
|
|
{
|
|
namespace LibOPUS
|
|
{
|
|
/*
|
|
*******************************************************************************
|
|
* CLASS DECLARE
|
|
*******************************************************************************
|
|
*/
|
|
class AudioDecodeHandler: public Core::AudioDecodeHandler
|
|
{
|
|
public:
|
|
AudioDecodeHandler(Core::CodecID codecID, Core::AudioComponent::Ptr pPrevious);
|
|
~AudioDecodeHandler();
|
|
|
|
protected:
|
|
void write(Core::Packet::Ptr pPacket) override;
|
|
void conceal(Core::Packet::Ptr pPacket) override;
|
|
Core::Frame::Ptr read() override;
|
|
|
|
private:
|
|
OpusDecoder* _pDecoder;
|
|
Core::FrameQueue _queue;
|
|
int16_t _pcm[5760 * 2];
|
|
};
|
|
}
|
|
}
|
|
#endif
|