IDvdInfo Interface

The IDvdInfo interface enables an application to query for attributes of available DVD titles and the DVD player status. It also allows for control of a DVD player beyond Annex J in the DVD specification.

Do not implement this interface; Microsoft® DirectShow® implements it for you.

Use this interface in your application to retrieve details about a DVD-Video or about the current state of the DVD player filter graph.

Methods in Vtable Order

IUnknown methodsDescription
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IDvdInfo methodsDescription
GetCurrentDomain Retrieves the current DVD domain of the DVD player.
GetCurrentLocation Retrieves the current playback location.
GetTotalTitleTime Retrieves the total playback time for the current title.
GetCurrentButton Retrieves the number of available buttons and the currently selected button number.
GetCurrentAngle Retrieves the number of available angles and the currently selected angle number.
GetCurrentAudio Retrieves the number of available audio streams and the number of the currently selected audio stream.
GetCurrentSubpicture Retrieves the number of available subpicture streams, the currently selected subpicture stream number, and whether the subpicture display is disabled.
GetCurrentUOPS Retrieves which IDvdControl methods are valid.
GetAllSPRMs Retrieves the current contents of all system parameter registers (SPRMs).
GetAllGPRMs Retrieves the current contents of all general parameter registers (GPRMs).
GetAudioLanguage Retrieves the language of the specified audio stream within the current title.
GetSubpictureLanguage Retrieves the language of the specified subpicture stream within the current title.
GetTitleAttributes Retrieves attributes of all video, audio, and subpicture streams for the specified title, including menus.
GetVMGAttributes Retrieves attributes of all video, audio, and subpicture streams for video manager (VMG) menus.
GetCurrentVideoAttributes Retrieves the current video attributes for the current title or menu.
GetCurrentAudioAttributes Retrieves the attributes for the current audio stream in the current title or menu.
GetCurrentSubpictureAttributes Retrieves the attributes for the current subpicture stream in the current title or menu.
GetCurrentVolumeInfo Retrieves the current DVD volume information.
GetDVDTextInfo Retrieves the TXTDT_MG structure, which can contain text descriptions for title name, volume name, producer name, vocalist name, and so on, in various languages.
GetPlayerParentalLevel Retrieves the current parental level and country code settings for the DVD player.
GetNumberOfChapters Retrieves the number of chapters that are defined for a given title.
GetTitleParentalLevels Retrieves the parental levels that are defined for a particular title.
GetRoot Retrieves the root directory that is set in the player.

IDvdInfo::GetAllGPRMs

IDvdInfo Interface

Retrieves the current contents of all general parameter registers (GPRMs).

Syntax

HRESULT GetAllGPRMs(
    GPRMARRAY *pRegisterArray
    );

Parameters

pRegisterArray
[out] Pointer to the retrieved array of general parameter registers.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method is valid in any domain. For more information, see DVD_DOMAIN.

Use of GPRMs is title specific. GPRMs are general parameter registers. For an explanation of GPRMs, see the DVD specifications.

IDvdInfo::GetAllSPRMs

IDvdInfo Interface

Retrieves the current contents of all system parameter registers (SPRMs).

Syntax

HRESULT GetAllSPRMs(
    SPRMARRAY *pRegisterArray
    );

Parameters

pRegisterArray
[out] Pointer to the retrieved array of system parameter registers.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method is valid in any domain. For more information, see DVD_DOMAIN.

For use of individual registers, see the DVD-Video specification.

IDvdInfo::GetAudioLanguage

IDvdInfo Interface

Retrieves the language of the specified audio stream within the current title.

Syntax

HRESULT GetAudioLanguage(
    ULONG nStream,
    LCID *pLanguage
    );

Parameters

nStream
[in] Stream number.
pLanguage
[out] Pointer to the retrieved language.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method returns an error unless the domain is DVD_DOMAIN_Title. For more information, see DVD_DOMAIN.

This method does not return languages for menus. This method sets the value pointed to by pLanguage to zero if the stream does not include language. Call the Win32 GetLocaleInfo function as follows to create a human-readable string name from pLanguage. LOCALE_SENGLANGUAGE is the locale information type, pszString is a pointer to a buffer to receive the requested data, and cbSize specifies the size of pszString.

