Share via


CBasePin::AgreeMediaType

This member function is called during the connection process to enumerates the preferred data types between owning pin and the receiving pin of a connection.

virtual HRESULT AgreeMediaType(
  IPin* pReceivePin,
  const CMediaType* pmt
);

Parameters

  • pReceivePin
    Pointer to the receiving pin.
  • pmt
    Pointer to a media type object to be returned.

Return Values

Returns an HRESULT value, which can include one of the following values.

Value Description
NOERROR A media type was found.
VFW_E_NO_ACCEPTABLE_TYPES No agreement on a media type was reached.

Remarks

This member function is called during the connection process. It calls CBasePin::TryMediaTypes on both the owning pin and the pin connected to the owning pin; it enumerates the preferred data types on the pin. If one is found, TryMediaTypes tries the media type with the pin in a call to the CBasePin::ReceiveConnection member function. If this pin proposes a media type, its support is still verified by calling CBasePin::CheckMediaType. The enumerator can list all the media types, even if some of them are not currently available.

This member function is protected.

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.