xref: /haiku/src/apps/mediaplayer/supplier/ProxyVideoSupplier.h (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
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	status_t			FillBuffer(int64 startFrame, void* buffer,
22 									const media_raw_video_format& format,
23 									bool forceGeneration, bool& wasCached);
24 
25 	virtual	void				DeleteCaches();
26 
27 			void				SetSupplier(VideoTrackSupplier* supplier);
28 
29 private:
30 			BLocker				fSupplierLock;
31 
32 			VideoTrackSupplier*	fSupplier;
33 };
34 
35 #endif	// PROXY_VIDEO_SUPPLIER_H
36