Playback Options

LEADTOOLS provides a variety of methods for handling DVD video playback. This topic describes the various options available to programmers for resuming and stopping playback; as well as more specialized methods such as forward/reverse playback, title The name for a group of related video files (called "Chapters") on your DVD. For example, for a DVD called "My Summer Vacation," you might have the titles "Water Skiing," "New Friends," and "Hiking." For each of those titles, you might have one or more different video files./chapter The name for each individual video file on a DVD. For example, under the title "Water Skiing", you might have the chapters "My first try," "My first wreck," and "My first jump." specific playback, and time based playback.

Resuming and Stopping Playback

There are several methods that apply to resuming or stopping DVD video playback. Depending on the situation, the programmer can call either the ltmmDVDControl.Pause, ltmmDVDControlResume, ltmmDVDControl.StillOff, or ltmmDVDControl.Stop Methods.

The ltmmDVDControl.Pause Method is unique among these methods in that it is the only one that can both pause and resume playback, depending on the boolean value the programmer passes into it. Calling ltmmDVDControl.Pause with the State parameter set to FALSE resumes the playback from the current location. Conversely, calling the ltmmDVDControl.Pause Method with the State parameter set to TRUE pauses the playback. Note that this method does support command synchronization.

When resuming playback from a menu, the programmer should call the ltmmDVDControl.Resume Method. Calling the Resume method exits the current menu and resumes playback at the point the user left off. This method resolves properly only when called in a menu the user accessed while in playback. Note that this method does not support command synchronization.

The ltmmDVDControl.StillOff Method relates specifically to still images. If the DVD Navigator receives a still image, it will automatically pause the playback and go into still-store mode. To resume playback, the programmer must call the ltmmDVDControl.StillOff method, which immediately cancels still mode and resumes playback from the current location. This method does nothing if called while the DVD Navigator is not in still-store mode. Note that this method does support command synchronization.

To halt DVD playback altogether, the programmer should call the ltmmDVDControl.Stop Method. Doing so immediately stops the playback of any title or menu by moving the DVD Navigator into the DVD Stop domain. Note that this method does support command synchronization.

Forward and Reverse Playback

The LEAD Multimedia COM includes methods that control both the playback speed and direction. Calling the ltmmDVDControl.PlayForwards Method plays the DVD video forward at the speed the programmer passes into the method. Conversely, calling the ltmmDVDControl.PlayBackwards Method reverses the playback direction, playing the DVD video backwards at the speed passed into the method. In both methods, the Speed parameter is a multiplier value. For example, passing in a value of 2.0 will play the DVD video back at twice normal speed, while passing in a value of 0.5 will play the DVD back at one half normal speed. These methods are useful in implementing a fast-forward or rewind feature in a DVD application. Note that neither the ltmmDVDControl.PlayForwards Method nor the ltmmDVDControl.PlayBackwards Method support command synchronization.

Title/Chapter specific Playback

Programmers have multiple options for developing specialized title and chapter specific playback solutions. The LEAD Multimedia COM provides several methods that pertain to DVD video playback within set chapters. The most basic of these is the ltmmDVDControl.PlayChapter Method, which the programmer calls to play a specific chapter within the current title. The programmer calls the ltmmDVDControl.ReplayChapter Method to restart the playback from the beginning of the current chapter. Calling the ltmmDVDControl.PlayNextChapter Method starts the playback from the beginning of the next chapter within the current title. Likewise, calling the ltmmDVDControl.PlayPrevChapter Method starts the playback from the beginning of the previous chapter within the current title.

In addition to the methods above, the LEAD Multimedia COM provides methods that control DVD video playback based upon titles. As above, the most basic of these is the ltmmDVDControl.PlayTitle Method, which the programmer calls to start playback from the beginning of a specific title. Calling the ltmmDVDControl.PlayChapterInTitle Method allows the programmer to specify both the title and the chapter within the title to begin playback from, effectively merging the functionality of the ltmmDVDControl.PlayChapter Method and the ltmmDVDControl.PlayTItle Method into a single method.

