CSourceStream::GetMediaType
A version of this page is also available for
4/8/2010
Fills out the fields of the CMediaType object to the supported media type.
Syntax
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 CMediaType object to be set to the requested format.
Return Value
Returns one of the following HRESULT values.
Value | Description |
---|---|
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::CheckMediaType and CSourceStream::GetMediaType member functions call the single media type member function.
Override the single-version GetMediaType or the two-parameter version, CheckMediaType.
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 |