Microsoft DirectX 9.0

IMediaDet::get_StreamType

The get_StreamType method retrieves the globally unique identifier (GUID) for the media type of the current stream.

Syntax

HRESULT get_StreamType(
    GUID *pVal
);

Parameters

pVal

[out, retval] Pointer to a variable that receives the major type GUID for the media type.

Return Value

Returns an HRESULT value. Possible values include the following:

Value Description
S_OK Success.
E_INVALIDARG Invalid argument.
E_POINTER NULL pointer argument.

Remarks

This method retrieves the majortype member of the AM_MEDIA_TYPE structure. The AM_MEDIA_TYPE structure describes the format of the stream, and the majortype member is a GUID that indicates the general category, such as audio or video. For a video stream, the GUID is MEDIATYPE_Video. For audio, it is MEDIATYPE_Audio. To retrieve the entire AM_MEDIA_TYPE structure, call the IMediaDet::get_StreamMediaType method.

Before calling this method, set the file name and stream by calling IMediaDet::put_Filename and IMediaDet::put_CurrentStream.

If the media detector is in bitmap grab mode, this method returns E_INVALIDARG. For more information, see IMediaDet::EnterBitmapGrabMode.

Requirements

Header: Include Qedit.h. This header file is not compatible with Microsoft® Direct3D® headers later than version 7.

Library: Use strmiids.lib.

See Also