//---------------------------------------------------------------------------- // Laser Guard Ltd. // Copyright © 2000-2002. All Rights Reserved. // Version 1.0 01/01/2000 // Last modification: 08/10/2003 // PROJECT: // SUBSYSTEM: // FILE: LgHWVideoCapture.cpp // AUTHOR: Sergey Chizhevskiy // OVERVIEW // ~~~~~~~~ // Source file of LgHWVideoInput.cpp //---------------------------------------------------------------------------- #include "stdafx.h" #include "LgHWVideoCamera.h" #include "LgHWVideoEngine.h" #include "LgHWVideoCapture.h" #include "LgHWVideoPin.h" #include "LgHWVideoSwitch.h" #include "LgHWVideoJob.h" CLgHWVideoCapture::CLgHWVideoCapture() { } CLgHWVideoCapture::~CLgHWVideoCapture() { Destroy(); } BOOL CLgHWVideoCapture::Create() { // create video device with one video input return CLgHWVideoSwitch::Create( 1, 0 ); } void CLgHWVideoCapture::Destroy() { // nessesary to call for prevent pure functions call CLgHWVideoSwitch::Destroy(); } void CLgHWVideoCapture::OnHWVideoInputSample( CLgImageDIB* pDIB, INT nSampleID ) { // lock connection CLgLocker Locker( &CaptureToCameraLinkSP::GetLock() ); CLgHWVideoCamera *pCamera = *this; if( !pCamera ) return; // pass sample to connected camera pCamera->OnHWVideoCameraSample( pDIB, nSampleID ); }