GetLocaleInfo(*pLanguage, LOCALE_SENGLANGUAGE, pszString, cbSize);

IDvdInfo::GetCurrentAngle

IDvdInfo Interface

Retrieves the number of available angles and the currently selected angle number.

Syntax

HRESULT GetCurrentAngle(
    ULONG *pnAnglesAvailable,
    ULONG *pnCurrentAngle
    );

Parameters

pnAnglesAvailable
[out] Pointer to the retrieved number of available angles. If the value pointed to equals 1, then the current video does not contain multiple angles.
pnCurrentAngle
[out] Pointer to the retrieved current angle number.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

Angles are interleaved video streams that presumably contain the same scene shot from different camera angles.

This method returns an error unless the domain is DVD_DOMAIN_Title. For more information, see DVD_DOMAIN.

IDvdInfo::GetCurrentAudio

IDvdInfo Interface

Retrieves the number of available audio streams and the number of the currently selected audio stream.

Syntax

HRESULT GetCurrentAudio(
    ULONG *pnStreamsAvailable,
    ULONG *pnCurrentStream
    );

Parameters

pnStreamsAvailable
[out] Pointer to the retrieved number of available audio streams
pnCurrentStream
[out] Pointer to the current stream number.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method returns an error unless the domain is DVD_DOMAIN_Title. For more information, see DVD_DOMAIN.

IDvdInfo::GetCurrentAudioAttributes

IDvdInfo Interface

Retrieves the attributes for the current audio stream in the current title or menu.

Syntax

HRESULT GetCurrentAudioAttributes(
    DVD_AudioATR *pATR
    );

Parameters

pATR
[out] Pointer to the retrieved audio attributes.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method returns an error unless the domain is DVD_DOMAIN_VideoManagerMenu, DVD_DOMAIN_VideoTitleSetMenu, or DVD_DOMAIN_Title. For more information, see DVD_DOMAIN.

For information about the DVD_AudioATR data type, see the DVD-Video specification.

IDvdInfo::GetCurrentButton

IDvdInfo Interface

Retrieves the number of available buttons and the currently selected button number.

Syntax

HRESULT GetCurrentButton(
    ULONG *pnButtonsAvailable,
    ULONG *pnCurrentButton
    );

Parameters

pnButtonsAvailable
[out] Pointer to the number of buttons available.
pnCurrentButton
[out] Pointer to the number of the current button.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

If buttons are not present this method returns zero for both pnButtonsAvailable and pnCurrentButton.

This method is valid in any domain. For more information, see DVD_DOMAIN.

IDvdInfo::GetCurrentDomain

IDvdInfo Interface

Retrieves the current DVD domain of the DVD player.

Syntax

HRESULT GetCurrentDomain(
    DVD_DOMAIN *pDomain
    );

Parameters

pDomain
[out] Pointer to the current domain that is a member of the DVD_DOMAIN enumerated type.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method is valid in any domain. For more information, see DVD_DOMAIN.

IDvdInfo::GetCurrentLocation

IDvdInfo Interface

Retrieves the current playback location.

Syntax

HRESULT GetCurrentLocation(
    DVD_PLAYBACK_LOCATION *pLocation
    );

Parameters

pLocation
[out] Pointer to the retrieved playback location information in a DVD_PLAYBACK_LOCATION structure.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

The default implementation of this method returns E_UNEXPECTED if the current domain is not DVD_DOMAIN_Title.

Remarks

This method retrieves information sufficient to restart playback of a video from the current playback location in titles that don't explicitly disable seeking to the current location.

This method returns an error unless the domain is DVD_DOMAIN_Title. For more information, see DVD_DOMAIN.

IDvdInfo::GetCurrentSubpicture

IDvdInfo Interface

Retrieves the number of available subpicture streams, the currently selected subpicture stream number, and whether the subpicture display is disabled.

Syntax

HRESULT GetCurrentSubpicture(
    ULONG *pnStreamsAvailable,
    ULONG *pnCurrentStream,
    BOOL *pIsDisabled
    );

