Debian Codegraph @

components/encoder/voaacenc/voaacenc.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(EncoderVOAAC)
17
18 namespace BoCA
19 {
20 class EncoderVOAAC : public CS::EncoderComponent
21 {
22 private:
23 ConfigLayer *configLayer;
24 Config *config;
25
26 MP4FileHandle mp4File;
27 MP4TrackId mp4Track;
28
29 VO_HANDLE handle;
30
31 VO_AUDIO_CODECAPI api;
32
33 VO_MEM_OPERATOR memOperator;
34 VO_CODEC_INIT_USERDATA userData;
35
36 Int frameSize;
37
38 Int64 totalSamples;
39 Int delaySamples;
40
41 Buffer<unsigned char> outBuffer;
42 Buffer<int16_t> samplesBuffer;
43
44 Int EncodeFrames(Bool);
45
46 Int GetSampleRateIndex(Int) const;
47
48 static Bool ConvertArguments(Config *);
49 public:
50 static const String &GetComponentSpecs();
51
52 EncoderVOAAC();
53 ~EncoderVOAAC();
54
55 Bool Activate();
56 Bool Deactivate();
57
58 Int WriteData(Buffer<UnsignedByte> &);
59
60 Bool SetOutputFormat(Int);
61 String GetOutputFileExtension() const;
62
63 ConfigLayer *GetConfigurationLayer();
64 };
65 };
66
67 BoCA_DEFINE_ENCODER_COMPONENT(EncoderVOAAC)
68
69 BoCA_END_COMPONENT(EncoderVOAAC)