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 #include "VideoTarget.h" 6 7 8 VideoTarget::VideoTarget() 9 : fBitmapLock(), 10 fBitmap(NULL) 11 { 12 } 13 14 15 VideoTarget::~VideoTarget() 16 { 17 } 18 19 20 bool 21 VideoTarget::LockBitmap() 22 { 23 return fBitmapLock.Lock(); 24 } 25 26 27 void 28 VideoTarget::UnlockBitmap() 29 { 30 fBitmapLock.Unlock(); 31 } 32 33 34 void 35 VideoTarget::SetBitmap(const BBitmap* bitmap) 36 { 37 LockBitmap(); 38 fBitmap = bitmap; 39 UnlockBitmap(); 40 } 41 42 43 const BBitmap* 44 VideoTarget::GetBitmap() const 45 { 46 return fBitmap; 47 } 48 49