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