Mercurial > mplayer.hg
comparison gui/win32/interface.c @ 34451:19277315b8c6
Retrieve DVD's titles, chapters and angles by stream control commands.
Don't access the private vmg_file member structure.
(This is missing in r34477.)
author | ib |
---|---|
date | Tue, 10 Jan 2012 12:04:50 +0000 |
parents | 2364585f3f1e |
children | 5a45efc630b8 |
comparison
equal
deleted
inserted
replaced
34450:74622554a386 | 34451:19277315b8c6 |
---|---|
665 guiInfo.StreamType = stream->type; | 665 guiInfo.StreamType = stream->type; |
666 switch(stream->type) | 666 switch(stream->type) |
667 { | 667 { |
668 #ifdef CONFIG_DVDREAD | 668 #ifdef CONFIG_DVDREAD |
669 case STREAMTYPE_DVD: | 669 case STREAMTYPE_DVD: |
670 guiInfo.Tracks = 0; | |
671 stream_control(stream, STREAM_CTRL_GET_NUM_TITLES, &guiInfo.Tracks); | |
672 guiInfo.Chapters = 0; | |
673 stream_control(stream, STREAM_CTRL_GET_NUM_CHAPTERS, &guiInfo.Chapters); | |
674 guiInfo.Angles = 0; | |
675 stream_control(stream, STREAM_CTRL_GET_NUM_ANGLES, &guiInfo.Angles); | |
670 dvdp = stream->priv; | 676 dvdp = stream->priv; |
671 guiInfo.Tracks = dvdp->vmg_file->tt_srpt->nr_of_srpts; | |
672 guiInfo.Chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts; | |
673 guiInfo.Angles = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles; | |
674 guiInfo.AudioStreams = dvdp->nr_of_channels; | 677 guiInfo.AudioStreams = dvdp->nr_of_channels; |
675 memcpy(guiInfo.AudioStream, dvdp->audio_streams, sizeof(dvdp->audio_streams)); | 678 memcpy(guiInfo.AudioStream, dvdp->audio_streams, sizeof(dvdp->audio_streams)); |
676 guiInfo.Subtitles = dvdp->nr_of_subtitles; | 679 guiInfo.Subtitles = dvdp->nr_of_subtitles; |
677 memcpy(guiInfo.Subtitle, dvdp->subtitles, sizeof(dvdp->subtitles)); | 680 memcpy(guiInfo.Subtitle, dvdp->subtitles, sizeof(dvdp->subtitles)); |
678 guiInfo.Chapter = dvd_chapter + 1; | 681 guiInfo.Chapter = dvd_chapter + 1; |