xref: /haiku/src/apps/mediaplayer/supplier/VideoTrackSupplier.h (revision b671e9bbdbd10268a042b4f4cc4317ccd03d105e)
1 /*
2  * Copyright 2007, Haiku. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  */
8 #ifndef VIDEO_TRACK_SUPPLIER_H
9 #define VIDEO_TRACK_SUPPLIER_H
10 
11 
12 #include <MediaDefs.h>
13 #include <MediaFormats.h>
14 
15 class VideoTrackSupplier {
16  public:
17 								VideoTrackSupplier();
18 	virtual						~VideoTrackSupplier();
19 
20 	virtual	const media_format&	Format() const = 0;
21 	virtual	status_t			GetEncodedFormat(media_format* format)
22 									const = 0;
23 	virtual	status_t			GetCodecInfo(media_codec_info* info) const = 0;
24 	virtual	status_t			ReadFrame(void* buffer,
25 									bigtime_t* performanceTime,
26 									const media_format* format,
27 									bool& wasCached) = 0;
28 	virtual	status_t			SeekToTime(bigtime_t* performanceTime) = 0;
29 	virtual	status_t			SeekToFrame(int64* frame) = 0;
30 
31 	virtual	bigtime_t			Position() const = 0;
32 	virtual	bigtime_t			Duration() const = 0;
33 	virtual	int64				CurrentFrame() const = 0;
34 
35 	virtual	int32				TrackIndex() const = 0;
36 };
37 
38 #endif // VIDEO_TRACK_SUPPLIER_H
39