ISampleGrabber::GetConnectedMediaType

 
Microsoft DirectShow 9.0

ISampleGrabber::GetConnectedMediaType

The GetConnectedMediaType method retrieves the media type for the connection on the input pin of the Sample Grabber.

Syntax

  HRESULT GetConnectedMediaType(
  AM_MEDIA_TYPE *pType
);

Parameters

pType

Pointer to an AM_MEDIA_TYPE structure allocated by the caller.

Return Value

Returns one of the following values.

Return code Description
E_POINTER NULL pointer argument.
S_OK Success.
VFW_E_NOT_CONNECTED The filter is not connected.

Remarks

This method copies the media type into the AM_MEDIA_TYPE structure specified by pType. The caller must free the format block of the media type. You can use the CoTaskMemFree function, or the FreeMediaType function in the base-class library.

Requirements

Header: Include Qedit.h. This header file is not compatible with Microsoft® Direct3D® headers later than version 7.

Library: Use strmiids.lib.

See Also