IDvdControl2::PlayChaptersAutoStop 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 PlayChaptersAutoStop method plays the number of chapters specified, starting at the specified chapter within the specified title.

Syntax

HRESULT PlayChaptersAutoStop(
  [in]  ULONG   ulTitle,
  [in]  ULONG   ulChapter,
  [in]  ULONG   ulChaptersToPlay,
  [in]  DWORD   dwFlags,
  [out] IDvdCmd **ppCmd
);

Parameters

[in] ulTitle

Value that specifies the title in which the chapter is located; this value must be from 1 through 99.

[in] ulChapter

Value that specifies the chapter in the specified title where the DVD Navigator will start playback; this value must be from 1 through 999.

[in] ulChaptersToPlay

Number of chapters to play from the start chapter.

[in] dwFlags

Bitwise OR of one or more flags from the DVD_CMD_FLAGS enumeration, specifying how to synchronize the command.

[out] ppCmd

Receives a pointer to an IDvdCmd object that can be used to synchronize DVD commands. The caller must release the interface. This parameter can be NULL. For more information, see Synchronizing DVD Commands.

Return value

Returns one of the following values.

Return code Description
S_OK
Success.
E_UNEXPECTED
The DVD Navigator is not initialized or the title is not a One Sequential PGC Title.
E_INVALIDARG
The 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_GRAPHNOTREADY
The 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 Name Valid Domains
None. All.

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

IDvdControl2 Interface

Synchronizing DVD Commands