IAMStats::GetValueByIndex

 
Microsoft DirectShow 9.0

IAMStats::GetValueByIndex

The GetValueByIndex method retrieves a statistic, by index.

Syntax

  HRESULT GetValueByIndex(
  long lIndex
  BSTR *szName
  long *lCount
  double *dLast
  double *dAverage
  double *dStdDev
  double *dMin
  double *dMax
);

Parameters

lIndex

[in] Zero-based index of the statistic.

szName

[out] Pointer to a variable that receives the name of the statistic.

lCount

[out] Pointer to a variable that receives the number of values that were recorded.

dLast

[out] Pointer to a variable that receives the most recent value that was recorded.

dAverage

[out] Pointer to a variable that receives the average value.

dStdDev

[out] Pointer to a variable that receives the standard deviation of the values. If the count is less than two, the standard deviation is zero.

dMin

[out] Pointer to a variable that receives the minimum value that was recorded.

dMax

[out] Pointer to a variable that receives the maximum value that was recorded.

Return Values

Returns an HRESULT value. Possible values include the following.

Return code Description
S_OK Success.
E_INVALIDARG Index out of range.
E_OUTOFMEMORY Insufficient memory.
E_POINTER NULL pointer argument.

Remarks

The caller must free the string returned in szName, by calling the SysFreeString function.

To get the number of statistics, call IAMStats::get_Count. To get the index of a particular statistic, call IAMStats::GetIndex.

Requirements

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

Library: Use Strmiids.lib.

See Also