Microsoft DirectX 8.0

IDvdControl2 Interface

The Microsoft® DirectShow® DVD Navigator source filter exposes the IDvdControl2 interface to enable applications to navigate and play DVD-Video titles, including karaoke titles. After creating a DVD filter graph through the IDvdGraphBuilder interface, a DVD player application uses the methods of IDvdControl2 and IDvdInfo2 to send DVD commands to and retrieve state information from the DVD Navigator.

IDvdControl2 is a significant improvement over the older DVD control interface, IDvdControl. The new interface does not inherit from the old one; it encapsulates a completely new implementation. IDvdControl2 provides the full functionality required by the DVD Annex J specification, as well as methods for playback, menu navigation, and parental control.

For more information on writing a DVD player application using the DVD Navigator, including topics on the DVD filter graph, command synchronization, parental controls, menus, and karaoke support, see DVD Application and Decoder Development in DirectShow.

Methods by Category

IUnknown methodsDescription
QueryInterfaceRetrieves pointers to supported interfaces.
AddRefIncrements the reference count.
ReleaseDecrements the reference count.
IDvdControl2 methodsDescription
Playback
PausePauses or resumes playback at the current location.
PlayAtTimeStarts playback from the specified time in the current title.
PlayAtTimeInTitleStarts playback from the specified time in the specified title.
PlayBackwardsPlays backward at the specified speed from the current location.
PlayChapterStarts playback from the specified chapter in the current title.
PlayChapterInTitleStarts playback from the beginning of the specified chapter of the specified title.
PlayChaptersAutoStopPlays the number of chapters specified, starting at the specified chapter within the specified title.
PlayForwardsPlays forward at the specified speed from the current location.
PlayNextChapterStarts playback from the beginning of the next chapter in the current title.
PlayPeriodInTitleAutoStopStarts playback in the specified title from the specified start time until the specified end time.
PlayPrevChapterStarts playback from the beginning of the previous chapter in the current title.
PlayTitleStarts playback from the beginning of the specified title.
ReplayChapterStarts playback from the beginning of the current chapter.
StopStops playback of a title or menu by moving the DVD Navigator into the DVD Stop domain.
Menus
ActivateAtPositionActivates the menu button under the mouse pointer position.
ActivateButtonActivates the selected menu button.
ResumeLeaves a menu and resumes playback.
ReturnFromSubmenuReturns the display from a submenu to its parent menu.
SelectAtPositionHighlights the menu button under the mouse pointer position.
SelectAndActivateButtonSelects and activates the specified menu button.
SelectButtonSelects the specified menu button.
SelectDefaultMenuLanguageSets the default language for all menus and menu buttons.
SelectRelativeButtonSelects the specified relative button (upper, lower, right, left).
ShowMenuDisplays the specified menu, if available.
Video Stream
SelectAngleSets the new angle when the DVD Navigator is in an angle block.
StillOffResumes playback, canceling still mode.
SelectVideoModePreferenceSets the video mode display for subsequent playback—wide screen, letterbox, or pan-scan.
Audio Stream
SelectAudioStreamSelects the audio stream to play.
SelectDefaultAudioLanguageSets the default audio language.
SelectKaraokeAudioPresentationModeSends karaoke auxiliary channels to the left or right speaker.
Subpicture Stream
SelectDefaultSubpictureLanguageSets the default language for subpicture text.
SelectSubpictureStreamSets the subpicture stream to display.
SetSubpictureStateTurns the subpicture display on or off.
Parental Levels
AcceptParentalLevelChangeAccepts or rejects a request from the DVD Navigator to play content at a higher parental management level.
SelectParentalCountrySets the country for interpreting parental access levels and setting default languages.
SelectParentalLevelSets the parental access level for the logged-on user.
DVD Navigator Control
SetDVDDirectorySets the DVD drive that the DVD Navigator will read from.
SetOptionEnables or disables a DVD Navigator internal behavioral flag.
SetStateSaves the current disc position and state of the DVD Navigator for retrieval at a later time.
SetGPRMSets a general parameter register value.

IDvdControl2::AcceptParentalLevelChange

IDvdControl2 Interface

Accepts or rejects a request from the DVD Navigator to play content at a higher parental management level.

Syntax

HRESULT AcceptParentalLevelChange(
    BOOL bAccept
);

Parameters

bAccept
[in] Flag that indicates whether the application accepts the parental management level change. Specify TRUE to accept the change and play the higher-level content, or FALSE to reject the change.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

A temporary parental management level (PML) command is a marker on the DVD disc indicating that the content that follows has a PML higher than the level specified for the title as a whole. This marker also contains instructions on where to branch depending on whether the change is accepted or rejected. If you specify FALSE, the DVD Navigator follows the rejected branch on the disc. If you specify TRUE, the DVD Navigator follows the branch to the higher-level content.

Use AcceptParentalLevelChange in conjunction with the SetOption method. The sequence of events is as follows: First, call SetOption(DVD_NotifyParentalLevelChange, TRUE) to tell the DVD Navigator to always wait after sending an EC_DVD_PARENTAL_LEVEL_CHANGE event notification to the application. In your event handler, implement code to determine whether to accept or reject the change, and then call AcceptParentalLevelChange to notify the DVD Navigator of the decision.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
NoneAll

