
Frame Grabber SDK (Windows-C) Developer Guide
if (MV_FG_SUCCESS != nRet)
{
printf("Start Acquisition failed, %#x\n", nRet);
return nRet;
}
while(!g_bExit)
{
// Get the image buffer.
nRet = MV_FG_GetImageBuffer(hStream, &hBuffer, 1000);
if (MV_FG_SUCCESS == nRet)
{
nRet = MV_FG_GetBufferInfo(hBuffer, &stFrameInfo);
if (MV_FG_SUCCESS == nRet)
{
nFrameNum++;
printf("FrameNumber %8d: %-8I64d\tWidth: %d\tHeight: %d\n", nFrameNum,
stFrameInfo.nFrameID, stFrameInfo.nWidth, stFrameInfo.nHeight);
}
// Insert the image buffer back to the input queue.
nRet = MV_FG_QueueBuffer(hBuffer);
if (MV_FG_SUCCESS != nRet)
{
printf("Queue Buffer error, %#x\n", nRet);
break;
}
}
else
{
printf("Get image buffer failed, %#x\n", nRet);
}
}
// Stop acquisition.
nRet = MV_FG_StopAcquisition(hStream);
if (MV_FG_SUCCESS != nRet)
{
printf("Stop Acquisition failed, %#x\n", nRet);
return nRet;
}
}
return MV_FG_SUCCESS;
}
int main(int argc, char** argv)
{
int
nRet = MV_FG_SUCCESS;
IFHANDLE
hInterface = NULL;
131





















































































































































