Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

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

Syntax

HRESULT GetInfo(
  WCHAR*  
pszVersion,
  int*
pcbVersion,
  LPWSTR  
pszDescription,
  int*
pcbDescription,
  long*   
pDefaultKeyFrameRate,
  long*   
pDefaultPFramesPerKey,
  double* 
pDefaultQuality,
  long*   
pCapabilities
) PURE;

Parameters

pszVersion

[out] Pointer to a WCHAR buffer that receives a version string, such as "Version 2.1.0."

pcbVersion

[in, out] Pointer to an int variable that receives the size of the version string, in bytes.

pszDescription

[out] A LPWSTR buffer that receives a description string, such as "My Video Compressor."

pcbDescription

[in, out] Pointer to an int variable that receives the size of the description string.

pDefaultKeyFrameRate

[out] Pointer to a long variable that receives the default key-frame rate.

pDefaultPFramesPerKey

[out] Pointer to a long variable that receives the default rate of predicted (P) frames per key frame.

pDefaultQuality

[out] Pointer to a double variable that receives the default quality.

pCapabilities

[out] Pointer to a long variable that 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 pszVersionand pszDescriptionparameters. Use the values returned in pcbVersionand pcbDescriptionto allocate the buffers and then call the method again, as shown in the following code:

Copy Code
int cbVersion, cbDesc; // Size in bytes, not characters!
hr = pCompress->GetInfo(0, &cbVersion, 0, &cbDesc, 0, 0,
0, 0);
if (SUCCEEDED(hr))
{
  WCHAR *pszVersion = new WCHAR[cbVersion/2];  // Wide character =
2
bytes
  WCHAR *pszDesc = new WCHAR[cbDesc/2];
  if (pszVersion && pszDesc)
  {
	hr = pCompress->GetInfo(pszVersion, 0, pszDesc, 0, 0, 0, 0,
0);
  }
  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 pCapabilitiesparameter receives a set of flags indicating which compression properties are supported, and thus which IAMVideoCompression interfacemethods are supported. For example, if the CompressionCaps_CanKeyFrame flag is returned, the filter supports the IAMVideoCompression::get_KeyFrameRateand IAMVideoCompression::put_KeyFrameRatemethods.

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

Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment

See Also