Share via


ICodecAPI::GetParameterRange

 
Microsoft DirectShow 9.0

ICodecAPI::GetParameterRange

The GetParameterRange method returns the valid range of values for a parameter. This method applies to parameters that support a stepped range of values, as opposed to a list of specific values.

Syntax

  HRESULT GetParameterRange(
  const GUID*  Api,
  VARIANT*  ValueMin,
  VARIANT*  ValueMax,
  VARIANT*  SteppingDelta
);

Parameters

Api

[in]  Pointer to a GUID that specifies the parameter.

ValueMin

[out]  Pointer to a VARIANT type that receives the minimum value of the parameter.

ValueMax

[out]  Pointer to a VARIANT type that receives the maximum value of the parameter.

SteppingDelta

[out]  Pointer to a VARIANT type that receives the stepping delta, which defines the valid increments from ValueMin to ValueMax.

Return Values

Returns an HRESULT value. Possible values include the following.

Value Description
E_INVALIDARG Invalid argument.
S_OK Success.
VFW_E_CODECAPI_ENUMERATED The specified parameter has an enumerated range of values, not a linear range.

Remarks

The valid range for the parameter is [ValueMin ... ValueMax], with increments of SteppingDelta. If a parameter supports a stepped range of values, it must use one of the following variant types:

  • Unsigned types: VT_UI8, VT_UI4, VT_UI2, VT_UI1
  • Signed types: VT_I8, VT_I4, VT_I2
  • Floating-point types: VT_R8, VT_R4

By definition, the parameter will return a specific type.

Any stepping value is valid. If the range has no stepping delta (that is, you can increment by any value), the encoder should return an empty value (VT_EMPTY) for SteppingDelta.

This method fails if the codec parameter supports a list of values, rather than a range. If this method fails, try calling ICodecAPI::GetParameterValues.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also