Share via


CBasePin::ConnectionMediaType

This member function returns information about the negotiated media type for the pin connection.

HRESULT ConnectionMediaType(
  AM_MEDIA_TYPE* pmt
);

Parameters

  • pmt
    Pointer to an AM_MEDIA_TYPE structure. If the pin is not connected, this structure is initialized to zero. Otherwise, the media type is returned in this parameter.

Return Values

Returns an HRESULT value.

Remarks

This member function implements the IPin::ConnectionMediaType method. It returns a copy of the AM_MEDIA_TYPE structure that was negotiated for the pin connection when the pin was connected.

This method fails if the pin is unconnected. The task allocator allocates the media type's format block. Use the task allocator to free the format block, for example by calling the Win32 CoTaskMemFree function.

Requirements

DirectShow applications and DirectShow filters have different include file and link library requirements. See Setting Up the Build Environment for more information.

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header:

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.