Parameters

pnStreamsAvailable
[out] Pointer to the retrieved number of available subpicture streams.
pnCurrentStream
[out] Pointer to the retrieved number of the currently selected subpicture stream.
pIsDisabled
[out] Pointer to a value indicating whether the subpicture display is disabled.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

Subpicture streams authored as forcedly activated streams will be displayed even if the application has disabled subpicture display with the IDvdControl::SubpictureStreamChange method.

This method returns an error unless the domain is DVD_DOMAIN_Title. For more information, see DVD_DOMAIN.

IDvdInfo::GetCurrentSubpictureAttributes

IDvdInfo Interface

Retrieves the attributes for the current subpicture stream in the current title or menu.

Syntax

HRESULT GetCurrentSubpictureAttributes(
    DVD_SubpictureATR *pATR
    );

Parameters

pATR
[out] Pointer to the retrieved subpicture attributes.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_FAIL The specified subpicture has no attributes.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.

Remarks

This method returns an error unless the domain is DVD_DOMAIN_VideoManagerMenu, DVD_DOMAIN_VideoTitleSetMenu, or DVD_DOMAIN_Title. For more information, see DVD_DOMAIN.

For information about DVD_SubpictureATR, see the DVD-Video specification.

IDvdInfo::GetCurrentUOPS

IDvdInfo Interface

Retrieves which IDvdControl methods are currently valid.

Syntax

HRESULT GetCurrentUOPS(
    VALID_UOP_SOMTHING_OR_OTHER *pUOP
    );

Parameters

pUOP
[out] Pointer to a DWORD value containing bits for all user operations (UOP). Each bit in the DWORD represents the state (valid or not valid) of a user operation. If the bit corresponding to a user operation is set, then that user operation is prohibited. For more information, see Remarks.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method is valid in any domain. For more information, see DVD_DOMAIN.

The value of pUOP is a bit field defined as follows:

Bit Flag User function
0 UOP_FLAG_Title_Or_Time_Play TitlePlay, TimePlay
1 UOP_FLAG_Chapter_Search_Or_Play ChapterSearch, ChapterPlay
2 UOP_FLAG_Title_Play TitlePlay
3 UOP_FLAG_Stop StopForResume
4 UOP_FLAG_GoUp GoUp
5 UOP_FLAG_Time_Or_Chapter_Search TimeSearch, ChapterSearch
6 UOP_FLAG_Prev_Or_Top_PG_Search PrevPGSearch, TopPGSearch
7 UOP_FLAG_Next_PG_Search NextPGSearch
8 UOP_FLAG_Forward_Scan ForwardScan
9 UOP_FLAG_Backward_Scan BackwardScan
10 UOP_FLAG_Title_Menu_Call MenuCall with a parameter value of 2 (DVD_MENU_Title)
11 UOP_FLAG_Root_Menu_Call MenuCall with a parameter value of 3 (DVD_MENU_Root)
12 UOP_FLAG_SubPic_Menu_Call MenuCall with a parameter value of 4 (DVD_MENU_Subpicture)
13 UOP_FLAG_Audio_Menu_Call MenuCall with a parameter value of 5 (DVD_MENU_Audio)
14 UOP_FLAG_Angle_Menu_Call MenuCall with a parameter value of 6 (DVD_MENU_Angle)
15 UOP_FLAG_Chapter_Menu_Call MenuCall with a parameter value of 7 (DVD_MENU_Chapter)
16 UOP_FLAG_Resume Resume
17 UOP_FLAG_Button_Select_Or_Activate UpperButtonSelect, LowerButtonSelect, LeftButtonSelect, RightButtonSelect, ButtonActivate, ButtonSelectAndActivate
18 UOP_FLAG_Still_Off StillOff
19 UOP_FLAG_Pause_On PauseOn, MenuLanguageSelect
20 UOP_FLAG_Audio_Stream_Change AudioStreamChange
21 UOP_FLAG_SubPic_Stream_Change SubpictureStreamChange
22 UOP_FLAG_Angle_Change AngleChange, ParentalLevelSelect
23 UOP_FLAG_Karaoke_Audio_Pres_Mode_Change KaraokeAudioPresentationModeChange
24 UOP_FLAG_Video_Pres_Mode_Change VideoModePreferrence

