1 /* 2 * Copyright 2009, Stephan Aßmus <superstippi@gmx.de> 3 * All rights reserved. Distributed under the terms of the GNU L-GPL license. 4 */ 5 #ifndef AV_FORMAT_READER_H 6 #define AV_FORMAT_READER_H 7 8 9 #include <Locker.h> 10 #include <String.h> 11 12 #include "ReaderPlugin.h" 13 14 15 class AVFormatReader : public Reader { 16 public: 17 AVFormatReader(); 18 ~AVFormatReader(); 19 20 virtual status_t Sniff(int32* streamCount); 21 22 virtual void GetFileFormatInfo(media_file_format* mff); 23 virtual status_t GetMetaData(BMetaData* data); 24 25 virtual status_t AllocateCookie(int32 streamNumber, 26 void** cookie); 27 virtual status_t FreeCookie(void* cookie); 28 29 virtual status_t GetStreamInfo(void* cookie, int64* frameCount, 30 bigtime_t* duration, media_format* format, 31 const void** infoBuffer, 32 size_t* infoSize); 33 34 virtual status_t GetStreamMetaData(void* cookie, 35 BMetaData* data); 36 37 virtual status_t Seek(void* cookie, uint32 flags, int64* frame, 38 bigtime_t* time); 39 virtual status_t FindKeyFrame(void* cookie, uint32 flags, 40 int64* frame, bigtime_t* time); 41 42 virtual status_t GetNextChunk(void* cookie, 43 const void** chunkBuffer, 44 size_t* chunkSize, 45 media_header* mediaHeader); 46 47 private: 48 class Stream; 49 50 BString fCopyright; 51 Stream** fStreams; 52 BLocker fSourceLock; 53 }; 54 55 56 #endif // AV_FORMAT_READER_H 57