ICodecAPI::GetParameterValues 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 GetParameterValues method gets the list of possible values for a codec property.

This method applies only to properties that support a list of possible values, as opposed to a linear range.

Syntax

HRESULT GetParameterValues(
  [in]  const GUID *Api,
  [out] VARIANT    **Values,
  [out] ULONG      *ValuesCount
);

Parameters

[in] Api

Pointer to a GUID that specifies the property to query. For a list of standard codec properties, see Codec API Properties.

[out] Values

Receives a pointer to an array of VARIANT types. The array contains the list of values that the encoder supports for this property. The caller must free each VARIANT by calling VariantClear. The caller must also free the array by calling CoTaskMemFree.

[out] ValuesCount

Receives the number of elements in the Values array.

Return value

This method can return one of these values.

Return code Description
S_OK
The method succeeded.
E_INVALIDARG
Invalid argument.
VFW_E_CODECAPI_LINEAR_RANGE
The property supports a range of values, not a list.

Remarks

If the property supports a range of values, instead of a list, the method returns VFW_E_CODECAPI_LINEAR_RANGE. In that case, call ICodecAPI::GetParameterRange to get the range of values.

Requirements

Requirement Value
Minimum supported client Windows XP with SP2 [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 R2 [desktop apps | UWP apps]
Target Platform Windows
Header strmif.h (include Dshow.h)
Library Strmiids.lib

See also

Codec API Reference

Encoder API

ICodecAPI