You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.3 KiB
55 lines
1.3 KiB
//----------------------------------------------------------------------------
|
|
// 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 );
|
|
}
|