Microsoft DirectX 8.0 |
Describes the bitmap and color information for a video image, including interlace, copy protection, and pixel aspect ratio information.
Syntax
typedef struct tagVIDEOINFOHEADER2 { RECT rcSource; RECT rcTarget; DWORD dwBitRate; DWORD dwBitErrorRate; REFERENCE_TIME AvgTimePerFrame; DWORD dwInterlaceFlags; DWORD dwCopyProtectFlags; DWORD dwPictAspectRatioX; DWORD dwPictAspectRatioY; DWORD dwReserved1; DWORD dwReserved2; BITMAPINFOHEADER bmiHeader; } VIDEOINFOHEADER2;
Members
- rcSource
- RECT structure that specifies what part of the source stream should be used to fill the destination buffer. Renderers can use this field to ask the decoders to stretch or clip. For more information, see Source and Target Rectangles in Video Renderers.
- rcTarget
- RECT structure that specifies that specifies what part of the destination buffer should be used. For more information, see Source and Target Rectangles in Video Renderers.
- dwBitRate
- Approximate data rate of the video stream, in bits per second.
- dwBitErrorRate
- Data error rate of the video stream, in bits per second.
- AvgTimePerFrame
- The video frame's average display time, in 100-nanosecond units.
- dwInterlaceFlags
- Bit-wise combination of zero or more of the following flags. See the table at the bottom of this page for more information about these flags.
Set undefined flags to zero, or the connection will be rejected.
AMINTERLACE_IsInterlaced The stream is interlaced. If this flag is absent, the other bits are irrelevant. AMINTERLACE_1FieldPerSample One field per media sample. If this flag is absent, there are two fields per media sample. AMINTERLACE_Field1First Field 1 is first. If this flag is absent, Field 2 is first. (Top field in PAL is field 1, top field in NTSC is field 2.) AMINTERLACE_FieldPatField1Only Stream never contains a Field 2. AMINTERLACE_FieldPatField2Only Stream never contains a Field 1. AMINTERLACE_FieldPatBothRegular One Field 2 for every Field 1. AMINTERLACE_FieldPatBothIrregular Random pattern of Field 1 and Field 2. AMINTERLACE_DisplayModeBobOnly Bob display mode only. AMINTERLACE_DisplayModeWeaveOnly Weave display mode only. AMINTERLACE_DisplayModeBobOrWeave Either bob or weave mode. - dwCopyProtectFlags
- Flag set with the AMCOPYPROTECT_RestrictDuplication value to indicate duplication of stream should be restricted. If undefined, specify zero or connection will be rejected.
- dwPictAspectRatioX
- The X dimension of picture aspect ratio. For example, 16 for a 16-inch × 9-inch display.
- dwPictAspectRatioY
- The Y dimension of picture aspect ratio. For example, 9 for a 16-inch × 9-inch display.
- dwReserved1
- Reserved. Must be zero.
- dwReserved2
- Reserved for future use. Must be zero.
- bmiHeader
- Microsoft® Win32® BITMAPINFOHEADER structure that contains color and dimension information for the video image bitmap.
Remarks
Use the bit mask AMINTERLACE_FieldPatternMask to check the field pattern flags in dwInterlaceFlags:
switch (dwInterlaceFlags & AMINTERLACE_FieldPatternMask) { case AMINTERLACE_FieldPatField1Only: // Stream never contains a Field 2. case AMINTERLACE_FieldPatField2Only: // Stream never contains a Field 1. case AMINTERLACE_FieldPatBothRegular: // One Field 2 for every Field 1. case AMINTERLACE_FieldPatBothIrregular: // Random pattern of Field 1 and Field 2. }Use the bit mask AMINTERLACE_DisplayModeMask to check the display mode flags in dwInterlaceFlags:
switch (dwInterlaceFlags & AMINTERLACE_DisplayModeMask) { case AMINTERLACE_DisplayModeBobOnly: // Bob display mode only. case AMINTERLACE_DisplayModeWeaveOnly: // Weave display mode only. case AMINTERLACE_DisplayModeBobOrWeave: // Either bob or weave mode. }The following table describes the valid combinations of interlace flags and sample properties, for displaying interlaced fields/frames on the Overlay Mixer filter. Sample properties are specified in the dwTypeSpecificFlags member of each sample's AM_SAMPLE2_PROPERTIES structure.
Display Mode Interlace Flags Media Sample Properties Frame 0 0 Non-Interleaved Bob AMINTERLACE_IsInterlaced |
AMINTERLACE_1FieldPerSample |
AMINTERLACE_DisplayModeBobOnlyAM_VIDEO_FLAG_FIELD1 or AM_VIDEO_FLAG_FIELD2 Weave Only AMINTERLACE_IsInterlaced |
AMINTERLACE_FieldPatBothRegular |
AMINTERLACE_DisplayModeWeaveOnlyAM_VIDEO_FLAG_WEAVE Interleaved Bob Only Field 1 First AMINTERLACE_IsInterlaced |
AMINTERLACE_DisplayModeBobOnlyAM_VIDEO_FLAG_FIELD1_FIRST Field 2 First AMINTERLACE_IsInterlaced |
AMINTERLACE_DisplayModeBobOnly0 Bob or Weave
(Interchangeable)Bob, Field 1 First AMINTERLACE_IsInterlaced |
AMINTERLACE_DisplayModeBobOrWeaveAM_VIDEO_FLAG_FIELD1_FIRST Bob, Field 2 First AMINTERLACE_IsInterlaced |
AMINTERLACE_DisplayModeBobOrWeave0 Weave AMINTERLACE_IsInterlaced |AMINTERLACE_DisplayModeBobOrWeave AM_VIDEO_FLAG_WEAVE