CSourceStream::GetMediaType
Fills out the fields of the CMediaType object 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 CMediaType object to be set to the requested format.
Return Values
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
DirectShow applications and DirectShow filters have different include file and link library requirements. See Setting Up the Build Environment for more information.
OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header:
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.