Debian Codegraph @

components/decoder/cdrip/cdrip.h

raw symbols SCIP
1 /* BoCA - BonkEnc Component Architecture
2 * Copyright (C) 2007-2021 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 #include "info/cdtext.h"
17 #include "info/cdplayerini.h"
18
19 BoCA_BEGIN_COMPONENT(DecoderCDRip)
20
21 namespace BoCA
22 {
23 class DecoderCDRip : public CS::DecoderComponent
24 {
25 constants:
26 static const UnsignedInt bytesPerSector = 2352;
27 static const UnsignedInt samplesPerSector = 588;
28 private:
29 static CDText cdText;
30 static UnsignedInt32 cdTextDiscID;
31
32 static CDPlayerIni cdPlayer;
33 static UnsignedInt32 cdPlayerDiscID;
34
35 static Array<UnsignedInt64> lastRead;
36
37 ConfigLayer *configLayer;
38
39 CDROMDRIVE *cd;
40
41 Int dataBufferSize;
42
43 Int readOffset;
44
45 Int skipSamples;
46 Int prependSamples;
47 Int appendSamples;
48
49 String GetDriveID() const;
50 UnsignedInt32 ComputeDiscID(const MCDI &) const;
51
52 Bool GetTrackSectors(Int &, Int &, Bool &) const;
53 public:
54 static const String &GetComponentSpecs();
55
56 DecoderCDRip();
57 ~DecoderCDRip();
58
59 Bool CanOpenStream(const String &);
60 Error GetStreamInfo(const String &, Track &);
61
62 Bool Activate();
63 Bool Deactivate();
64
65 Bool Seek(Int64);
66
67 Int ReadData(Buffer<UnsignedByte> &);
68
69 ConfigLayer *GetConfigurationLayer();
70 };
71 };
72
73 BoCA_DEFINE_DECODER_COMPONENT(DecoderCDRip)
74
75 BoCA_END_COMPONENT(DecoderCDRip)