Microsoft DirectX 9.0

IAMStreamSelect::Info

The Info method retrieves information about a given stream.

Syntax

HRESULT Info(
  long lIndex,
  AM_MEDIA_TYPE **ppmt,
  DWORD *pdwFlags,
  LCID *plcid,
  DWORD *pdwGroup,
  WCHAR **ppszName,
  IUnknown **ppObject,
  IUnknown **ppUnk
);

Parameters

lIndex

[in] Zero-based index of the stream.

ppmt

[out] Address of a variable that receives a pointer to the stream's media type. This parameter is optional and can be NULL. If the value is non-NULL, the method returns a pointer to an AM_MEDIA_TYPE structure. The caller must delete the structure, including the format block. (You can use the DeleteMediaType function from the DirectShow base-class library.)

pdwFlags

[out] Pointer to a variable that receives one of the following values:

Value Description
Zero This stream is disabled.
AMSTREAMSELECTINFO_ENABLED The stream is enabled, and others in this group might be enabled too.
AMSTREAMSELECTINFO_EXCLUSIVE This stream is the only enabled stream in the group.

This parameter is optional and can be NULL.

plcid

[out] Pointer to a variable that receives a locale context (LCID) value. If the stream is associated with a particular locale, the LCID is returned in this variable. Otherwise, the variable receives the value zero. This parameter is optional and can be NULL.

pdwGroup

[out] Pointer to a variable that receives the logical group with which the stream is associated. This parameter is optional and can be NULL.

ppszName

[out] Address of a variable that receives a pointer to the stream name. The caller must free the returned string by calling the CoTaskMemFree function. This parameter is optional and can be NULL.

ppObject

[out] Address of a variable that receives an IUnknown interface pointer. The method might return a pointer to a pin or filter associated with the stream, or it might return the value NULL. If the method returns a non-NULL value, the caller must release the IUnknown pointer.

Calling the IAMStreamSelect::Enable method might invalidate the object returned by this method.

This parameter is optional and can be NULL.

ppUnk

[out] Address of a variable that receives an IUnknown interface pointer. The method might return a pointer to an interface that is specific to the stream, or it might return the value NULL. If the method returns a non-NULL value, the caller must release the IUnknown pointer. This parameter is optional and can be NULL.

Return Values

Returns an HRESULT value. Possible values include the following.

Value Description
E_FAIL Failure.
E_OUTOFMEMORY Insufficient memory.
S_FALSE The index is out of range.
S_OK Success.

See Also