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
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.