Debian Codegraph @

include/engine/encoder.h

raw symbols SCIP
1 /* fre:ac - free audio converter
2 * Copyright (C) 2001-2023 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 #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