Debian Codegraph @

components/decoder/fdkaac/fdkaac.h

raw symbols SCIP
1 /* BoCA - BonkEnc Component Architecture
2 * Copyright (C) 2007-2022 Robert Kausch <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation, either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
10 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
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)