| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 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) |