IDvdInfo2::GetKaraokeAttributes 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 GetKaraokeAttributes method retrieves the karaoke attributes of the specified audio stream in the current title or menu.

Syntax

HRESULT GetKaraokeAttributes(
  [in]  ULONG                 ulStream,
  [out] DVD_KaraokeAttributes *pAttributes
);

Parameters

[in] ulStream

Specifies the index of the audio stream whose attributes you want to query. See Remarks.

[out] pAttributes

Pointer to a DVD_KaraokeAttributes structure that is filled with the karaoke attributes.

Return value

Returns one of the following HRESULT values.

Return code Description
S_OK
Success.
E_POINTER
Invalid argument.
E_UNEXPECTED
The DVD Navigator is not initialized.
VFW_E_DVD_NOT_IN_KARAOKE_MODE
The specified stream is not in karaoke format.
VFW_E_DVD_INVALIDDOMAIN
The DVD Navigator is not in the title domain.
VFW_E_DVD_NO_ATTRIBUTES
The karaoke attributes for the specified stream are not available.

Remarks

This method does not explicitly return the number of channels in the stream. You can obtain that information through a call to IDvdInfo2::GetAudioAttributes. This method is demonstrated in the DVDSample application in CKaraokeDlg::DoModal.

The ulStream parameter may be a value from 0 through 7, or one of the following:

Value Description
DVD_STREAM_DATA_CURRENT (0x800) To query the currently selected audio stream.
DVD_DEFAULT_AUDIO_STREAM To query the default audio stream.

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