See Also

Enforcing Parental Management Levels

IDvdControl2::ActivateAtPosition

IDvdControl2 Interface

Activates the menu button under the mouse pointer position.

Syntax

HRESULT ActivateAtPosition(
    POINT point
);

Parameters

point
[in] Point on the client window area, in screen pixel coordinates.

Return Value

Returns one of the following values.
S_OKThe click occurred in the highlighted button rectangle, and the button was successfully activated.
E_INVALIDARGThe point lies outside the valid video region.
E_UNEXPECTEDThe button is present but is not working.
VFW_E_DVD_INVALIDDOMAINThe DVD Navigator is not in a menu domain.
VFW_E_DVD_NO_BUTTONThere is no menu button under the mouse pointer position.
VFW_E_DVD_OPERATION_INHIBITEDThe operation is inhibited by user operation (UOP) control.

Remarks

The mouse pointer coordinates are relative to the upper left of the client area, which isn't necessarily the video display area if the video is in letterbox format.

Use this method when the user is navigating through a menu by moving the mouse pointer directly over the menu buttons. If the user is using the relative buttons to navigate the menu, use ActivateButton rather than ActivateAtPosition.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
NoneDVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu

See Also

Working With DVD Menus

IDvdControl2::ActivateButton

IDvdControl2 Interface

Activates the selected menu button.

Syntax

HRESULT ActivateButton(void);

Return Value

Returns one of the following values.
S_OKSuccess.
VFW_E_DVD_INVALIDDOMAINThe DVD Navigator is in an invalid domain.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the DVD Navigator from entering a paused state.
VFW_E_DVD_NO_BUTTONNo button is selected.

Remarks

An application might or might not have four relative buttons on the side of the video display to represent the buttons on a physical remote control. These enable a user to select menu buttons but not activate them. A fifth button is required to activate the selected button. Call ActivateButton in response to a mouse click on the fifth button.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Button_ActivateDVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title

See Also

Working With DVD Menus

IDvdControl2::Pause

IDvdControl2 Interface

Pauses or resumes playback at the current location.

Syntax

HRESULT Pause(
    BOOL bState
);

Parameters

bState
[in] Value of type Boolean that specifies whether to pause playback; TRUE means to pause.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_INVALIDDOMAINInvalid domain.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the DVD Navigator from entering a paused state.

Remarks

Putting the DVD Navigator into a paused state freezes playback and any internal timers, similar to IMediaControl2::Pause. If the filter graph is not running, this method does nothing.

This method is demonstrated in the DVDSample application in CDvdCore::Pause.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
PauseOn/PauseOff DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title

IDvdControl2::PlayAtTime

IDvdControl2 Interface

Starts playback from the specified time in the current title.

Syntax

