Re: VFW Streaming Transfer under WME

From: Maxim S. Shatskih (maxim_at_storagecraft.com)
Date: 08/18/04


Date: Wed, 18 Aug 2004 22:58:18 +0400


    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
>
>
>
>


Relevant Pages

  • VFW Stream Transfer Question (use under WME)
    ... user-mode only Video Capture Driver. ... I understand that VFW using two transfer mode - Frame and ... But however, the data seem not pass-through client driver, the preview ...
    (microsoft.public.win32.programmer.kernel)
  • VFW Streaming Transfer under WME
    ... user-mode only Video Capture Driver. ... I understand that VFW using two transfer mode - Frame and ... But however, the data seem not pass-through client driver, the preview ...
    (microsoft.public.development.device.drivers)
  • [PATCH 1/5] call i2c_probe from i2c core
    ... If you want to write a `sensors' driver, ... Whenever a new adapter is inserted, or for all adapters if the driver is ... the callback attach_adapteris called. ... -contains -1 for a probed detection, 0 for a forced detection, or a positive ...
    (Linux-Kernel)
  • Re: Desktop Capture (Vista)
    ... I understood that the composition of whole desktop is dependent on GPU. ... In order to support the screen capture functionlity, ... you should see why a display driver (a mirror driver is ... Catching a snapshot of a single window with a mirror driver, ...
    (microsoft.public.development.device.drivers)
  • Re: Cross Process Callbacks
    ... If you have the help of a wrapper API in the application space, ... application calls a function, CallMeBackWithData(Callback fcn, DWORD ... DeviceIoControl(driver, set up callback, event) ... Driver -> handles buffer cleanup and continues in device.exe context ...
    (microsoft.public.windowsce.platbuilder)