Creating a Frame Callback Function
The following example is a simple frame callback function. Register this callback by using the capSetCallbackOnFrame macro.
TCHAR gachBuffer[100]; // Global buffer.
DWORD gdwFrameNum = 0;
// FrameCallbackProc: frame callback function.
// hWnd: capture window handle.
// lpVHdr: pointer to structure containing captured
// frame information.
//
LRESULT PASCAL FrameCallbackProc(HWND hWnd, LPVIDEOHDR lpVHdr)
{
if (!hWnd)
return FALSE;
_stprintf_s(gachBuffer, TEXT("Preview frame# %ld "), gdwFrameNum++);
SetWindowText(hWnd, gachBuffer);
return (LRESULT) TRUE ;
}
Related topics
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for