AM_SAMPLE2_PROPERTIES Structure

Structures

Describes the properties of a generic media sample.

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 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 members of the AM_SAMPLE_PROPERTY_FLAGS enumerated 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 pbBuffer member.
tStart
Start time if valid.
tStop
Stop time if valid.
dwStreamId
Stream identifier defined by members of the AM_SAMPLE_PROPERTY_FLAGS enumerated data type. Stream 0 (AM_STREAM_MEDIA) is the normal media transport. Stream 1 (AM_STREAM_CONTROL) 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 IMediaSample2 interface uses this structure.

The dwSampleFlags parameter can take values from the AM_SAMPLE_PROPERTY_FLAGS enumerated 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 Intra encoded method of MPEG frame compression. Use AM_VIDEO_FLAG_IPB_MASK when using this.
AM_VIDEO_FLAG_P_SAMPLE
specifies to use the Predicted encoded method of MPEG frame compression. Use AM_VIDEO_FLAG_IPB_MASK when using this.
AM_VIDEO_FLAG_B_SAMPLE
specifies to use the Bidirectional encoded 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.

Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.