IAMAudioRendererStats::GetStatParam method

The GetStatParam method retrieves performance information from the audio renderer.

Syntax


HRESULT GetStatParam(
  [in]  DWORD dwParam,
  [out] DWORD *pdwParam1,
  [out] DWORD *pdwParam2
);

Parameters

dwParam [in]

Specifies a member of the _AM_AUDIO_RENDERER_STAT_PARAM enumeration, indicating which information to retrieve.

pdwParam1 [out]

Pointer to a variable that receives performance information. The meaning of the returned value depends on the value of dwParam.

pdwParam2 [out]

Pointer to a variable that receives performance information. The meaning of the returned value depends on the value of dwParam.

Return value

Returns an HRESULT value. Possible values include the following.

Return codeDescription
E_FAIL

Failure.

E_INVALIDARG

Invalid argument.

E_NOTIMPL

The renderer does not track the specified information.

E_POINTER

NULL pointer argument.

S_OK

Success.

 

Examples

The following example retrieves the number of breaks in the audio stream:



IBaseFilter *pAudioRenderer;
// Assume pAudioRenderer is a valid pointer to an audio renderer filter.
IAMAudioRendererStats *pStats = 0;
HRESULT hr = pAudioRenderer->QueryInterface(IID_IAMAudioRendererStats, 
    (void**)&pStats);
if (SUCCEEDED(hr))
{
    DWORD dwBreakCount = 0, dwNotUsed = 0;
    hr = pStats->GetStatParam(AM_AUDREND_STAT_PARAM_BREAK_COUNT,
        &dwBreakCount, &dwNotUsed);
    if (SUCCEEDED(hr))
    {
        // dwBreakCount contains the cumulative number of audio breaks.
    }
    pStats->Release();
}


Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Strmif.h (include Dshow.h)

Library

Strmiids.lib

See also

IAMAudioRendererStats Interface

 

 

Show: