| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
#ifndef H_FREAC_ENCODER |
| 14 |
#define H_FREAC_ENCODER |
| 15 |
|
| 16 |
#include "component.h" |
| 17 |
|
| 18 |
namespace freac |
| 19 |
{ |
| 20 |
class EncoderThread; |
| 21 |
|
| 22 |
class Encoder : public Component |
| 23 |
{ |
| 24 |
protected: |
| 25 |
IO::OutStream *stream; |
| 26 |
BoCA::AS::EncoderComponent *encoder; |
| 27 |
|
| 28 |
EncoderThread *encoderThread; |
| 29 |
|
| 30 |
BoCA::Track album; |
| 31 |
Int chapter; |
| 32 |
Int64 offset; |
| 33 |
|
| 34 |
BoCA::Format sourceFormat; |
| 35 |
BoCA::Format targetFormat; |
| 36 |
|
| 37 |
Int64 encodedSamples; |
| 38 |
|
| 39 |
String md5Sum; |
| 40 |
public: |
| 41 |
Encoder(const BoCA::Config *); |
| 42 |
virtual ~Encoder(); |
| 43 |
|
| 44 |
Bool Create(const String &, const String &, const BoCA::Track &); |
| 45 |
Bool Destroy(); |
| 46 |
|
| 47 |
Int Write(Buffer<UnsignedByte> &); |
| 48 |
|
| 49 |
Void SignalChapterChange(); |
| 50 |
accessors: |
| 51 |
Bool IsLossless() const; |
| 52 |
String GetEncoderName() const; |
| 53 |
|
| 54 |
Int64 GetEncodedSamples() const { return encodedSamples; } |
| 55 |
|
| 56 |
const BoCA::Format &GetTargetFormat() const { return targetFormat; } |
| 57 |
|
| 58 |
Void SetCalculateMD5(Bool); |
| 59 |
String GetMD5Checksum(); |
| 60 |
}; |
| 61 |
}; |
| 62 |
|
| 63 |
#endif |