Microsoft DirectX 9.0

IGrabberSample::SetAcceptedMediaType

The implementation of this method is provided as sample code with the DirectShow SDK. It is not a supported DirectShow API.

The SetAcceptedMediaType method sets the media type for pin connection on the Grabber filter's input pin. This method is equivalent to the ISampleGrabber::SetMediaType method.

Syntax

HRESULT SetAcceptedMediaType(
    const CMediaType *pType
);

Parameters

pType

Pointer to a CMediaType object that specifies the media type. Use the value NULL to clear the media type that was set previously.

Return Value

This method returns an HRESULT value. Possible return codes include, but are not limited to, the values shown in the following table.

Value Description
E_OUTOFMEMORY Insufficient memory
S_OK Success

See Also