Compartilhar via


IDvdState Interface

 
Microsoft DirectShow 9.0

IDvdState Interface

The IDvdState interface saves the current DVD playback location and state.

This interface is implemented by the DvdState object, which is created by the DVD Navigator filter when an application calls IDvdInfo2::GetState to save the state of the user's session to disk, including playback location, parental level, and region. An application can use the IDvdState methods to query for this information, which is saved in a DvdState object.

The DvdState objects implement IPersist to enable saving to disk. For sample code showing how to save bookmarks, see Saving and Restoring DvdState Objects.

The DVD Navigator initializes the DvdState object with the current playback location on the DVD, the user's parental level, and the DVD region. An alternative approach is for the application to create the state object by calling CoCreateInstance:

CoCreateInstance(CLSID_DVDState, NULL, CLSCTX_INPROC_SERVER, 
    IID_IDvdState, (void **)ppState);

Call IDvdControl2::SetState to resume playback at a later time from the point where it left off when GetState was called, with the restored parental and region settings.

In addition to the methods inherited from IUnknown, the IDvdState interface exposes the following methods.

Method Description
GetDiscID Retrieves the unique identifier (ID) of the disc from which the bookmark was made.
GetParentalLevel Retrieves the user's parental level as saved in the DvdState object.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also