Hi,

I have port a 32bit, user-mode only VFW driver from bravodo sample to an
user-mode only Video Capture Driver.

I understand that VFW using two transfer mode - Frame (Single Capture) and
Stream.

For eg, Dorgem, use Frame (Single Capture), However, AMCAP and WME seem use
Stream (WDM based).

My only problem now remain is on STREAM transfer mode

Cause it quite long, in summarized, I used as follow :

on DVM_STREAM_PREPAREHEADER
- return DV_ERR_NOTSUPPORTED, so suppose client will supply the buffer

on DVM_STREAM_ADDBUFFER
- add into queue, return DV_ERR_OK

When the data ready, I use DriverCallback (with MM_DRVM_DATA).

But however, the data seem not pass-through client driver, the preview
and/or output screen show nothing, and the WME FPS (Frame per Seconds) show
zeros, but show encoding... and my debug show
DVM_STREADM_PREPAREHEADER, then DVM_STREAM_ADDBUFFER repeated for about 40
times, then my driver fill the buffer and callback, and this repeat.

FYI, I'm using separate thread procedure to supply the data into VHdr
(buffer queue), synchronized through semaphore (replace STI/CLI for H/W
board), and notify client with DriverCallback (MM_DRVM_DATA etc).

I understand that WME, AMCAP etc use somekind of VFW wrapper for WDM,
How do I verify that my Callback worked ? Any recommend for a sample WDM
client with source-code for me to easy debug (for,eg, the callback did
called correctly) ?

Thank in advance

wp

Re: VFW Streaming Transfer under WME by Maxim

Maxim
Wed Aug 18 13:58:18 CDT 2004

The sequence of events is:

- the upper layer send you several frames which you must keep on some list
and not complete. This is a preroll.
- then the upper layer will send you the "start" command, and you move to
"running" state.
- in "running" state, you start to consume the preroll frames from the
list, fill them with capture data, and complete by the callback.
- you will receive more empty frames from up, and must attach them to the
same list.

So, never complete any arrived frames until you enter the "running" state.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"Laksa" <doreamonsaynospam-pls@thankyou.tv.org.com> wrote in message
news:OxZG0xShEHA.704@TK2MSFTNGP09.phx.gbl...
>
> Hi,
>
> I have port a 32bit, user-mode only VFW driver from bravodo sample to an
> user-mode only Video Capture Driver.
>
> I understand that VFW using two transfer mode - Frame (Single Capture) and
> Stream.
>
> For eg, Dorgem, use Frame (Single Capture), However, AMCAP and WME seem use
> Stream (WDM based).
>
> My only problem now remain is on STREAM transfer mode
>
> Cause it quite long, in summarized, I used as follow :
>
> on DVM_STREAM_PREPAREHEADER
> - return DV_ERR_NOTSUPPORTED, so suppose client will supply the buffer
>
> on DVM_STREAM_ADDBUFFER
> - add into queue, return DV_ERR_OK
>
> When the data ready, I use DriverCallback (with MM_DRVM_DATA).
>
> But however, the data seem not pass-through client driver, the preview
> and/or output screen show nothing, and the WME FPS (Frame per Seconds) show
> zeros, but show encoding... and my debug show
> DVM_STREADM_PREPAREHEADER, then DVM_STREAM_ADDBUFFER repeated for about 40
> times, then my driver fill the buffer and callback, and this repeat.
>
> FYI, I'm using separate thread procedure to supply the data into VHdr
> (buffer queue), synchronized through semaphore (replace STI/CLI for H/W
> board), and notify client with DriverCallback (MM_DRVM_DATA etc).
>
> I understand that WME, AMCAP etc use somekind of VFW wrapper for WDM,
> How do I verify that my Callback worked ? Any recommend for a sample WDM
> client with source-code for me to easy debug (for,eg, the callback did
> called correctly) ?
>
> Thank in advance
>
> wp
>
>
>
>