Microsoft DirectX 8.1 (C++) |
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 | Meaning |
AM_VIDEO_FLAG_FIELD_MASK (0x0003L) | Use this mask to check whether the sample is field1 or field2 or frame. |
AM_VIDEO_FLAG_INTERLEAVED_FRAME (0x0000L) | The sample is a frame (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this). |
AM_VIDEO_FLAG_FIELD1 (0x0001L) | The sample is field1 (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this). |
AM_VIDEO_FLAG_FIELD2 (0x0002L) | The sample is the field2 (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this). |
AM_VIDEO_FLAG_FIELD1FIRST (0x0004L) | If set this means display field1 first, else display field2 first. This bit is irrelevant for 1FieldPerSample mode. |
AM_VIDEO_FLAG_WEAVE (0x0008L) | If set use bob display mode, else weave. |
AM_VIDEO_FLAG_REPEAT_FIELD (0x0040L) | If set, this flag means display the field which has been displayed first again after displaying both fields first. This bit is irrelevant for 1FieldPerSample mode. |
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.
pbBuffer
Pointer to the buffer. This property is read-only.
cbBuffer
Size of the buffer, in bytes. This property is read-only.
See Also