Old fashion design for PC-104
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.
|
|
//----------------------------------------------------------------------------
// 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<CDirectShowVideo,CDirectShowStream>::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<CDirectShowStream,CDirectShowVideo> *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<CDirectShowVideo,CDirectShowStream>::Unlink( pLink );}
|