xref: /haiku/src/apps/mediaplayer/supplier/VideoTrackSupplier.h (revision 95c9effd68127df2dce202d5e254a7c86560010a)
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_raw_video_format& format,
27 									bool& wasCached) = 0;
28 	virtual	status_t			FindKeyFrameForFrame(int64* frame) = 0;
29 	virtual	status_t			SeekToTime(bigtime_t* performanceTime) = 0;
30 	virtual	status_t			SeekToFrame(int64* frame) = 0;
31 
32 	virtual	bigtime_t			Position() const = 0;
33 	virtual	bigtime_t			Duration() const = 0;
34 	virtual	int64				CurrentFrame() const = 0;
35 
36 	virtual	int32				TrackIndex() const = 0;
37 };
38 
39 #endif // VIDEO_TRACK_SUPPLIER_H
40