AM_SAMPLE2_PROPERTIES

This structure 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_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. 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 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.

Flag Description
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.

Requirements

DirectShow applications and DirectShow filters have different include file and link library requirements. See Setting Up the Build Environment for more information.

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header: Dshow.h.

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.