This method is useful because DVD titles can enable or disable individual user operations at almost any point during playback.

IDvdInfo::GetCurrentVideoAttributes

IDvdInfo Interface

Retrieves the current video attributes for the current title or menu.

Syntax

HRESULT GetCurrentVideoAttributes(
    DVD_VideoATR *pATR
    );

Parameters

pATR
[out] Pointer to the retrieved video attributes.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method returns an error unless the domain is DVD_DOMAIN_VideoManagerMenu, DVD_DOMAIN_VideoTitleSetMenu, or DVD_DOMAIN_Title. For more information, see DVD_DOMAIN.

For information about DVD_VideoATR, see the DVD-Video specification.

IDvdInfo::GetCurrentVolumeInfo

IDvdInfo Interface

Retrieves the current DVD volume information.

Syntax

HRESULT GetCurrentVolumeInfo(
    ULONG *pNumOfVol,
    ULONG *pThisVolNum,
    DVD_DISC_SIDE *pSide,
    ULONG *pNumOfTitles
    );

Parameters

pNumOfVol
[out] Pointer to the retrieved number of volumes in the volume set.
pThisVolNum
[out] Pointer to the retrieved volume number for this root directory.
pSide
[out] Pointer to the retrieved current disc side (DVD_DISC_SIDE).
pNumOfTitles
[out] Pointer to the retrieved number of titles available in this volume.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method is valid in any domain. For more information, see DVD_DOMAIN.

IDvdInfo::GetDVDTextInfo

IDvdInfo Interface

Retrieves the TXTDT_MG structure, which can contain text descriptions for title name, volume name, producer name, vocalist name, and so on, in various languages.

Syntax

HRESULT GetDVDTextInfo(
    BYTE *pTextManager,
    ULONG cbBufSize,
    ULONG *pcbActualSize
    );

Parameters

pTextManager
[out, size_is(cbBufSize)] Pointer to the retrieved text manager.
cbBufSize
[in] Size of the buffer for pTextManager, in bytes.
pcbActualSize
[out] Pointer to a value containing the number of bytes of data returned.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method is valid in any domain. For more information, see DVD_DOMAIN.

If the supplied buffer size in cbBufSize is too small for the data, (for example if cbBufSize equals zero), then this method returns E_OUTOFMEMORY and sets the value pointed to by pcbActualSize to the required size.

For more information, refer to Section 4.1.6 and Annex A of the DVD-Video specification.

IDvdInfo::GetNumberOfChapters

IDvdInfo Interface

Retrieves the number of chapters that are defined for a given title.

Syntax

HRESULT GetNumberOfChapters(
    ULONG ulTitle,
    ULONG *pNumberOfChapters
    );

Parameters

ulTitle
[in] Title for which to retrieve the number of chapters.
pNumberOfChapters
[out] Pointer to the retrieved number of chapters for the specified title.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method is valid in any domain. For more information, see DVD_DOMAIN.

IDvdInfo::GetPlayerParentalLevel

IDvdInfo Interface

Retrieves the current parental level and country code settings for the DVD player.

Syntax

HRESULT GetPlayerParentalLevel(
    ULONG *pParentalLevel,
    ULONG *pCountryCode
    );

Parameters

pParentalLevel
[out] Pointer to a value indicating the current parental level.
pCountryCode
[out] Pointer to a value indicating the current country code.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method is valid in any domain. For more information, see DVD_DOMAIN.

For the defined parental levels, see Table 3.3.4-1 of the DVD-Video specification .

Valid parental levels are 1 through 8 if parental management is enabled, 0xffffffff if parental management is disabled.

For the country codes, see ISO3166 : Alpha-2 Code.

IDvdInfo::GetRoot

IDvdInfo Interface

Retrieves the root directory that is set in the player.

Syntax

HRESULT GetRoot(
    LPSTR pRoot,
    ULONG cbBufSize,
    ULONG *pcbActualSize
    );

