VIDEO_STREAM_CONFIG_CAPS Structure

 
Microsoft DirectShow 9.0

VIDEO_STREAM_CONFIG_CAPS Structure

  • Note   Use of this structure to configure a video capture device is deprecated. New applications should avoid using the values in this structure. Instead, use the AM_MEDIA_TYPE structure returned by IAMStreamConfig::GetFormat in the pmt parameter.

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.

Syntax

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;

Members

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.

The previous four structure members use the following values:

Value Description
0 Does not support stretching/shrinking.
1 Uses pixel doubling (stretching) or eliminates pixels (shrinking)
2 Uses interpolation (2 taps)
3 and higher 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.

Remarks

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

These numbers define the set of rectangles that are valid for the rcSource member of the VIDEOINFOHEADER or VIDEOINFOHEADER2 structure. In this example, the minimum source rectangle is 160 pixels wide x 120 pixels high. The width can be increased in steps of 4 pixels, to a maximum of 320. The height can be increased in steps of 8 pixels, to a maximum of 240. In other words, the valid widths are 160, 164, 168 ... 320; and the valid heights are 120, 128, 136 ... 240.

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)

In a similar way, the MinOutputSize, MaxOutputSize, OutputGranularityX, and OutputGranularityY members define what values are supported for the biWidth and biHeight members of the BITMAPINFOHEADER structure.

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.

Requirements

Header: Dshow.h.

See Also