Share via


CSSTREAM_HEADER (Windows Embedded CE 6.0)

1/6/2010

This structure is a variable-length structure that describes a packet of data to be read from or written to a streaming driver pin.

Syntax

typedef struct {
  ULONG    Size;
  ULONG    TypeSpecificFlags;
  CSTIME   PresentationTime;
  LONGLONG Duration;
  ULONG    FrameExtent;
  ULONG    DataUsed;
  PVOID    Data;
  ULONG    OptionsFlags;
} CSSTREAM_HEADER, *PCSSTREAM_HEADER;

Members

  • Size
    A ULONG value that specifies the size of the structure in bytes. This should be at least sizeof(CSSTREAM_HEADER).
  • TypeSpecificFlags
    A ULONG value that identifies the flags specific to a data format.
  • PresentationTime
    A CSTIME structure that specifies the presentation time for the related stream buffer in 100-nanosecond units. This represents the presentation time of the initial sample in the stream data, and cannot be separately modified without knowledge of the data format. If the no-timestamp flag is set, this is ignored.
  • Duration
    A LONGLONG value that optionally specifies the duration of this stream segment in the same units as the presentation time. Set to zero when not used. This can be used to shorten the data presented from the amount of data actually passed. For example, a set of MPEG frames may be passed all in a single block because of encryption constraints and the duration indicates the actual amount of data to be rendered.
  • FrameExtent
    A ULONG value that specifies the size of the entire frame. The region within the frame extent is available to the filter and the resulting valid data size for the stream operation is reflected in the DataUsed member.
  • DataUsed
    A ULONG value that specifies, for a write operation, the number of bytes within the frame that are valid when submitting a frame to a lower-level driver. The headers are not modified on a write operation; however, the Information member of the IO_STATUS_BLOCK structure contains the total number of bytes actually written. For a read operation, this field is not used when submitting a frame to a lower-level driver and must be set to 0. On return, this member contains the number of bytes actually filled in this frame and the Information member of the IO_STATUS_BLOCK structure contains the size of the list of headers actually used. The minidriver is responsible for setting DataUsed.
  • Data
    A pointer to a the data buffer.
  • OptionsFlags
    A ULONG value that specifies a variety of attributes of the data stream. The OptionsFlags member can be set to the CSSTREAM_HEADER_OPTIONSF Values.

Remarks

This structure may be followed in memory by additional information specific to the type of data in the data packet.

The presentation time is normally in 100-nanosecond units, however the standard format of this time is based on the data format. For example, this number might represent the current sample. This number can be normalized using the CSSTREAM_HEADER.PresentationTime.Numerator and CSSTREAM_HEADER.PresentationTime.Denominator as a scaling fractional. This allows time to be represented in a native format to reduce unnecessary conversions, but implies that the native value can be linearly scaled. A value of 1/1 indicates that no scaling is necessary. A conversion should use the numerator first, then the denominator, in order to reduce rounding errors.

On an IOCTL_CS_BUFFERS call, portions of the stream header are filled in by the call. Each CSSTREAM_HEADER.DataUsed member contains the actual number of bytes read, which is less than or equal to each CSSTREAM_HEADER.FrameExtent.

Requirements

Header cs.h
Windows Embedded CE Windows Embedded CE 6.0 and later

See Also

Reference

Camera Driver Structures
CSTIME
CSSTREAM_HEADER_OPTIONSF Values
IOCTL_CS_BUFFERS