Microsoft Windows CE 3.0  

AM_SAMPLE2_PROPERTIES

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Describes the properties of a generic media sample.

typedef struct tagAM_SAMPLE2_PROPERTIES {
DWORD
cbData
;
DWORD
dwTypeSpecificFlags
;
DWORD
dwSampleFlags
;
LONG
lActual
;
REFERENCE_TIME
tStart
;
REFERENCE_TIME
tStop
;
DWORD
dwStreamId
;
AM_MEDIA_TYPE *
pMediaType
;
BYTE *
pbBuffer
;
LONG
cbBuffer
;
} AM_SAMPLE2_PROPERTIES;

Members

cbData
Length of property data for extensibility; number of bytes including this field.
dwTypeSpecificFlags
Type-specific flag data. These flags are defined separately for each media type. Default is zero.
dwSampleFlags
Flags bits defined by the AM_SAMPLE_PROPERTY_FLAGSenumerated data type or by the defined constants described in Remarks. All undefined bits are reserved (set them to zero, and do not copy them).
lActual
Length of data in the buffer pointed to by the pbBuffermember.
tStart
Start time if valid.
tStop
Stop time if valid.
dwStreamId
Stream identifier. Stream 0 is the normal media transport. Stream 1 is control. Currently, only Stream 0 is used. Filters should pass any other stream ID directly to their output pins without processing.
pMediaType
Copy of the media type. It becomes invalid after the sample has been released.
pbBuffer
Pointer to the buffer. The pointer becomes invalid after the sample is released.
cbBuffer
Total length of the buffer pointed to by pbBuffer, in bytes.

Remarks

The IMediaSample2interface uses this structure.

The dwSampleFlagsparameter can take values from the AM_SAMPLE_PROPERTY_FLAGSenumerated data type or one or more of the following defined constants. High-end video is typically formatted as alternate scan lines rather than as whole frames. Thus, the first field of a high-end video sample often contains odd lines of the video (lines 1, 3, 5, and so on) while the second field of the sample often contains the even lines of the video (lines 2, 4, 6, and so on). Many of the following constants describe the samples of high-end video: whether the sample is a field1, field2, or frame, and how the sample should be displayed.

AM_VIDEO_FLAG_FIELD_MASK

Used to check whether the sample is a field1, field2, or frame.

AM_VIDEO_FLAG_INTERLEAVED_FRAME

specifies this sample is a frame (use AM_VIDEO_FLAG_FIELD_MASK when using this).

AM_VIDEO_FLAG_FIELD1

specifies this sample is the field1 (use AM_VIDEO_FLAG_FIELD_MASK when using this).

AM_VIDEO_FLAG_FIELD2

specifies this sample is the field2 (use AM_VIDEO_FLAG_FIELD_MASK when using this).

AM_VIDEO_FLAG_FIELD1FIRST

specifies display field1 first, else display field2 first. This bit is ignored for 1FieldPerSample mode.

AM_VIDEO_FLAG_WEAVE

if set, use weave display mode, otherwise use the bob display mode.

AM_VIDEO_FLAG_IPB_MASK

use this sample to set whether the sample is I, P, or B (see next 3 flags).

AM_VIDEO_FLAG_I_SAMPLE

specifies to use the Intraencoded method of MPEG frame compression. Use AM_VIDEO_FLAG_IPB_MASK when using this.

AM_VIDEO_FLAG_P_SAMPLE

specifies to use the Predictedencoded method of MPEG frame compression. Use AM_VIDEO_FLAG_IPB_MASK when using this.

AM_VIDEO_FLAG_B_SAMPLE

specifies to use the Bidirectionalencoded method of MPEG frame compression. Use AM_VIDEO_FLAG_IPB_MASK when using this.

AM_VIDEO_FLAG_REPEAT_FIELD

specifies to display the first image displayed, after displaying both of the images. This bit is ignored for 1FieldPerSample mode.