How to implement a callback function
Rolf Kalbermatter
rolf.kalbermatter at citeng.com
Sun Apr 17 16:02:21 CDT 2005
Eric Pouech [pouech-eric at wanadoo.fr] wrote:
>luis lenders a écrit :
>> So how could i pass the data in lpVideoHdr to the application? Any
>> help appreciated as i'm still quite a beginner in this :)
>it seems that you open somehow a capture session.
>Within this session, you can set a user defined callback to be passed
every
>frame captured.
>On the WM_CAP_SET_CALLBACK_FRAME message, your session should store the
pointer
>to the function in the session data (you should have something for that
somewhere).
>Everytime you complete the capture of a frame in a given session, and
this
>callback has been defined, then you should call it (by passing the
current
>LPVIDEOHDR which is likely to be the structure to contain the data for
the
>captured frame).
I believe that the capture session is inherently tied to the capture
window
created with capCreateCaptureWindowA/W(). After all, the capture API
dates
back to Windows 3.x where it was common to do background processing by
delegating the action to a window message loop, since no other
multitasking
method was available. Maybe that 32bit Windows has another
implementation for
this, but I'm not sure.
Rolf Kalbermatter
More information about the wine-devel
mailing list