Microsoft Windows CE 3.0  

CSourceStream::GetMediaType

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.

Fills out the fields of the CMediaTypeobject to the supported media type.

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

Parameters

iPosition
Position of the media type within a list of multiple media types. Range is zero through n.
pMediaType
Pointer to a CMediaTypeobject to be set to the requested format.

Return Values

Returns one of the following HRESULTvalues.

Error Code Media type could not be set.
S_FALSE Media type exists but is not currently usable.
S_OK Media type was set.
VFW_S_NO_MORE_ITEMS End of the list of media types has been reached.

Remarks

This member function sets the requested media type. If only a single media type is supported, override this member function with the single-parameter definition. Only the default implementations of the CSourceStream::CheckMediaTypeand CSourceStream::GetMediaTypemember functions call the single media type member function.

Override the single-version GetMediaTypeor the two-parameter version, CheckMediaType.