//---------------------------------------------------------------------------- // Laser Guard Ltd. // Copyright © 2000-2002. All Rights Reserved. // Version 1.0 01/01/2000 // Last modification: 08/10/2003 // PROJECT: // SUBSYSTEM: // FILE: DirectShowVideo.cpp // AUTHOR: Sergey Chizhevskiy // OVERVIEW // ~~~~~~~~ // Source file of DirectShowVideo.cpp //---------------------------------------------------------------------------- #include "stdafx.h" #include "..\Version.h" #include "DirectShowStreamVideo.h" #include "DirectShowVideo.h" CDirectShowVideo::CDirectShowVideo() { // by default show video m_bShowVideo = TRUE; m_nVideoInput = 0; m_nVideoStandard = AnalogVideo_None; LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CDirectShowVideo::CDirectShowVideo" ); } CDirectShowVideo::~CDirectShowVideo() { // importent to unlink itself from video stream CLgLinkSP::Unlink(); LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CDirectShowVideo::~CDirectShowVideo" ); } void CDirectShowVideo::UpdateVideo( LPBITMAPINFOHEADER pBitmapInfoHeader, PBYTE pBytes, double SampleTime ) { LGLOG( LOG_LEVEL_REALTIME, LOG_TYPE_INFO, this, _T("CDirectShowVideo::UpdateVideo"), _T("Started...") ); // update image m_DirectShowDIB.Create( pBitmapInfoHeader, pBytes ); // notify about new sample OnVideoSample( SampleTime ); LGLOG( LOG_LEVEL_REALTIME, LOG_TYPE_INFO, this, _T("CDirectShowVideo::UpdateVideo"), _T("Done") ); } BOOL CDirectShowVideo::Unlink( CLgLink *pLink ) { // if( !m_DirectShowDIB.Erase() ) // LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CDirectShowVideo::Unlink"), _T("CDirectShowDIB::Clear failed") ); // else // OnVideoSample( 0.0 ); return CLgLinkSP::Unlink( pLink ); }