Поделиться через


AM_SAMPLE2_PROPERTIES (Windows Embedded CE 6.0)

1/6/2010

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

Header dshow.h
Windows Embedded CE Windows CE 2.12 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment, Version 2.12 requires DXPAK 1.0 or later

See Also

Reference

DirectShow Structures