Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Returns the media type for the output pin to use.

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 an HRESULTvalue that depends on the implementation of the pure virtual CTransformFilter::GetMediaTypemember function.

HRESULTcan include one of the following constants.

Value Description

NOERROR

A media type is returned.

S_FALSE

Although the iPositionparameter typically is valid, it does not correspond to a media type that is currently valid.

VFW_S_NO_MORE_ITEMS

The iPositionparameter is beyond the valid range.

Use other standard error values, such as E_INVALIDARG, for error cases.

Remarks

This member function overrides the CBasePin::GetMediaTypemember function and calls the pure virtual CTransformFilter::GetMediaTypemember function, which must be overridden to return media types supported by your filter.

This is part of the implementation of CBasePin::EnumMediaTypes.

Requirements

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment,
Version 2.12 requires DXPAK 1.0 or later