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