// ksmedia.h
typedef struct tagKS_VIDEOINFO {
RECT rcSource;
RECT rcTarget;
DWORD dwBitRate;
DWORD dwBitErrorRate;
REFERENCE_TIME AvgTimePerFrame;
KS_BITMAPINFOHEADER bmiHeader;
union {
KS_RGBQUAD bmiColors[KS_iPALETTE_COLORS];
DWORD dwBitMasks[KS_iMASK_COLORS];
KS_TRUECOLORINFO TrueColorInfo;
};
} KS_VIDEOINFO, *PKS_VIDEOINFO;
View the official Windows Driver Kit DDI referenceNo description available.
The KS_VIDEOINFO structure describes the bitmap and color information for a video stream.
rcSourceSpecifies a clipping rectangle that selects the portion of the active video signal to use.
rcTargetSpecifies a rectangle that indicates which part of the target buffer to use.
dwBitRateSpecifies a value that indicates the video stream's approximate data rate, in bits per second.
dwBitErrorRateSpecifies a value that indicates the video stream's data error rate, in bit errors per second.
AvgTimePerFrameSpecifies the average time per frame in 100-nanosecond units.
bmiHeaderDescribes a KS_BITMAPINFOHEADER structure that contains color and dimension information about the video image bitmap.
bmiColorsArray of KS_RGBQUAD structures that specifies the video's color palette. Each structure represents a single color, which is a combination of red, green, and blue intensities.
dwBitMasksArray of DWORD values that specify true-color bitmasks.
TrueColorInfoKS_TRUECOLORINFO structure that contains both a color palette and an array of color bitmasks.
This structure must not be used unless the biSize member of the KS_BITMAPINFOHEADER member is set to sizeof(KS_BITMAPINFOHEADER).
A source filter can request that the sink filter take only a section of the video by providing values that effectively define a clipping rectangle in the rcSource member. However, if the sink filter does not check for the clipping rectangle on connection, the sink filter simply renders all of the video, effectively ignoring any clipping information passed from the source filter to the sink filter.
Ideally, a sink filter checks rcSource and if the sink filter does not support image extraction and the rectangle is not empty, then it rejects the connection. A filter should use the Win32 function SetRectEmpty to reset a rectangle to all zeros (and IsRectEmpty to later check the rectangle).
The rcTarget member specifies the destination rectangle for the video. Most source filters set this member to all zeros. A downstream filter can request that the video be placed in a particular area of the buffers it supplies. In this case, it calls the Win32 function QueryAccept with a nonempty target.