xref: /haiku/src/apps/mediaplayer/supplier/ProxyVideoSupplier.h (revision f27269a67d27a89bc60ff865fa57f8cf30a08bd1)
1 /*
2  * Copyright 2008 Stephan Aßmus <superstippi@gmx.de>
3  * All rights reserved. Distributed under the terms of the MIT licensce.
4  */
5 #ifndef PROXY_VIDEO_SUPPLIER_H
6 #define PROXY_VIDEO_SUPPLIER_H
7 
8 #include <Locker.h>
9 
10 #include "VideoSupplier.h"
11 
12 
13 class VideoTrackSupplier;
14 
15 
16 class ProxyVideoSupplier : public VideoSupplier {
17 public:
18 								ProxyVideoSupplier();
19 	virtual						~ProxyVideoSupplier();
20 
21 	virtual	const media_format&	Format() const;
22 	virtual	status_t			FillBuffer(int64 startFrame, void* buffer,
23 									const media_raw_video_format& format,
24 									bool forceGeneration, bool& wasCached);
25 
26 	virtual	void				DeleteCaches();
27 
28 			void				SetSupplier(VideoTrackSupplier* supplier);
29 
30 private:
31 			BLocker				fSupplierLock;
32 
33 			VideoTrackSupplier*	fSupplier;
34 };
35 
36 #endif	// PROXY_VIDEO_SUPPLIER_H
37