Compartilhar via


IEncoderAPI::GetParameterRange

 
Microsoft DirectShow 9.0

IEncoderAPI::GetParameterRange

  • Note   The IEncoderAPI interface is deprecated. Use ICodecAPI instead.

The GetParameterRange method retrieves the valid range of values that the parameter supports, in cases where the parameter supports a stepped range 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

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

If Api equals ** ENCAPIPARAM_BITRATE_MODE, the method returns E_NOTIMPL, because the bitrate mode constants are a list of specific values.

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
  • Float 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.

Requirements

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

Library: Use Strmiids.lib.

See Also