Partager via


CTransInPlaceFilter::GetMediaType (Compact 2013)

3/26/2014

Retrieves the media type to be used by the output pin.

Syntax

HRESULT GetMediaType(
  int iPosition,
  CMediaType* pMediaType 
);

Parameters

  • iPosition
    Position of the media type in the media type list.
  • pMediaType
    Returned media type object.

Return Value

Returns E_UNEXPECTED because it is not expected to be called.

Remarks

In the CTransformFilter class, this member function is called by the associated input or output pin class's GetMediaType member function to retrieve the next media type in the list and return it to the pin's CBasePin::EnumMediaTypes member function.

However, in the CTransInPlaceFilter class, the pin classes override the CBasePin::EnumMediaTypes member function so that it bypasses the filter and calls the enumerator of the opposite connected pin.

(For example, the output pin enumerator uses the upstream filter's enumerator, and the input pin uses the connected downstream filter's enumerator.)

Therefore, this member function should never be called by the inplace pin classes. It is implemented to prevent undefined, pure virtual compiler warnings.

Requirements

Header

dshow.h,
Streams.h

Library

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

See Also

Reference

CTransInPlaceFilter Class