| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
#include <boca.h> |
| 14 |
#include "dllinterface.h" |
| 15 |
|
| 16 |
BoCA_BEGIN_COMPONENT(DecoderFDKAAC) |
| 17 |
|
| 18 |
namespace BoCA |
| 19 |
{ |
| 20 |
class DecoderFDKAAC : public CS::DecoderComponent |
| 21 |
{ |
| 22 |
private: |
| 23 |
MP4FileHandle mp4File; |
| 24 |
HANDLE_AACDECODER handle; |
| 25 |
|
| 26 |
MP4TrackId mp4Track; |
| 27 |
MP4SampleId sampleId; |
| 28 |
|
| 29 |
Bool finished; |
| 30 |
|
| 31 |
Bool adifFound; |
| 32 |
Bool adtsFound; |
| 33 |
Bool loasFound; |
| 34 |
|
| 35 |
Int frameSize; |
| 36 |
Int sbrRatio; |
| 37 |
|
| 38 |
Int delaySamples; |
| 39 |
Int delaySamplesLeft; |
| 40 |
|
| 41 |
Buffer<unsigned char> dataBuffer; |
| 42 |
Buffer<short> samplesBuffer; |
| 43 |
|
| 44 |
Bool ReadGaplessInfo(MP4FileHandle, Int &, Int &, Int64 &) const; |
| 45 |
|
| 46 |
Bool SkipID3v2Tag(IO::InStream &); |
| 47 |
Bool SyncOnAACHeader(IO::InStream &); |
| 48 |
|
| 49 |
static UnsignedInt32 GetDecoderVersion(); |
| 50 |
public: |
| 51 |
static const String &GetComponentSpecs(); |
| 52 |
|
| 53 |
DecoderFDKAAC(); |
| 54 |
~DecoderFDKAAC(); |
| 55 |
|
| 56 |
Bool CanOpenStream(const String &); |
| 57 |
Error GetStreamInfo(const String &, Track &); |
| 58 |
|
| 59 |
Bool Activate(); |
| 60 |
Bool Deactivate(); |
| 61 |
|
| 62 |
Bool Seek(Int64); |
| 63 |
|
| 64 |
Int ReadData(Buffer<UnsignedByte> &); |
| 65 |
}; |
| 66 |
}; |
| 67 |
|
| 68 |
BoCA_DEFINE_DECODER_COMPONENT(DecoderFDKAAC) |
| 69 |
|
| 70 |
BoCA_END_COMPONENT(DecoderFDKAAC) |