IMediaObject::GetOutputCurrentType method
The GetOutputCurrentType method retrieves the media type that was set for an output stream, if any.
Syntax
HRESULT GetOutputCurrentType(
DWORD dwOutputStreamIndex,
DMO_MEDIA_TYPE *pmt
);
Parameters
dwOutputStreamIndex
Zero-based index of an output stream on the DMO.
pmt
Pointer to a DMO_MEDIA_TYPE structure allocated by the caller. The method fills the structure with the media type.
Return value
Returns an HRESULT value. Possible values include those in the following table.
| Return code | Description |
|---|---|
|
Invalid stream index. |
|
Media type was not set. |
|
Insufficient memory. |
|
Success. |
Remarks
The caller must set the media type for the stream before calling this method. To set the media type, call the IMediaObject::SetOutputType method.
If the method succeeds, call MoFreeMediaType to free the format block.
Requirements
| Target Platform | Windows |
| Header | mediaobj.h (include Dmo.h) |
| Library | Dmoguids.lib |