Parameters

pRoot
[out, size_is(cbBufSize)] Pointer to the buffer to receive the root string. Note that the root string uses ANSI characters, despite the COM convention for passing Unicode™-style strings.
cbBufSize
[in] Size of buffer passed in, in bytes.
pcbActualSize
[out] Pointer to a value containing the size of the actual data returned.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

If a valid root was found, this method returns the root string. Otherwise, it returns zero for pcbActualSize, indicating that a valid root directory has not been found or initialized.

IDvdInfo::GetSubpictureLanguage

IDvdInfo Interface

Retrieves the language of the specified subpicture stream within the current title.

Syntax

HRESULT GetSubpictureLanguage(
    ULONG nStream,
    LCID *pLanguage );

Parameters

nStream
[in] Stream number.
pLanguage
[out] Pointer to the retrieved language.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method returns an error unless the domain is DVD_DOMAIN_Title. For more information, see DVD_DOMAIN.

This method does not return languages for menus. This method sets the value pointed to by pLanguage to zero if the stream does not include language. Call the Win32 GetLocaleInfo function as follows to create a human-readable string name from pLanguage. LOCALE_SENGLANGUAGE is the locale information type, pszString is a pointer to a buffer to receive the requested data, and cbSize specifies the size of pszString.

GetLocaleInfo(*pLanguage, LOCALE_SENGLANGUAGE, pszString, cbSize);

IDvdInfo::GetTitleAttributes

IDvdInfo Interface

Retrieves attributes of all video, audio, and subpicture streams for the specified title, including menus.

Syntax

HRESULT GetTitleAttributes(
    ULONG nTitle,
    DVD_ATR *pATR );

Parameters

nTitle
[in] Requested title number. Specify 0xFFFFFFFF for the current title.
pATR
[out] Pointer to the retrieved attributes structure (DVD_ATR).

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method is valid in any domain. For more information, see DVD_DOMAIN.

IDvdInfo::GetTitleParentalLevels

IDvdInfo Interface

Retrieves the parental levels that are defined for a particular title.

Syntax

HRESULT GetTitleParentalLevels(
    ULONG ulTitle,
    ULONG *pParentalLevels
    );

Parameters

ulTitle
[in] Title for which parental levels are requested.
pParentalLevels
[out] Pointer to a logical OR combination of the parental levels defined for the title. A higher setting will block out more content than a lower setting. Valid parental levels are the following:

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method is valid in any domain. For more information, see DVD_DOMAIN.

IDvdInfo::GetTotalTitleTime

IDvdInfo Interface

Retrieves the total playback time for the current title.

Syntax

HRESULT GetTotalTitleTime(
    ULONG *pTotalTime
    );

Parameters

pTotalTime
[out] Pointer to the total time in DVD_TIMECODE format, which includes hours, minutes, seconds, and frames.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method returns an error unless the domain is DVD_DOMAIN_Title. For more information, see DVD_DOMAIN.

The method is restricted to simple linear movies by design.

IDvdInfo::GetVMGAttributes

IDvdInfo Interface

Retrieves attributes of all video, audio, and subpicture streams for video manager (VMG) menus.

Syntax

HRESULT GetVMGAttributes(
    DVD_ATR *pATR
    );

Parameters

pATR
[out] Pointer to the retrieved attributes structure (DVD_ATR).

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Typical return values might include one of the following:
E_FAIL Failure.
E_INVALIDARG Input argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Out of memory (insufficient buffer space).
E_POINTER NULL pointer argument.
E_UNEXPECTED DVD is not initialized or domain is not DVD_DOMAIN_Title.
VFW_E_DVD_OPERATION_INHIBITED Requested action cannot occur at this point in the movie due to the authoring of the current DVD-Video disc.
S_OK Success.
VFW_E_DVD_INVALIDDOMAIN Requested action is not supported on this domain (DVD_DOMAIN).

Remarks

This method is valid in any domain. For more information, see DVD_DOMAIN.

The video manager contains a separate group of streams, such as the DVD_MENU_Title menus, and the streams are not associated with any particular title number.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.