Share via


CBasePin::ConnectionMediaType (Compact 2013)

3/26/2014

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

Syntax

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 Value

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

Header

dshow.h,
Streams.h

Library

ole32.lib,
Ole32auth.lib,
Strmbase.lib,
Strmiids.lib,
uuid.lib

See Also

Reference

CBasePin Class