1 #include "ReaderPlugin.h" 2 #include "au.h" 3 4 class auReader : public Reader 5 { 6 public: 7 auReader(); 8 ~auReader(); 9 10 const char *Copyright(); 11 12 status_t Sniff(int32 *streamCount); 13 14 void GetFileFormatInfo(media_file_format *mff); 15 16 status_t AllocateCookie(int32 streamNumber, void **cookie); 17 status_t FreeCookie(void *cookie); 18 19 status_t GetStreamInfo(void *cookie, int64 *frameCount, bigtime_t *duration, 20 media_format *format, void **infoBuffer, int32 *infoSize); 21 22 status_t Seek(void *cookie, 23 uint32 seekTo, 24 int64 *frame, bigtime_t *time); 25 26 status_t GetNextChunk(void *cookie, 27 void **chunkBuffer, int32 *chunkSize, 28 media_header *mediaHeader); 29 30 BPositionIO *Source() { return fSource; } 31 32 private: 33 BPositionIO * fSource; 34 35 media_format fFormat; 36 int64 fDataStart; 37 int64 fDataSize; 38 39 int64 fFrameCount; 40 bigtime_t fDuration; 41 42 bool fRaw; 43 44 int64 fPosition; 45 46 int fChannelCount; 47 int32 fFrameRate; 48 int fBitsPerSample; 49 int fBitsPerFrame; 50 int fBlockAlign; 51 uint32 fFormatCode; 52 53 void * fBuffer; 54 int32 fBufferSize; 55 }; 56 57 58 class auReaderPlugin : public ReaderPlugin 59 { 60 public: 61 Reader *NewReader(); 62 }; 63 64 MediaPlugin *instantiate_plugin(); 65