Compartilhar via


VIDEOINFOHEADER Structure

 
Microsoft DirectShow 9.0

VIDEOINFOHEADER Structure

The VIDEOINFOHEADER structure describes the bitmap and color information for a video image.

Syntax

typedef struct tagVIDEOINFOHEADER {
    RECT                rcSource,
    RECT                rcTarget;
    DWORD               dwBitRate;
    DWORD               dwBitErrorRate;
    REFERENCE_TIME      AvgTimePerFrame;
    BITMAPINFOHEADER    bmiHeader;
} VIDEOINFOHEADER;

Members

rcSource

RECT structure that specifies the source video window. This structure can be a clipping rectangle, to select a portion of the source video stream.

rcTarget

RECT structure that specifies the destination video window.

dwBitRate

Approximate data rate of the video stream, in bits per second.

dwBitErrorRate

Data error rate, in bit errors per second.

AvgTimePerFrame

The desired average display time of the video frames, in 100-nanosecond units. The actual time per frame may be longer. See Remarks.

bmiHeader

BITMAPINFOHEADER structure that contains color and dimension information for the video image bitmap. If the format block contains a color table or color masks, they immediately follow the bmiHeader member. You can get the first color entry by casting the address of member to a BITMAPINFO pointer.

When used inside a VIDEOINFOHEADER structure, the semantics of the BITMAPINFOHEADER structure differ slightly from how the structure is used in GDI. For more information, refer to the topic BITMAPINFOHEADER Structure.

Remarks

For information about using the rcSource and rcTarget members, see Source and Target Rectangles in Video Renderers.

Frame Rates

The value of AvgTimePerFrame is usually set by the source filter, which obtains the value from the media stream. This value can be used to calculate the authored frame rate, which is the intended frame rate for the video to be rendered. During playback, the system may not be able to render the stream at the authored rate, so the actual frame rate may be less. This can happen if the machine's resources become over-committed. Also, the monitor's refresh rate can interfere with the playback rate of the video. For example, if the intended rate is 60,000/1001 (NTSC TV) and the monitor's refresh rate is 60Hz, the intended rate and the actual rate will never match. To retrieve the actual frame rate achieved during playback, use the IQualProp::get_AvgFrameRate method on the video renderer.

During playback, applications can retrieve the authored frame rate as follows:

To obtain the authored frame rate of a video file without rendering it, use IMediaDet::get_FrameRate.

Requirements

Header: Dshow.h.

See Also