VIDEO_STREAM_CONFIG_CAPS structure (strmif.h)
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The VIDEO_STREAM_CONFIG_CAPS structure describes a range of video formats. Video compression and video capture filters use this structure to describe what formats they can produce.
- guid
- VideoStandard
- MinFrameInterval
- MaxFrameInterval
typedef struct _VIDEO_STREAM_CONFIG_CAPS {
GUID guid;
ULONG VideoStandard;
SIZE InputSize;
SIZE MinCroppingSize;
SIZE MaxCroppingSize;
int CropGranularityX;
int CropGranularityY;
int CropAlignX;
int CropAlignY;
SIZE MinOutputSize;
SIZE MaxOutputSize;
int OutputGranularityX;
int OutputGranularityY;
int StretchTapsX;
int StretchTapsY;
int ShrinkTapsX;
int ShrinkTapsY;
LONGLONG MinFrameInterval;
LONGLONG MaxFrameInterval;
LONG MinBitsPerSecond;
LONG MaxBitsPerSecond;
} VIDEO_STREAM_CONFIG_CAPS;
guid
GUID that identifies the format type. For example, FORMAT_VideoInfo or FORMAT_VideoInfo2. For more information, see the formattype member of the AM_MEDIA_TYPE structure.
VideoStandard
The analog video standard supported. The value is a bitwise combination of flags from the AnalogVideoStandard enumeration type, or zero.
InputSize
Native size of the incoming video signal. For a compressor, the size is taken from the input pin. For a capture filter, the size is the largest signal the filter can digitize with every pixel remaining unique.
MinCroppingSize
Smallest source rectangle allowed. The source rectangle is defined in the rcSource member of the VIDEOINFOHEADER or VIDEOINFOHEADER2 structure.
MaxCroppingSize
Largest source rectangle allowed.
CropGranularityX
Horizontal granularity of the source rectangle. This value specifies the increments that are valid between MinCroppingSize and MaxCroppingSize.
CropGranularityY
Vertical granularity of the source rectangle. This value specifies the increments that are valid between MinCroppingSize and MaxCroppingSize.
CropAlignX
Required horizontal alignment of the source rectangle.
CropAlignY
Required vertical alignment of the source rectangle.
MinOutputSize
Minimum output size.
MaxOutputSize
Maximum output size.
OutputGranularityX
Granularity of the output width. This value specifies the increments that are valid between MinOutputSize and MaxOutputSize.
OutputGranularityY
Granularity of output height. This value specifies the increments that are valid between MinOutputSize and MaxOutputSize.
StretchTapsX
Indicates how well the filter can stretch the image horizontally.
StretchTapsY
Indicates how well the filter can stretch the image vertically.
ShrinkTapsX
Indicates how well the filter can shrink the image horizontally.
ShrinkTapsY
Indicates how well the filter can shrink the image vertically.
Value | Meaning |
---|---|
|
Does not support stretching/shrinking. |
|
Uses pixel doubling (stretching) or eliminates pixels (shrinking) |
|
Uses interpolation (2 taps) |
|
Uses interpolation (>2 taps) |
MinFrameInterval
The minimum frame duration, in 100-nanosecond units. This value applies only to capture filters.
MaxFrameInterval
The maximum frame duration, in 100-nanosecond units. This value applies only to capture filters.
MinBitsPerSecond
Minimum data rate this pin can produce.
MaxBitsPerSecond
Maximum data rate this pin can produce.
The IAMStreamConfig::GetStreamCaps method returns this structure. An application can use this information to modify the output format on a video compression filter or video capture filter.
For example, assume that filter returns the following values for the source rectangle:
- MinCroppingSize = (160, 120)
- MaxCroppingSize = (320, 240)
- CropGranularityX = 4
- CropGranularityY = 8
- CropAlignX = 2
- CropAlignY = 4
The CropAlignX and CropAlignY members define where the top-left corner of the source rectangle can sit. For example, the following rectangles are valid, given the previous values:
- (0, 0, 160, 120)
- (2, 0, 162, 120)
- (2, 8, 162, 128)
For capture filters, the MinFrameInterval and MaxFrameInterval members define the minimum and maximum duration of each frame, as given in the AvgTimePerFrame member of the VIDEOINFOHEADER or VIDEOINFOHEADER2 structure. The filter may not support every frame rate that falls between these two values. The IAMStreamConfig::SetFormat method will set the frame rate to the closest value that the filter supports. If SetFormat succeeds, call IAMStreamConfig::GetFormat to determine the actual frame rate.
Requirement | Value |
---|---|
Header | strmif.h (include Dshow.h) |