Debian Codegraph @

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