Finally, the programmer can play a specified number of chapters, beginning at a specified chapter within a specified title by calling the ltmmDVDControl.PlayChaptersAutoStop Method. Once the specified number of chapters have been played, the DVD Navigator halts playback by sending an Auto Stop notification to the application. Note that this method will only work with One_Sequential_PGC_Titles.

None of the above functions support command synchronization.

Time-based Playback

The LEAD Multimedia COM includes methods related to time-based DVD video playback. Calling the ltmmDVDControl.PlayAtTime Method allows the programmer to start the playback of the current title at the specified time. Similarly, the programmer can call the ltmmDVDControl.PlayAtTimeInTitle Method to begin the video playback at the specified time within the specified title.

To play back a specific length of video within a specific title, the programmer should call the ltmmDVDControl.PlayPeriodInTitleAutoStop Method. Calling this method allows the programmer to begin the video playback of a specified title at a specified start time and run it until a specified end time is reached. Note that the specified start time must precede the specified end time. Otherwise, the method will fail and return an error.

None of the above methods support command synchronization.

DVD Source Playback

The DVD Source object can be used as an alternative to the default DVD Navigator object when playing DVDs. This allows the DVD playback to function like normal file playback. For example, only selected titles/chapters are played without menus from beginning to end. This is referred to as the DVD playlist. The entire DVD playlist can be viewed, for all practical purposes, as a single multimedia file. Once a playlist is defined it has a fixed duration and all file positions are within this playlist.

To use the DVD Source object, instruct the convert or play module to use it by calling the  ltmmConvertCtrl.UseDVDSource Property or the ltmmPlayCtrl.UseDVDSource Property  set to TRUE. The next time a DVD image A set of files that contain all of the video and audio content for a DVD, organized with a table of contents (optional). See also: Title, Chapter, ISO Image An ISO image (.iso) is a disk image of a file system. It includes data files that are contained in the ISO image along with filesystem metadata. ISO images are an alternative to physical media for distribution of a "DVD" over the Internet. Most operating systems allow ISO images images to be "played" as if they were physical discs. See also: DVD Image.. is selected for playback, the DVD Source object will be used.

The default playlist is usually the main movie contained on the DVD. However, this might not be the case for some specialized DVDs. In order to program a custom playlist call the  ltmmConvertCtrl_GetSubObjectDispatch Method  or the  ltmmPlayCtrl.GetSubObjectDispatch Method with the ltmmConvert_Object_SourceFilter or ltmmPlay_Object_SourceFilter ObjType parameters. Then it is possible to query the return value for the ltmmDVDSource object.

The first thing to do is enumerate through the available titles. Obtain the number of titles by calling the  ltmmDVDSource.TitleCount Property. Use the  ltmmDVDSource.GetTitle Method to obtain a title.

Next, enumerate through the chapters contained in the title. Obtain the number of chapters by calling the  ltmmDVDTitle.ChapterCount property. Then retrieve information about any title by calling the  ltmmDVDTitle.GetChapter Method.

Use the ltmmDVDChapter.Selected.Property to determine whether a chapter is part of the current playlist or to make it one.

By default, no subpicture streams are enabled in the playlist. Enumerate and enable subpicture streams by using the ltmmDVDTitle.SubpictureStreamCount Property and the  ltmmDVDTitle.GetSubpictureStream Method. Similarly, select an alternative audio stream The portion of the file holding the audio data. The audio data might be compressed to save disk space. The data has to be decompressed using an audio decompressor oftware component which decompresses audio. It must be designed to work with ACM or DirectShow. Note that different compression methods require different decompressors. There is no universal decompressor capable of decoding all compressed streams. before you can play (hear) it. by using the ltmmDVDTitle.AudioStreamCount Property and the ltmmDVDTitle.GetAudioStream Method.

Once the playlist is set up, it can be played and converted just like any other multimedia file. The DVD Source object has the ability to import/export its playlists through the ltmmDVDSource.PlayList Property. This is useful for copying files between objects.