3rdparty/licenseReport: Add seperate LGPL checks
[haiku.git] / src / add-ons / media / plugins / ape_reader / APEReader.h
blob8ca5333cbc3190111cdf6da332e1ed774b325689
1 #ifndef ___APEReader_H_
2 #define ___APEReader_H_
5 #include "MACLib.h"
6 #include "MonkeysAudioMIMEType.h"
7 #include "PositionBridgeIO.h"
9 #include "ReaderPlugin.h" // Haiku private header
12 const int32 BLOCK_COUNT = 1024*4; // number of blocks, get from MACLib at once
13 const int32 BUFFER_SIZE = 1024*4; // size of audio data passing to Media Kit
14 const int32 MEDIA_FILE_FORMAT_VERSION = 100; // media_file_format::version
17 class TAPEReader : public Reader
19 public:
20 TAPEReader();
21 virtual ~TAPEReader();
23 virtual const char* Copyright();
25 virtual status_t Sniff(int32* oStreamCount);
27 virtual void GetFileFormatInfo(media_file_format* oMFF);
29 virtual status_t AllocateCookie(int32 oStreamNumber, void** oCookie);
30 virtual status_t FreeCookie(void* oCookie);
32 virtual status_t GetStreamInfo(void* oCookie, int64* oFrameCount,
33 bigtime_t* oDuration, media_format* oFormat,
34 const void** oInfoBuffer, size_t* oInfoSize);
36 virtual status_t Seek(void *cookie, uint32 flags,
37 int64 *frame, bigtime_t *time);
39 virtual status_t FindKeyFrame(void* cookie, uint32 flags,
40 int64* frame, bigtime_t* time);
42 virtual status_t GetNextChunk(void* oCookie, const void** oChunkBuffer,
43 size_t* oChunkSize, media_header* oMediaHeader);
45 private:
46 typedef Reader SUPER;
48 bigtime_t CurrentTime() const;
49 status_t LoadAPECheck() const;
50 status_t ReadBlocks();
51 void Unset();
53 char* mDecodedData; // data after decoding
54 int64 mDataSize;
55 int64 mPlayPos;
56 int64 mReadPos;
57 int64 mReadPosTotal;
58 status_t mLoadAPECheck;
59 BPositionIO* mSrcPIO;
60 IAPEDecompress* mDecomp;
61 TPositionBridgeIO mPositionBridgeIO;
65 class TAPEReaderPlugin : public ReaderPlugin
67 public:
68 TAPEReaderPlugin();
69 virtual ~TAPEReaderPlugin();
71 virtual Reader* NewReader();
75 MediaPlugin* instantiate_plugin();
78 #endif // ___APEReader_H_