次の方法で共有


CBasePin::SetMediaType (Compact 2013)

3/26/2014

Sets the m_mt data member to the established media type.

Syntax

virtual HRESULT SetMediaType(
  const CMediaType* pmt
);

Parameters

  • pmt
    Pointer to a media type object that was previously agreed on.

Return Value

Returns NOERROR by default implementation.

The overriding member functions return an HRESULT value.

Remarks

This member function is called to establish the format for a pin connection.

The CBasePin::CheckMediaType member function will have been called to check the connection format and, if it did not return an error value, this virtual member function will be called.

The default implementation sets the m_mt protected data member to the value passed to this member function. Override to inform the derived class when the media type is set.

Requirements

Header

dshow.h,
Streams.h

Library

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

See Also

Reference

CBasePin Class