Compartilhar via


CTransformFilter::GetMediaType (Compact 2013)

3/26/2014

Returns one of the media types that the output pin supports (pure virtual).

Syntax

virtual HRESULT GetMediaType(
  int iPosition,
  CMediaType* pMediaType
) PURE;

Parameters

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

Return Value

Returns an HRESULT value by the overriding member function.

It returns VFW_S_NO_MORE_ITEMS when asked for a media type beyond the position list.

It might return S_FALSE to indicate that the media type exists but is not usable. In this case, the IEnumMediaTypes::Next method skips this media type.

Remarks

The derived class is responsible for implementing this member function and maintaining the list of media types that it supports.

The base transform class assumes that only the output pin proposes media types, because the output pin depends on the type of connection of the input pin. For this reason, it is only the CTransformOutputPin::GetMediaType member function of the output pin that is routed to this function.

Requirements

Header

dshow.h,
Streams.h

Library

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

See Also

Reference

CTransformFilter Class