Mercurial > mplayer.hg
changeset 34389:b2d661762e90
Retrieve DVD's titles, chapters and angles by stream control commands.
Don't access the private vmg_file member structure.
author | ib |
---|---|
date | Sat, 31 Dec 2011 12:55:28 +0000 |
parents | 9ee95c78e85f |
children | 9082a0976655 |
files | gui/interface.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/interface.c Sat Dec 31 12:45:46 2011 +0000 +++ b/gui/interface.c Sat Dec 31 12:55:28 2011 +0000 @@ -638,10 +638,13 @@ #ifdef CONFIG_DVDREAD case STREAMTYPE_DVD: + guiInfo.Tracks = 0; + stream_control(stream, STREAM_CTRL_GET_NUM_TITLES, &guiInfo.Tracks); + guiInfo.Chapters = 0; + stream_control(stream, STREAM_CTRL_GET_NUM_CHAPTERS, &guiInfo.Chapters); + guiInfo.Angles = 0; + stream_control(stream, STREAM_CTRL_GET_NUM_ANGLES, &guiInfo.Angles); dvd = stream->priv; - guiInfo.Tracks = dvd->vmg_file->tt_srpt->nr_of_srpts; - guiInfo.Chapters = dvd->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts; - guiInfo.Angles = dvd->vmg_file->tt_srpt->title[dvd_title].nr_of_angles; guiInfo.AudioStreams = dvd->nr_of_channels; memcpy(guiInfo.AudioStream, dvd->audio_streams, sizeof(dvd->audio_streams)); guiInfo.Subtitles = dvd->nr_of_subtitles;