Microsoft DirectX 9.0 |
The AM_SAMPLE2_PROPERTIES structure describes the properties of a media sample. The IMediaSample2 interface uses this structure.
Syntax
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, in bytes. This structure member is for extensibility.
dwTypeSpecificFlags
Type-specific flags. Flags are defined separately for each media type. Default value is AM_VIDEO_FLAG_INTERLEAVED_FRAME (zero). The following flags are used for video streams.
Flag | Value | Description |
AM_VIDEO_FLAG_FIELD_MASK | 0x0003 | Use this mask to check whether the sample is a field or a frame. |
AM_VIDEO_FLAG_INTERLEAVED_FRAME | 0x0000 | The sample is a frame. (Use the AM_VIDEO_FLAG_FIELD_MASK bitmask to test for this value.) |
AM_VIDEO_FLAG_FIELD1 | 0x0001 | The sample is field 1. (Use the AM_VIDEO_FLAG_FIELD_MASK bitmask to test for this value.) |
AM_VIDEO_FLAG_FIELD2 | 0x0002 | The sample is the field 2. (Use the AM_VIDEO_FLAG_FIELD_MASK bitmask to test for this value.) |
AM_VIDEO_FLAG_FIELD1FIRST | 0x0004 | If this flag is set, display field 1 first. Otherwise, display field 2 first. (Applies only when there are two fields per sample.) |
AM_VIDEO_FLAG_WEAVE | 0x0008 | If this flag is set, use weave mode (that is, do not deinterlace the sample). Otherwise, use bob mode. This flag applies only when there are two fields per sample. |
AM_VIDEO_FLAG_REPEAT_FIELD | 0x0040 | If this flag is set, display the first field again after displaying the second field. (Applies only when there are two fields per sample.) |
Other flags are defined but not currently used. See dvdmedia.h.
dwSampleFlags
Bitwise combination of flags the AM_SAMPLE_PROPERTY_FLAGS enumerated data type. Undefined bits are reserved and must be zero.
lActual
Length of the valid data in the buffer.
tStart
Start time, if valid. The dwSampleFlags member specifies whether this member is valid.
tStop
Stop time, if valid. The dwSampleFlags member specifies whether this member is valid.
dwStreamId
Stream identifier. If the value is AM_STREAM_MEDIA, the stream contains media data. If the value is AM_STREAM_CONTROL, the stream contains control information. Applications can define values of 0x80000000 or greater for their own use. (See AM_SAMPLE_PROPERTY_FLAGS Enumeration.)
pMediaType
Pointer to an AM_MEDIA_TYPE structure that specifies the media type if the format has changed. If this format has not changed, this member is NULL.
pbBuffer
Pointer to the sample buffer.
cbBuffer
Size of the sample buffer, in bytes.
See Also