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.
A version of this page is also available for
4/8/2010

This method retrieves a preferred media type for a specified input stream.

Syntax

HRESULT GetInputType(
  DWORD 
dwInputStreamIndex,
  DWORD 
dwTypeIndex,
  DMO_MEDIA_TYPE* 
pmt
);

Parameters

dwInputStreamIndex

Zero-based index of an input stream on the DMO.

dwTypeIndex

Zero-based index on the set of acceptable media types.

pmt

[out] Pointer to a DMO_MEDIA_TYPEstructure allocated by the caller. The method fills the structure with the media type. The format block might be NULL, in which case the format type GUID is GUID_NULL.

Note: This parameter is handled differently for Windows and Windows Embedded CE.

Return Value

Returns an HRESULTvalue. Possible values include the following.

Value Description

S_OK

Success

DMO_E_INVALIDSTREAMINDEX

Invalid stream index

DMO_E_NO_MORE_ITEMS

Type index is out of range

E_OUTOFMEMORY

Insufficient memory

E_POINTER

NULL pointer argument

Remarks

Call this method to enumerate an input stream's preferred media types. The DMO assigns each media type an index value in order of preference. The most preferred type has an index of zero. To enumerate all the types, make successive calls while incrementing the type index until the method returns DMO_E_NO_MORE_ITEMS.

If the method succeeds, call MoFreeMediaTypeto free the format block.

To set the media type, call the IMediaObject::SetInputTypemethod.

Setting the media type on one stream can change another stream's preferred types. In fact, a stream might not have a preferred type until the type is set on another stream. For example, a decoder might not have a preferred output type until the input type is set.

The DMO is not required to update its preferred types dynamically in this fashion. Thus, the types returned by this method are not guaranteed to be valid; they might fail when used in the SetInputTypemethod.

Conversely, the DMO is not guaranteed to enumerate every media type that it supports. To test whether a media type is acceptable, call SetInputTypewith the DMO_SET_TYPEF_TEST_ONLY flag.

Requirements

Header dmo.h
Library Dmoguid.lib
Windows Embedded CE Windows CE .NET 4.1 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.