| 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(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) |