HRESULT PlayAtTime(
    DVD_HMSF_TIMECODE *pTime,
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

pTime
[in] Pointer to a DVD_HMSF_TIMECODE structure that specifies the time at which to start playback.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGInvalid argument.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

This method is demonstrated in the DVDSample application in CDvdCore::PlayTime.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Time_Search DVD_DOMAIN_Title

See Also

Synchronizing DVD Commands

IDvdControl2::PlayAtTimeInTitle

IDvdControl2 Interface

Starts playback from the specified time in the specified title.

Syntax

HRESULT PlayAtTimeInTitle(
    ULONG uiTitle,
    DVD_HMSF_TIMECODE *pTime,
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

uiTitle
[in] Value that specifies the number of the title to play; this value must be from 1 through 99.
pTime
[in] Pointer to a DVD_HMSF_TIMECODE structure that specifies where playback will begin.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.
E_INVALIDARGInvalid argument.

Remarks

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J command nameValid domains
Time_Play DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title
DVD_DOMAIN_Stop

See Also

Synchronizing DVD Commands

IDvdControl2::PlayBackwards

IDvdControl2 Interface

Plays backward at the specified speed from the current location.

Syntax

HRESULT PlayBackwards(
    double dwSpeed,
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

dwSpeed
[in] Value that specifies the speed of backward play. This value is a multiplier, where 1.0 is the authored speed. So, a value of 2.5 plays backward at two and one-half times the authored speed, while a value of 0.5 plays backward at half the authored speed. The actual speed of playback depends on the video decoder's capabilities and might differ from the specified rate. For reverse play, audio is muted and no subpicture is displayed. Any speed below 0.00001 is converted to 0.00001.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

This method is demonstrated in the DVDSample application in CDvdCore::Rewind. For playing backwards one frame at a time, use the IVideoFrameStep interface as demonstrated in the sample application in CDvdCore::FrameStep.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Backward_ScanDVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title

IDvdControl2::PlayChapter

IDvdControl2 Interface

Starts playback from the specified chapter in the current title.

Syntax

HRESULT PlayChapter(
    ULONG ulChapter,
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

ulChapter
[in] Value that specifies the chapter in the current title where the DVD Navigator will start playback; this value must be from 1 through 999.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.
E_INVALIDARGInvalid argument.

Remarks

The DVD Navigator begins playback at the specified chapter and continues to the subsequent chapters. Use PlayChaptersAutoStop to play the current chapter only.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

This method is demonstrated in the DVDSample application in CDvdCore::PlayChapter.
Annex J Command NameValid Domains
PTT_Search DVD_DOMAIN_Title

See Also

Synchronizing DVD Commands

IDvdControl2::PlayChapterInTitle

IDvdControl2 Interface

Starts playback from the beginning of the specified chapter of the specified title.

Syntax

HRESULT PlayChapterInTitle(
    ULONG ulTitle,
    ULONG ulChapter,
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

ulTitle
[in] Value that specifies the title in which the chapter is located; this value must be from 1 through 99.
ulChapter
[in] Value that specifies the chapter in the specified title where the DVD Navigator will start playback; this value must be from 1 through 999.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.
E_INVALIDARGInvalid argument.

Remarks

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

This method is demonstrated in the DVDSample application in CDvdCore::PlayChapterInTitle.
Annex J Command NameValid Domains
PTT_Play DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title
DVD_DOMAIN_Stop

See Also

Synchronizing DVD Commands

IDvdControl2::PlayChaptersAutoStop

IDvdControl2 Interface

Plays the number of chapters specified, starting at the specified chapter within the specified title.

Syntax

HRESULT PlayChaptersAutoStop(
    ULONG ulTitle,
    ULONG ulChapter,
    ULONG ulChaptersToPlay,
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

ulTitle
[in] Value that specifies the title in which the chapter is located; this value must be from 1 through 99.
ulChapter
[in] Value that specifies the chapter in the specified title where the DVD Navigator will start playback; this value must be from 1 through 999.
ulChaptersToPlay
[in] Number of chapters to play from the start chapter.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
E_UNEXPECTEDThe DVD Navigator is not initialized or the title is not a One Sequential PGC Title.
E_INVALIDARGThe ulTitle value does not exist or is greater than the number of titles, or ulChapter does not exist or is greater than the number of chapters, or ulChapter plus ulChaptersToPlay is greater than the number of chapters.
VFW_E_DVD_GRAPHNOTREADYThe graph is not in a running state.

Remarks

This method works only on One_Sequential_PGC_Titles. When the specified number of chapters have been played, the DVD Navigator sends the application an EC_DVD_CHAPTER_AUTOSTOP event notification.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
None. All.

See Also

EC_DVD_CHAPTER_AUTOSTOP, Synchronizing DVD Commands

IDvdControl2::PlayForwards

IDvdControl2 Interface

Plays forward at the specified speed from the current location.

Syntax

HRESULT PlayForwards(
    double dwSpeed,
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

dwSpeed
[in] Value that specifies the playback speed. This value is a multiplier, where 1.0 is the authored speed, so a value of 2.5 plays at two and one-half times the authored speed, while a value of 0.5 plays at half the authored speed. The actual speed of playback depends on the capabilities of the video decoder.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

This method is demonstrated in the DVDSample application in CDvdCore::FastForward.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Forward_Scan DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title

IDvdControl2::PlayNextChapter

IDvdControl2 Interface

Starts playback from the beginning of the next chapter in the current title.

Syntax

HRESULT PlayNextChapter(
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

After playing the next chapter, the DVD Navigator continues playing, following the branching instructions on the disc. To play only the next chapter, call PlayChaptersAutoStop.

This method is demonstrated in the DVDSample application in CDvdCore::NextChapter.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
NextPG_Search DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title

See Also

Synchronizing DVD Commands

IDvdControl2::PlayPeriodInTitleAutoStop

IDvdControl2 Interface

Starts playback in the specified title from the specified start time until the specified end time.

Syntax

HRESULT PlayPeriodInTitleAutoStop(
    ULONG ulTitle
    DVD_HMSF_TIMECODE *pStartTime
    DVD_HMSF_TIMECODE *pEndTime
    DWORD dwFlags
    IDvdCmd **ppCmd
);

Parameters

ulTitle
[in] Value that specifies the title; this value must be from 1 through 99.
pStartTime
[in] Pointer to a DVD_HMSF_TIMECODE structure that specifies the time at which to start playing.
pEndTime
[in] Pointer to a DVD_HMSF_TIMECODE structure that specifies the time at which to stop playing.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
Pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.
E_INVALIDARGInvalid argument.

Remarks

The actual start and end times are the times before or equal to the frame number specified in the DVD_HMSF_TIMECODE. The frame rate code is ignored on pStartTime and pEndTime.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
None DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title
DVD_DOMAIN_Stop

See Also

Synchronizing DVD Commands

IDvdControl2::PlayPrevChapter

IDvdControl2 Interface

Starts playback from the beginning of the previous chapter in the current title.

Syntax

HRESULT PlayPrevChapter(
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

dwFlags
Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
Pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

This method is demonstrated in the DVDSample application in CDvdCore::PrevChapter.
Annex J Command NameValid Domains
PrevPG_Search DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title

See Also

Synchronizing DVD Commands

IDvdControl2::PlayTitle

IDvdControl2 Interface

Starts playback from the beginning of the specified title.

Syntax

HRESULT PlayTitle(
    ULONG uiTitle
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

uiTitle
Value that specifies the title number; this value must be from 1 through 99.
dwFlags
Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
Pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.
E_INVALIDARGInvalid argument.

Remarks

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Title_Play DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title
DVD_DOMAIN_Stop

See Also

Synchronizing DVD Commands

IDvdControl2::ReplayChapter

IDvdControl2 Interface

Starts playback from the beginning of the current chapter.

Syntax

HRESULT ReplayChapter(
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

dwFlags
Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
Pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
TopPG_Search DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title

See Also

Synchronizing DVD Commands

IDvdControl2::Resume

IDvdControl2 Interface

Leaves a menu and resumes playback.

Syntax

HRESULT Resume(
    DWORD dwFlags,
    IDvdCmd **ppCmd
    );

Parameters

dwFlags
Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
Pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.
VFW_E_DVD_NO_RESUME_INFORMATIONResume was called from the Video Manager Menu.

Remarks

This method returns to playback from the location where play left off.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

This method is demonstrated in the DVDSample application in CDvdCore::RootMenu and CDvdCore::TitleMenu.
Annex J Command NameValid Domains
Resume DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Stop

IDvdControl2::ReturnFromSubmenu

IDvdControl2 Interface

Returns the display from a submenu to its parent menu.

Syntax

HRESULT ReturnFromSubmenu(
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

dwFlags
Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
Pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

If the DVD Navigator is at the top-level menu, this method calls the Resume method so that play continues where it left off.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
GoUP DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title

See Also

Synchronizing DVD Commands, Working With DVD Menus

IDvdControl2::SelectAndActivateButton

IDvdControl2 Interface

Selects and activates the specified menu button.

Syntax

HRESULT SelectAndActivateButton(
    ULONG ulButton
);

Parameters

ulButton
[in] Value from 1 through 36 that specifies the button to select and activate.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGulButton is out of range.
E_UNEXPECTEDThe ulButton value is valid, but the DVD Navigator filter couldn't activate it.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Button_Select_And_Activate DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title

See Also

Working With DVD Menus

IDvdControl2::SelectAngle

IDvdControl2 Interface

Sets the new angle when the DVD Navigator is in an angle block.

Syntax

HRESULT SelectAngle(
    ULONG ulAngle,
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

ulAngle
[in] Value of the new angle, which must be from 1 through 9.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGulAngle is out of range.
VFW_E_DVD_INVALIDDOMAINThe DVD Navigator is in the First Play domain.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

Note that angle and menu button indexes are one-based while audio stream and subpicture stream indexes are zero-based.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Angle_Change DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title
DVD_DOMAIN_Stop

See Also

DVD Domains

IDvdControl2::SelectAtPosition

IDvdControl2 Interface

Highlights the menu button under the mouse pointer position.

Syntax

HRESULT SelectAtPosition(
    POINT point
);

Parameters

point
[in] Point on the screen, in screen pixel coordinates.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_NO_BUTTONNo button is present at the mouse pointer position.
VFW_E_DVD_INVALIDDOMAINThe DVD Navigator is in the Stop domain.

Remarks

Note that angle and menu button indexes are one-based while audio stream and subpicture stream indexes are zero-based.

Call ActivateButton in response to a mouse click when the pointer is over a menu button.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

This method is demonstrated in the DVDSample application in CDvdCore::OnMouseEvent.

Annex J Command NameValid Domains
None DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title
DVD_DOMAIN_FirstPlay

See Also

ActivateAtPosition, DVD Domains, Working With DVD Menus

IDvdControl2::SelectAudioStream

IDvdControl2 Interface

Selects the audio stream to play.

Syntax

HRESULT SelectAudioStream(
    ULONG ulAudio,
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

ulAudio
[in] Value that specifies the audio track to use, which must be an integral value from 0 through 7, or DVD_DEFAULT_AUDIO_STREAM to specify the default stream.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGulAudio is out of range, or doesn't correspond to an audio stream.
E_UNEXPECTEDThe ulAudio value is valid, but the DVD Navigator couldn't set it for some reason.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.
VFW_E_DVD_STREAM_DISABLEDThe specified stream is disabled.

Remarks

This method affects the audio of the current Video Title Set (VTS). When called from within a menu, this method sets the audio stream of the title from which the menu was called.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Audio_Stream_Change DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title
DVD_DOMAIN_Stop

IDvdControl2::SelectButton

IDvdControl2 Interface

Selects the specified menu button.

Syntax

HRESULT SelectButton(
    ULONG ulButton
);

Parameters

ulButton
[in] Value from 1 through 36 that specifies the button to select.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_INVALIDDOMAINThe DVD Navigator is in an invalid domain.
VFW_E_DVD_NO_BUTTONNo button is selected.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the DVD Navigator from entering a paused state.

Remarks

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Button_SelectDVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title

See Also

Working With DVD Menus

IDvdControl2::SelectDefaultAudioLanguage

IDvdControl2 Interface

Sets the default audio language.

Syntax

HRESULT SelectDefaultAudioLanguage(
    LCID Language
    DVD_AUDIO_LANG_EXT audioExtension
);

Parameters

Language
[in] Locale identifier that specifies the default language.
audioExtension
[in] DVD_AUDIO_LANG_EXT value that specifies the default audio language extension.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGThe audioExtension value is invalid.
VFW_E_DVD_INVALIDDOMAINThe DVD Navigator filter is not in the Stop domain.

Remarks

This method selects the default language and language extensions to use when the disc is played. For example, if Language is specified as 0x409 for English and audioExtension is specified as DVD_AUD_EXT_NotSpecified, the DVD Navigator will look for the basic audio stream in English. If audioExtension is specified as DVD_AUD_EXT_VisuallyImpaired, the DVD Navigator will first look for a special audio stream in English for people with low vision. If the default stream is not found on a disc, the DVD Navigator will select the closest match.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
None DVD_DOMAIN_Stop

IDvdControl2::SelectDefaultMenuLanguage

IDvdControl2 Interface

Sets the default language for all menus and menu buttons.

Syntax

HRESULT SelectDefaultMenuLanguage(
    LCID Language
);

Parameters

Language
Variable of type LCID that specifies the default language.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGInvalid argument.
VFW_E_DVD_INVALIDDOMAINThe DVD Navigator filter is not in a valid domain.

Remarks

This method selects the default text language to use for menus when the disc is played. For example, if Language is specified as 0x409 for U.S. English, the DVD Navigator tries to show U.S. English text in menus. If the default menu language is not found on a disc, the DVD Navigator selects the closest match.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
None DVD_DOMAIN_Stop

IDvdControl2::SelectDefaultSubpictureLanguage

IDvdControl2 Interface

Sets the default language for subpicture text.

Syntax

HRESULT SelectDefaultSubpictureLanguage(
    LCID Language
    DVD_SUBPICTURE_LANG_EXT subpictureExtension
);

Parameters

Language
[in] Locale identifier that specifies the default language.
subpictureExtension
[in] DVD_SUBPICTURE_LANG_EXT value that specifies the default subpicture extension.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGTLanguage is invalid.
VFW_E_DVD_INVALIDDOMAINThe DVD Navigator filter is not in a valid domain.

Remarks

This method selects the default language and format to use for subpictures and menus when the disc is played. For example, if Language is specified as 0x409 for U.S. English and subpictureExtension is specified as DVD_SP_EXT_Caption_Big, the DVD Navigator tries to show U.S. English text in the "big caption" format in subpictures. If the default language or language extension is not found on a disc, the DVD Navigator selects the closest match.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
None DVD_DOMAIN_Stop

IDvdControl2::SelectKaraokeAudioPresentationMode

IDvdControl2 Interface

Sends karaoke auxiliary channels to the left or right speakers.

Syntax

HRESULT SelectKaraokeAudioPresentationMode(
    ULONG ulMode
);

Parameters

ulMode
[in] Bitwise OR of DVD_KARAOKE_DOWNMIX flags indicating how to downmix the five karaoke channels to channels 0 and 1, which are usually output to the left and right speakers.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_INVALIDDOMAINThe DVD Navigator filter is in an invalid domain.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the current operation.

Remarks

When the DVD Navigator enters karaoke mode, it queries the audio decoder to discover whether it supports karaoke downmixing. If the decoder supports it, then channels 2 through 4 (the karaoke auxiliary channels with the guide vocals, guide melodies, and sound effects) are muted. Use this method to turn individual channels on or off and direct them to channels 0 and 1.

This method is demonstrated in the DVDSample application in CKaraokeDlg::DoModal.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Karaoke_Audio_Presentation_Mode_Change DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title
DVD_DOMAIN_Stop

IDvdControl2::SelectParentalCountry

IDvdControl2 Interface

Sets the country for interpreting parental access levels and setting default languages.

Syntax

HRESULT SelectParentalCountry(
    BYTE country[2]
);

Parameters

country
[in] Array of values of type BYTE that specifies the current country according to ISO 3166.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGInvalid argument.
VFW_E_DVD_INVALIDDOMAINThe DVD Navigator filter is not in a valid domain.

Remarks

The parental country determines the meaning of the eight generic parental levels as well as the default language for the soundtrack and menus. For details, see Enforcing Parental Management Levels.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Parental_Country_Select DVD_DOMAIN_Stop

See Also

IDvdControl2::SelectParentalLevel

IDvdControl2::SelectParentalLevel

IDvdControl2 Interface

Sets the parental access level for the logged-on user.

Syntax

HRESULT SelectParentalLevel(
    ULONG ulParentalLevel
);

Parameters

ulParentalLevel
Value that specifies the parental access level for the current user. For details, see Remarks.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGInvalid argument.
VFW_E_DVD_INVALIDDOMAINInvalid domain.

Remarks

There are eight generic parental levels defined in the DVD specification, numbered from 1 (most restrictive) through 8 (least restrictive). The meaning of these levels varies from region to region and depends on the current country (see SelectParentalCountry). For the United States and Canada (DVD Region 1), the suggested values are as follows:
Parental levelMeaning
1The rating is G, general.
3The rating is PG, parental guidance suggested.
4The rating is PG-13, parental guidance suggested, not recommended for those under 13.
6The rating is R, restricted.
7The rating is NC-17, not appropriate for those under 17.

This method sets the current user's access level; this access level determines what content the user can play. Higher levels can play lower-level content; lower levels can't play higher-level content. In other words, adults can watch child-safe content, but children can't watch adult content.

DVD player applications can enforce restrictions on the parental level setting, such as providing password protection for raising the current parental level. The application's user interface should have a way to set the level and to disable checking completely. Some discs might be authored to disallow even level 8, meaning that no level is valid and no one could watch the disc if parental management is enabled. On such discs, parental management must be disabled for the discs to be viewed. Parental management in the DVD Navigator filter is disabled by default.

To disable parental management after it has been enabled, pass 0xffffffff for ulParentalLevel.

This method is demonstrated in the DVDSample application in CDvdCore::SetParentalLevel.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Parental_Level_Select DVD_DOMAIN_Stop

IDvdControl2::SelectRelativeButton

IDvdControl2 Interface

Sets the specified relative button (upper, lower, right, or left).

Syntax

HRESULT SelectRelativeButton(
    DVD_RELATIVE_BUTTON buttonDir,
);

Parameters

buttonDir
DVD_RELATIVE_BUTTON value indicating the button to select.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_INVALIDDOMAINThe DVD Navigator filter is not in a valid domain.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
(Left/Right/Upper/Lower)_Button_Select DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title

See Also

DVD_RELATIVE_BUTTON, Working With DVD Menus

IDvdControl2::SelectSubpictureStream

IDvdControl2 Interface

Sets the subpicture stream to display.

Syntax

HRESULT SelectSubpictureStream(
    ULONG ulSubPicture,
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

ulSubPicture
Value that specifies the subpicture stream, which must be from 0 through 31, or 63.
0-31The stream is valid.
63The stream is the dummy stream, which means it is a muted, low-bitrate stream.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGulSubPicture is out of range or doesn't correspond to an SP stream.
E_UNEXPECTEDThe ulSubPicture parameter is valid, but DVD Navigator cannot set it for some other reason.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.
VFW_E_DVD_INVALIDDOMAINInvalid domain.
VFW_E_DVD_STREAM_DISABLEDThe specified stream is disabled.

Remarks

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Sub-picture_Stream_Change DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title
DVD_DOMAIN_Stop

See Also

Audio and Subpicture Streams

IDvdControl2::SelectVideoModePreference

IDvdControl2 Interface

Sets the specified video mode display (wide screen, letterbox, or pan-scan) for playback.

Syntax

HRESULT SelectVideoModePreference(
    ULONG ulPreferredDisplayMode
);

Parameters

ulPreferredDisplayMode
[in] Value that specifies the new display mode for DVD content. Member of the DVD_PREFERRED_DISPLAY_MODE enumerated data type.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGInvalid argument.
VFW_E_DVD_INVALIDDOMAINInvalid domain.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

This method changes the default video window's aspect ratio and can also specify a default aspect ratio conversion mechanism.

For anamorphic 16 x 9 source video, formed by stretching the 720 x 480 source video to a 16 x 9 aspect ratio.

Widescreen  The 16 x 9 source video should be placed and stretched into the largest 16 x 9 area of the client output window. The highlights are relative to the inside of the 16 x 9 area. Black bars should be added to either the top/bottom or to the sides to maintain a 16 x 9 area.

Pan Scan  The video shown is computed by taking a 4 x 3 subwindow from the stretched 16 x 9 video (the horizontal offset is provided in the MPEG-2 video's window's offset). The 4 x 3 subwindow is placed into the largest 4 x 3 area of the output client window. The highlight's coordinates are relative to the 4 x 3 output window (and have no relationship to the source 16 x 9 video). Black bars should be added to either the top/bottom or to the sides to maintain a 4 x 3 area.

Letterbox  A 4 x 3 display area is formed by taking the largest 4 x 3 area of the output client window. Black bars should be added to either the top/bottom or to the sides to maintain a 4 x 3 area. The source 16 x 9 video is placed in the largest 16 x 9 subwindow inside of the 4 x 3 subwindow. Black bars should be added to the top and bottom of the subwindow to maintain a 16 x 9 area. The highlight's coordinates are relative to the 4 x 3 subwindow (and have no relationship to the source 16 x 9 video). It is technically possible for a disk to specify a highlight that lies outside of the 16 x 9 area (but still in the 4 x 3 window).

For 4 x 3 video, the video is placed in the largest 4 x 3 output area of the output client window. Black bars should be added to either the top/bottom or to the sides to maintain a 4 x 3 area.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Video_PresentationMode_Change DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title
DVD_DOMAIN_Stop

IDvdControl2::SetDVDDirectory

IDvdControl2 Interface

Sets the DVD drive that the DVD Navigator filter will read from.

Syntax

HRESULT SetDVDDirectory(
    LPCWSTR  pszwPath
);

Parameters

pszwPath
[in] Variable of type LPCWSTR that specifies the path of the root directory.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGThe pszwPath parameter points to an invalid DVD path, or a DVD drive is not found while enumerating.
E_UNEXPECTEDThe DVD Navigator is not initialized.
S_FALSEThe pszwPath parameter is NULL and the DVD Navigator can't find any DVD volume.
VFW_E_DVD_INVALIDDOMAINInvalid domain. For details, see Remarks.

Remarks

If pszwPath is NULL, the DVD Navigator tries to select a DVD volume on any available drive. On startup, the DVD Navigator automatically looks for a drive, starting at drive C, with a VIDEO_TS folder in the root folder. It is therefore only necessary to call SetDVDDirectory when you have more than one DVD drive on a machine, or if your DVD drive letter is A or B. When specifying the path, include the video_ts folder.

SetDVDDirectory("e:\video_ts");

Some DVD volumes may have their video in a directory named something other than "video_ts." The general idea is that an additional "DVD volume" (the set of .IFO. VOB, and .BUP files that would normally be stored in the VIDEO_TS directory) can be placed in a subdirectory on the disc. By changing the root to point to this directory, MSWebDVD will operate on this separate DVD volume. A new set of menus, titles, etc. will be available, independent of the titles in the VIDEO_TS root, which will no longer be accessible. Such directories are called "hidden directories." The following example shows how to set a hidden directory as the root, where "hidden" is a placeholder for whatever name the disc authors have given to the directory.

SetDVDDirectory("d:\\webdvd\\hidden");

If the filter graph is running and the DVD Navigator finds a DVD in the directory specified by pszwPath, the DVD Navigator automatically begins playing the disc. This conforms with the DVD specification and ensures that the new disc is initialized properly. If you do not want the new disc to play automatically after SetDVDDirectory returns, you must set the DVD_ResetOnStop flag in SetOption to TRUE and stop the filter graph through a call to IMediaControl::Stop on the Filter Graph Manager. If DVD_ResetOnStop is set to FALSE, then SetDVDDirectory returns VFW_E_DVD_INVALIDDOMAIN.

This method is demonstrated in the DVDSample application in CDvdCore::SetDirectory.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
None DVD_DOMAIN_Stop

IDvdControl2::SetGPRM

IDvdControl2 Interface

Sets a general parameter register value.

Syntax

HRESULT SetGPRM(
    ULONG ulIndex
    WORD wValue
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

ulIndex
[in] Register index; may be a value from zero through 15.
wValue
[in] A 16-bit value contained in the specified register.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGThe ulIndex parameter is greater than 15 or any other of the input parameters are invalid.

Remarks

A DVD disc uses general parameter registers to store various types of information. By manually setting one or more of these registers, an application might be able to provide certain custom functionality. This is an advanced command and should not be used unless you have a thorough understanding of the DVD specification.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
none All

See Also

IDvdInfo2::GetAllGPRMs

IDvdControl2::SetOption

IDvdControl2 Interface

Enables or disables a DVD Navigator filter's internal behavioral flag.

Syntax

HRESULT SetOption(
    DVD_OPTION_FLAG flag
    BOOL bEnable
);

Parameters

flag
[in] DVD_OPTION_FLAG value that specifies the flag to alter. For details, see Remarks.
bEnable
[in] Variable of type BOOL that specifies whether to enable to disable flag. Set to TRUE to enable flag, or FALSE to disable it.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGThe flag value is not DVD_ResetOnStop or DVD_NotifyParentalLevelChange.

Remarks

Call SetOption with the desired flags immediately after creating an instance of the DVD Navigator and whenever you want to change any behaviors.
FlagMeaning
DVD_ResetOnStopSet to TRUE to cause the Navigator to enter the DVD Stop domain when the filter graph stops. This is the default behavior. When the Navigator resumes playback from the Stop domain, it starts at the beginning of the disc. This is not always the desired behavior, because the filter graph can be stopped unexpectedly if the screen resolution changes, a screen saver starts, the computer goes into suspend mode, or for some other reason. To prevent the Navigator from entering the DVD Stop domain when the graph makes a transition into a Stop state, set this flag to FALSE. This causes the Navigator, when the filter graph restarts, to resume playback from the point where it stopped.

Typically, an application should set this flag to FALSE right after or before calling IMediaControl::Run to start playback of a DVD-Video. It should set the flag to TRUE before calling IMediaControl::Stop in response to an explicit user command to Stop playback.

DVD_NotifyParentalLevelChangeTells the DVD Navigator whether the application should be notified when the Navigator encounters parental level changes on the disc. If this flag is set to TRUE, when the Navigator encounters a temporary parental management level command, it sends the application an EC_DVD_PARENTAL_LEVEL_CHANGE event and blocks until it receives the application's response through AcceptParentalLevelChange.

If you set the flag to FALSE, when the Navigator encounters a temporary parental management level command and the current parental level is too low, the Navigator automatically rejects it and branches to whatever path the disc specifies when such a command is rejected. An EC_DVD_PARENTAL_LEVEL_CHANGE event is sent telling the application what the required level should be. It is up to the application to stop playback, put up a password dialog box and restart the movie playback so that it can succeed on the next attempt.

DVD_HMSF_TimeCodeEventsSet this flag to TRUE to receive EC_DVD_CURRENT_HMSF_TIME time events in the DVD_HMSF_TIMECODE format instead of the earlier BCD format as passed with EC_DVD_CURRENT_TIME event. The DVD_HMSF_TIMECODE format is easier to work with. This flag defaults to FALSE to facilitate backward compatibility with applications that use the BCD format.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
None All

See Also

DVD Command Flags

IDvdControl2::SetState

IDvdControl2 Interface

Saves the current disc position and state of the DVD Navigator filter.

Syntax

HRESULT SetState(
    IDvdState*pState,
    DWORD    dwFlags,
    IDvdCmd  **ppCmd
);

Parameters

pState
[in] Pointer to the IDvdState interface on the object that contains the state information.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns S_OK if successful, or an HRESULT value otherwise.

Remarks

The DVD Navigator uses the location information in the given state object to restore the playback position to a specific location on the disc.

This method is demonstrated in the DVDSample application in CDvdCore::RestoreBookmark.

IDvdControl2::SetSubpictureState

IDvdControl2 Interface

Turns the subpicture display on or off.

Syntax

HRESULT SetSubpictureState(
    BOOL bState,
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

bState
[in] Boolean value that specifies whether the subpicture display is on; TRUE sets subpicture display on for subsequent playback.
dwFlags
[in] Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
[out] Address of a pointer to an IDvdCmd object that can be used to synchronize DVD commands.

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_INVALIDDOMAINThe DVD Navigator is in the First Play domain.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

Subpicture streams are typically used in menus for button text and sometimes button graphics, and in video playback for subtitles, credits, or other overlaid graphics. Do not confuse subpictures with closed captions; the latter are encoded within the video stream. In general, this method is intended for controlling subpicture display over video while the DVD Navigator filter is playing video in the DVD Title domain.

This method corresponds to the second parameter of the Annex J "Sub-picture_Stream_Change" command.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Sub-picture_stream_Change DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title
DVD_DOMAIN_Stop

See Also

SelectSubpictureStream

IDvdControl2::ShowMenu

IDvdControl2 Interface

Displays the specified menu, if available.

Syntax

HRESULT ShowMenu(
    DVD_MENU_ID MenuID
    DWORD dwFlags,
    IDvdCmd **ppCmd
);

Parameters

MenuID
[in] A DVD_MENU_ID value that specifies the menu to display.
dwFlags
Bit flag that contains one or more DVD_CMD_FLAGS values specifying command synchronization options.
ppCmd
Address of a pointer to an IDvdCmd object that can be used to synchronize commands to the DVD Navigator filter.

Return Value

Returns one of the following values.

S_OKSuccess.
E_INVALIDARGThe MenuID value is out of range.
VFW_E_DVD_INVALIDDOMAINInvalid domain.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

The Video Manager Menu (VMGM) should be accessible from the Title or the Video Title Set domains. The Video Title Set menus (VTSMs) might only be accessible through the VMGM. Any submenus under each VTSM (for chapters, angles, and audio and subpicture streams) are only accessible through that VTSM.

This method is demonstrated in the DVDSample application application in CDvdCore::RootMenu and CDvdCore::TitleMenu.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Menu_Call All.

See Also

Working With DVD Menus

IDvdControl2::StillOff

IDvdControl2 Interface

Resumes playback, canceling still mode.

Syntax

HRESULT StillOff(void);

Return Value

Returns one of the following values.

S_OKSuccess.
E_UNEXPECTEDThe DVD Navigator filter is in a menu domain and the menu has buttons.
VFW_E_DVD_INVALIDDOMAINInvalid domain.
VFW_E_DVD_OPERATION_INHIBITEDUOP control prohibits the operation.

Remarks

A still is a static image presented by the disc. It is not the same as the frozen display image that appears when the user clicks the Pause button. When the DVD Navigator encounters a still image, it sends the application an EC_DVD_STILL_ON message, goes into still-store mode displaying the image, and waits for StillOff to be called before resuming playback.

If the DVD Navigator is not in still-store mode, this method does nothing.

Although menus can be presented as stills, do not call this method while in a menu domain because the DVD Navigator will have no information on where to resume playback.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Still_Off DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title

IDvdControl2::Stop

IDvdControl2 Interface

Stops playback of a title or menu by moving the DVD Navigator into the DVD Stop domain.

Syntax

HRESULT Stop(void);

Return Value

Returns one of the following values.

S_OKSuccess.
VFW_E_DVD_INVALIDDOMAINInvalid domain.

Remarks

Calling this method puts the DVD Navigator into the Stop domain, but the DVD filter graph as a whole remains in a running state, ready to play at any time. From the Stop, domain the user can display a menu or initiate playback directly through any "Play" method.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command NameValid Domains
Stop DVD_DOMAIN_FirstPlay
DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title