Partager via


Adapters, Pins, and Streams (Windows Embedded CE 6.0)

1/6/2010

Pins

Pin objects represent the video streams supported by your hardware adapter. Each adaptor can support multiple pins. A pin is an installable device driver. Because Windows Embedded CE-based camera drivers are not full streaming video drivers, it is sufficient to have at most one stream running at a time per pin. Each adapter can support any or all of the pin types shown in the following table.

Pin Type GUID

Preview

PINNAME_VIDEO_PREVIEW

Capture

PINNAME_VIDEO_CAPTURE

Still

PINNAME_VIDEO_STILL

Driver clients can use the CSPROPERTY_PIN_CTYPES and CSPROPERTY_PIN_CATEGORY properties (see CSPROPERTY_PIN) property set to query the number of pins and their categories supported in the camera driver.    

Streams

A stream is the captured data flowing from the capture device to the device that will process the data. You can associate multiple streams with the capture device; such as one each for preview, capture, and still.

An array of CS_DATARANGE_VIDEO structures is used to provide details about the full range of formats associated with each pin supported by the camera driver. This array lists all the potential formats for a stream produced from this pin. For example, a stream could support RGB16, RGB24, YVU9, and JPEG capture formats.

A trio of values is used to identify a stream. These values are the major type, subformat, and specifier. For a video capture stream, the major format should be CSDATAFORMAT_TYPE_VIDEO and the specifier should be CSDATAFORMAT_SPECIFIER_VIDEOINFO. A stream's subformat value is used to convey details of the particular video data type, such as the color space used.

The four low-order bytes of the subformat should match the FOURCC values used in the biCompression member of the BITMAPINFOHEADER structure. For example, the following GUID identifies the FOURCC (YVU9) video format.

39555659-0000-0010-8000-00AA00389B71
      59 = 'Y'
    56 = 'V'
  55 = 'U'
39 = '9'

The CS_DATARANGE_VIDEO structure serves two different but related purposes. First, when the camera driver is initialized, it returns an array of CS_DATARANGE_VIDEO structures to expose all of the formats is supports. Second, when a particular format is selected, the CS_DATARANGE_VIDEO structure is used to interrogate the driver to determine whether a proposed format is acceptable. During negotiation, clients only modify the contents of the VideoInfoHeader member but leave all other members of CS_DATARANGE_VIDEO unchanged. The driver verifies the requested parameters, then fills in the appropriate members and returns a CS_DATAFORMAT_VIDEOINFOHEADER structure.

The properties used to do this are CSPROPERTY_PIN_DATARANGES and CSPROPERTY_PIN_DATAINTERSECTION (see CSPROPERTY_PIN). The property value types for each property query are CSDATARANGE and CSDATAFORMAT.

See Also

Concepts

Camera Driver Implementation