IDvdInfo2::GetAudioAttributes method (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The GetAudioAttributes method retrieves the attributes of the specified audio stream in the current title or menu.

Syntax

HRESULT GetAudioAttributes(
  [in]  ULONG               ulStream,
  [out] DVD_AudioAttributes *pATR
);

Parameters

[in] ulStream

Variable of type ULONG specifying the audio stream whose attributes you wish to query. See Remarks.

[out] pATR

Pointer to a DVD_AudioAttributes structure that is filled with the attributes of the specified audio stream.

Return value

Returns one of the following HRESULT values.

Return code Description
S_OK
Success.
E_UNEXPECTED
The DVD Navigator is not initialized.
VFW_E_DVD_NO_ATTRIBUTES
The stream's audio attributes are not available.
E_POINTER
Invalid argument.

Remarks

ulStream can be any index number from 0 through 7 or one of the following values:

Value Description
DVD_DEFAULT_AUDIO_STREAM To query for the attributes of the default audio stream.
DVD_STREAM_DATA_CURRENT To query the current stream.
DVD_STREAM_DATA_VMGM To query for the VMGM's audio attributes.
DVD_STREAM_DATA_VTSM To query for the VTSM's audio attributes.
 

The use of this method is demonstrated in the DVDSample application in CDvdCore::GetAudioAttributes and CAudioLangDlg::GetAudioLang.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)
Library Strmiids.lib

See also

DVD Applications

Error and Success Codes

IDvdInfo2 Interface