EasyManua.ls Logo

DIGITAL-LOGIC MICROSPACE PCC-P5 - How to Stop Video Capture

Default Icon
148 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
DIGITAL-LOGIC AG PCCP5 Manual V2.3
76
4.11.5 How to stop video capture
//-------------------------------------------------------------------------
// FreezeVideo() : Stops capturing the incoming video; whatever is in the
// frame buffer is being displayed.
//
// Enter:
// none
// Exit :
// Nothing
//-------------------------------------------------------------------------
void FreezeVideo()
{
int mr03;
DWORD start_time;
WritePortUchar(ulMrAddr, MR_VIN_CTRL_2);
mr03 = ReadPortUshort(ulMrAddr); // Read current value
if((mr03 & (VIC2_START_GRAB << 8)))
{ // video is running, h/w is grabbing video, wait for input VSync
mr03 &= ~(VIC2_START_GRAB << 8); // turn off the bit to freeze the video
//
// Sometimes if Video Input is not comming thru video port (ZV Port
// Disabled) then we will never get Video VSync (hanging problem). We must
// time out our wait for VSync. If we do not see VSync within 2 frames
// of input VSync (80 Miliseconds for 25Hz Video, worst case) we must get
// out of the waiting loop.
//
start_time = timeGetTime(); // 1 millisec precision
WritePortUchar(ulMrAddr, MR_VIN_CTRL_4);
while( !(ReadPortUshort(ulMrAddr) & (VIC4_VSYNC << 8)) &&
((timeGetTime() - start_time) < 200));
WritePortUshort(ulMrAddr, mr03); // freeze the video
start_time = timeGetTime(); // 1 millisec precision
WritePortUchar(ulMrAddr, MR_VIN_CTRL_4);
while((ReadPortUshort(ulMrAddr) & (VIC4_FRM_READY << 8)) &&
((timeGetTime() - start_time) < 200));

Table of Contents

Related product manuals