Debian Codegraph @

components/encoder/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 "worker.h"
15
16 BoCA_BEGIN_COMPONENT(EncoderFDKAAC)
17
18 namespace BoCA
19 {
20 class EncoderFDKAAC : public CS::EncoderComponent
21 {
22 private:
23 ConfigLayer *configLayer;
24 Config *config;
25
26 Array<SuperWorker *> workers;
27
28 MP4FileHandle mp4File;
29 MP4TrackId mp4Track;
30
31 Int nextWorker;
32
33 Int frameSize;
34 Int granuleSize;
35
36 Int blockSize;
37 Int overlap;
38
39 Int64 totalFrames;
40 Int64 totalSamples;
41 Int delaySamples;
42
43 Buffer<int16_t> samplesBuffer;
44
45 Int EncodeFrames(Bool);
46 Int ProcessPackets(const Buffer<unsigned char> &, const Array<Int> &, Bool);
47
48 static UnsignedInt32 GetEncoderVersion();
49
50 static Bool ConvertArguments(Config *);
51 public:
52 static const String &GetComponentSpecs();
53
54 EncoderFDKAAC();
55 ~EncoderFDKAAC();
56
57 Bool Activate();
58 Bool Deactivate();
59
60 Int WriteData(Buffer<UnsignedByte> &);
61
62 Bool SetOutputFormat(Int);
63 String GetOutputFileExtension() const;
64
65 ConfigLayer *GetConfigurationLayer();
66 };
67 };
68
69 BoCA_DEFINE_ENCODER_COMPONENT(EncoderFDKAAC)
70
71 BoCA_END_COMPONENT(EncoderFDKAAC)