Re: Createfile
From: Zhuang (ZHuang_at_cogentsystems.com)
Date: 01/13/05
- Next message: shinji watanabe: "UsbVideoClass YUV formats don't work"
- Previous message: Dan Maddy [MSFT]: "RE: USB Video-Class DK"
- In reply to: Max Paklin: "Re: Createfile"
- Next in thread: Max Paklin: "Re: Createfile"
- Reply: Max Paklin: "Re: Createfile"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 13 Jan 2005 09:38:59 +0800
Sir:
I read the flow section in DDK:
2.3.3 Using Bulk Pipes to Retrieve Still Frames from the Camera
An STI USB minidriver can retrieve still frames from the camera using
USBCAMD bulk services. The following steps outline how to retrieve still
frames from cameras that use bulk pipes for still image transfer.
1.. Open the WDM video capture source filter associated with the camera.
2.. Open the still pin on the filter handle obtained in step 1.
3.. Send a ReadFile on that pin with maximum-sized buffer.
4.. Set the stream state from Pause to Run.
5.. Get the interface pointer to PROPSETID_VIDCAP_VIDEOCONTROL property
set.
6.. Set the KS_VideoControlFlag_Trigger flag associated with property ID
KSPROPERTY_VIDEOCONTROL_MODE.
7.. Once the video control handler of the camera minidriver receives the
trigger request, it should call USBCAMD_BulkReadWrite with a NULL buffer
pointer.
8.. USBCAMD will dequeue a data SRB from the still pin and call the
minidriver's CamNewVideoFrameEx entry point before it starts the bulk
transfer. The camera minidriver can reduce the requested size of the bulk
transfer if it determines the actual still frame is smaller than the
maximum size allocated by DirectShow.
9.. Upon completion of the bulk transfer, USBCAMD will call the
CamProcessRawVideoFrameEx entry point for further processing. Afterward,
USBCAMD will finish the stream class read request on the still pin.
A user application can cancel a requested bulk read or write by sending a
CancelIO to the still pin. If there is a need to load tables to the camera
through a bulk out pipe, the USBD driver can send a WriteFile to the still
pin.
Still data flow is intended for use in a pull model. A pull occurs when an
application requests a still. Still data flow will also work in a push
model where it functions as a pull. A push occurs when the user pushes the
button on the camera, triggering the device event. USBCAMD will send a
KSEVENTSETID_VIDCAPTOSTI event which can be propagated all the way to the
imaging application.
please tell me how to do?
"Max Paklin" <mpaklin@hotmail.com> wrote in message
news:OKp#1nH#EHA.3596@TK2MSFTNGP12.phx.gbl...
> You don't normally use CreateFile for that. Check out AmCap sample from DX
> SDK (or old Platform SDK). It shows how to uses System Device Enumerator
to
> look up a device from a particular category.
> Also you don't normally want to open pin by calling CreateFile. What you
> usually do is to connect a pin to an input pin of another filter and
process
> data when it comes to that pin.
>
> -- Max.
>
>
>
> "Zhuang" <ZHuang@cogentsystems.com> wrote in message
> news:uQrMfXF%23EHA.4004@tk2msftngp13.phx.gbl...
> > How to use Createfile Function to Open the WDM video capture source
filter
> > associated with the camera?
> > How to use Createfile Function to Open the still pin on the filter?
> >
> > rainwin Huang
> >
> >
>
>
- Next message: shinji watanabe: "UsbVideoClass YUV formats don't work"
- Previous message: Dan Maddy [MSFT]: "RE: USB Video-Class DK"
- In reply to: Max Paklin: "Re: Createfile"
- Next in thread: Max Paklin: "Re: Createfile"
- Reply: Max Paklin: "Re: Createfile"
- Messages sorted by: [ date ] [ thread ]