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 <Reader.h> 10 #include <Locker.h> 11 #include <String.h> 12 13 14 class AVFormatReader : public BReader { 15 public: 16 AVFormatReader(); 17 ~AVFormatReader(); 18 19 virtual status_t Sniff(int32* streamCount); 20 21 virtual void GetFileFormatInfo(media_file_format* mff); 22 virtual status_t GetMetaData(BMetaData* data); 23 24 virtual status_t AllocateCookie(int32 streamNumber, 25 void** cookie); 26 virtual status_t FreeCookie(void* cookie); 27 28 virtual status_t GetStreamInfo(void* cookie, int64* frameCount, 29 bigtime_t* duration, media_format* format, 30 const void** infoBuffer, 31 size_t* infoSize); 32 33 virtual status_t GetStreamMetaData(void* cookie, 34 BMetaData* data); 35 36 virtual status_t Seek(void* cookie, uint32 flags, int64* frame, 37 bigtime_t* time); 38 virtual status_t FindKeyFrame(void* cookie, uint32 flags, 39 int64* frame, bigtime_t* time); 40 41 virtual status_t GetNextChunk(void* cookie, 42 const void** chunkBuffer, 43 size_t* chunkSize, 44 media_header* mediaHeader); 45 46 private: 47 class Stream; 48 49 BString fCopyright; 50 Stream** fStreams; 51 BLocker fSourceLock; 52 }; 53 54 55 #endif // AV_FORMAT_READER_H 56