IAMVideoCompression::GetInfo method (strmif.h)

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


  [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


[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.


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:

// Get the size of the version and description strings, in bytes.
int cbVersion, cbDesc; 
hr = pCompress->GetInfo(NULL, &cbVersion, NULL, &cbDesc, 
if (SUCCEEDED(hr))
    // Allocate the buffers.
    WCHAR *pszVersion = new WCHAR[cbVersion / sizeof(WCHAR)];  
    WCHAR *pszDesc = new WCHAR[cbDesc / sizeof(WCHAR)];

    // Now query for the strings.
    hr = pCompress->GetInfo(pszVersion, &cbVersion, pszDesc, &cbDesc, 
        NULL, NULL, NULL, NULL);
    delete [] pszVersion;
    delete [] pszDesc;
Note that the strings are wide-character strings, and the returned sizes are in bytes, not number of characters. Also, one or both strings might be zero-length.

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.


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

See also

Error and Success Codes

IAMVideoCompression Interface