1/* 2 * Copyright 2000-2008 Ingo Weinhold <ingo_weinhold@gmx.de> All rights reserved. 3 * Distributed under the terms of the MIT license. 4 */ 5 6/*! Derived classes are video consumer targets. Each time the consumer 7 has received a frame (that is not late and thus dropped) it calls 8 SetBitmap(). This method should immediately do whatever has to be done. 9 Until the next call to SetBitmap() the bitmap can be used -- thereafter 10 it is not allowed to use it any longer. Therefore the bitmap variable 11 is protected by a lock. Anytime it is going to be accessed, the object 12 must be locked. 13*/ 14#ifndef VIDEO_TARGET_H 15#define VIDEO_TARGET_H 16 17 18#include <Locker.h> 19 20 21class BBitmap; 22 23 24class VideoTarget { 25 public: 26 VideoTarget(); 27 virtual ~VideoTarget(); 28 29 bool LockBitmap(); 30 void UnlockBitmap(); 31 32 virtual void SetBitmap(const BBitmap* bitmap); 33 const BBitmap* GetBitmap() const; 34 35 protected: 36 BLocker fBitmapLock; 37 const BBitmap* volatile fBitmap; 38}; 39 40#endif // VIDEO_TARGET_H 41