IAMVideoCompression interface (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 IAMVideoCompression interface sets and retrieves video compression properties. It is supported by some video compression filters, and also by some video capture filters that output compressed video. Filters that support this interface expose it through their output pins.

An application can use this interface to control how video is compressed, including characteristics such as the key-frame rate or the compression quality.

A filter that supports this interface might not support every method. Use the IAMVideoCompression::GetInfo method to determine which methods the filter supports.

Note  To use this interface on a capture filter, you might need to connect the filter to another filter in the graph.
 

Inheritance

The IAMVideoCompression interface inherits from the IUnknown interface. IAMVideoCompression also has these types of members:

Methods

The IAMVideoCompression interface has these methods.

 
IAMVideoCompression::get_KeyFrameRate

The get_KeyFrameRate method retrieves the current key-frame rate.
IAMVideoCompression::get_PFramesPerKeyFrame

The get_PFramesPerKeyFrame method retrieves the rate of predicted (P) frames per key frame.
IAMVideoCompression::get_Quality

The get_Quality method retrieves the current compression quality.
IAMVideoCompression::get_WindowSize

The get_WindowSize method retrieves the number of frames over which the compressor will maintain the average data rate.
IAMVideoCompression::GetInfo

The GetInfo method retrieves information about the filter's compression properties, including capabilities and default values.
IAMVideoCompression::OverrideFrameSize

The OverrideFrameSize method overrides the frame size of a specified frame.
IAMVideoCompression::OverrideKeyFrame

The OverrideKeyFrame method instructs the filter to compress a particular frame as a key frame.
IAMVideoCompression::put_KeyFrameRate

The put_KeyFrameRate method sets the key-frame rate.
IAMVideoCompression::put_PFramesPerKeyFrame

The put_PFramesPerKeyFrame method sets the rate of predicted (P) frames per key frame.
IAMVideoCompression::put_Quality

The put_Quality method sets the compression quality.
IAMVideoCompression::put_WindowSize

The put_WindowSize method sets the number of frames over which the compressor must maintain an average data rate.

Remarks

For Windows Driver Model (WDM) devices, the WDM Video Capture Filter automatically exposes this interface if the WDM driver supports the PROPSETID_VIDCAP_VIDEOCOMPRESSION property set. For more information, see the Windows Driver Kit (WDK) documentation.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)

See also

Interfaces