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