IAMVideoAccelerator::GetInternalCompBufferInfo method (videoacc.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 GetInternalCompBufferInfo method gets information about the compressed buffers used for DirectX Video Acceleration (DXVA) decoding.

Call this method after the decoder has connected to the video renderer's input pin. During the pin connection process, use the IAMVideoAccelerator::GetCompBufferInfo method instead.

Syntax

HRESULT GetInternalCompBufferInfo(
  [in, out] LPDWORD              pdwNumTypesCompBuffers,
  [out]     LPAMVACompBufferInfo pamvaCompBufferInfo
);

Parameters

[in, out] pdwNumTypesCompBuffers

On input, specifies the number of elements in the pamvaCompBufferInfo array. If pamvaCompBufferInfo is NULL, the value of *pdwNumTypesCompBuffers must be zero.

On output, if pamvaCompBufferInfo is NULL, pdwNumTypesCompBuffers receives the size of array to allocate. Otherwise, pdwNumTypesCompBuffers receives the actual number of elements copied to the pamvaCompBufferInfo array.

[out] pamvaCompBufferInfo

Address of an array of AMVACompBufferInfo structures, or NULL. If the value is non-NULL, the method copies a list of AMVACompBufferInfo structures to this array. Each structure corresponds to one type of compressed data buffer used by the video accelerator.

Set all of the array elements to zero before calling this method.

Each array index corresponds to one of the DXVA surface types defined in dxva.h. The video accelerator will return a list of up to DXVA_NUM_TYPES_COMP_BUFFERS array entries. For details, refer to the DXVA 1.0 specification, section 3.4, "Buffer Description List." If a particular buffer type is not used by the DXVA profile in question, the entry at that index contains zeroes for all values.

Return value

Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.

Return code Description
E_FAIL
Failure.
E_INVALIDARG
Argument is invalid.
E_NOTIMPL
Method is not supported.
E_POINTER
NULL pointer argument.
S_OK
Success.
VFW_E_INVALIDSUBTYPE
The decoder did not use a DXVA decoding type when it connected to the video renderer.
VFW_E_NOT_CONNECTED
The pins on the decoder and video renderer filters are not connected.

Remarks

The AMVACompBufferInfo structure contains information that is needed for the IAMVideoAccelerator::GetBuffer method.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header videoacc.h
Library Strmiids.lib

See also

AMVACompBufferInfo Structure

Error and Success Codes

How Decoders Use IAMVideoAccelerator

IAMVideoAccelerator Interface