IAMVideoCompression::GetInfo method (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 GetInfo
method retrieves information about the filter's compression properties, including capabilities and default values.
Syntax
HRESULT GetInfo(
[out] LPWSTR pszVersion,
[in, out] int *pcbVersion,
[out] LPWSTR pszDescription,
[in, out] int *pcbDescription,
[out] long *pDefaultKeyFrameRate,
[out] long *pDefaultPFramesPerKey,
[out] double *pDefaultQuality,
[out] long *pCapabilities
);
Parameters
[out] pszVersion
Pointer to a buffer that receives a version string, such as "Version 2.1.0."
[in, out] pcbVersion
Receives the size of the version string, in bytes.
[out] pszDescription
Pointer to a buffer that receives a description string, such as "My Video Compressor."
[in, out] pcbDescription
Receives the size of the description string, in bytes.
[out] pDefaultKeyFrameRate
Receives the default key-frame rate.
[out] pDefaultPFramesPerKey
Receives the default rate of predicted (P) frames per key frame.
[out] pDefaultQuality
Receives the default quality.
[out] pCapabilities
Receives the compression capabilities, as a bitwise combination of zero or more CompressionCaps flags.
Return value
Returns an HRESULT value.
Remarks
Any of the listed parameters can be NULL, in which case the method ignores that parameter.
The application must allocate the buffers for the version and description strings. To determine the required size of the buffers, call this method with NULL for the pszVersion and pszDescription parameters. Use the values returned in pcbVersion and pcbDescription to allocate the buffers and then call the method again, as shown in the following code:
C++ |
---|
|
The pCapabilities parameter receives a set of flags indicating which compression properties are supported, and thus which IAMVideoCompression methods are supported. For example, if the CompressionCaps_CanKeyFrame flag is returned, it the filter supports the IAMVideoCompression::get_KeyFrameRate and IAMVideoCompression::put_KeyFrameRate methods.
The remaining parameters receive default values for the compression properties. For unsupported properties (as determined by the flags returned in pCapabilities), you should ignore the corresponding default value, as it may not be correct or meaningful.
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) |
Library | Strmiids.lib |