changeset 33730:b4c64f168b29

Remove gui() GMP_SET_DVD. It is used only internally, so copy the code right there.
author ib
date Tue, 05 Jul 2011 11:34:26 +0000
parents ecee548a8f6b
children 81f71d910333
files gui/interface.c gui/interface.h gui/win32/interface.c
diffstat 3 files changed, 25 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Tue Jul 05 11:03:03 2011 +0000
+++ b/gui/interface.c	Tue Jul 05 11:34:26 2011 +0000
@@ -847,7 +847,18 @@
         switch (guiInfo.StreamType) {
 #ifdef CONFIG_DVDREAD
         case STREAMTYPE_DVD:
-            gui(GMP_SET_DVD, stream->priv);
+            dvd = stream->priv;
+            guiInfo.DVD.titles   = dvd->vmg_file->tt_srpt->nr_of_srpts;
+            guiInfo.DVD.chapters = dvd->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts;
+            guiInfo.DVD.angles   = dvd->vmg_file->tt_srpt->title[dvd_title].nr_of_angles;
+            guiInfo.DVD.nr_of_audio_channels = dvd->nr_of_channels;
+            memcpy(guiInfo.DVD.audio_streams, dvd->audio_streams, sizeof(dvd->audio_streams));
+            guiInfo.DVD.nr_of_subtitles = dvd->nr_of_subtitles;
+            memcpy(guiInfo.DVD.subtitles, dvd->subtitles, sizeof(dvd->subtitles));
+            guiInfo.DVD.current_title   = dvd_title + 1;
+            guiInfo.DVD.current_chapter = dvd_chapter + 1;
+            guiInfo.DVD.current_angle   = dvd_angle + 1;
+            guiInfo.Track = dvd_title + 1;
             break;
 #endif
 
@@ -864,23 +875,6 @@
 
         break;
 
-#ifdef CONFIG_DVDREAD
-    case GMP_SET_DVD:
-        dvd = arg;
-        guiInfo.DVD.titles   = dvd->vmg_file->tt_srpt->nr_of_srpts;
-        guiInfo.DVD.chapters = dvd->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts;
-        guiInfo.DVD.angles   = dvd->vmg_file->tt_srpt->title[dvd_title].nr_of_angles;
-        guiInfo.DVD.nr_of_audio_channels = dvd->nr_of_channels;
-        memcpy(guiInfo.DVD.audio_streams, dvd->audio_streams, sizeof(dvd->audio_streams));
-        guiInfo.DVD.nr_of_subtitles = dvd->nr_of_subtitles;
-        memcpy(guiInfo.DVD.subtitles, dvd->subtitles, sizeof(dvd->subtitles));
-        guiInfo.DVD.current_title   = dvd_title + 1;
-        guiInfo.DVD.current_chapter = dvd_chapter + 1;
-        guiInfo.DVD.current_angle   = dvd_angle + 1;
-        guiInfo.Track = dvd_title + 1;
-        break;
-#endif
-
     case GMP_SET_AFILTER:
         guiInfo.afilter = arg;
         break;
--- a/gui/interface.h	Tue Jul 05 11:03:03 2011 +0000
+++ b/gui/interface.h	Tue Jul 05 11:34:26 2011 +0000
@@ -38,7 +38,6 @@
 #define GMP_X_EVENT            0
 #define GMP_SET_STATE          1
 #define GMP_RUN_COMMAND        2
-#define GMP_SET_DVD            3
 #define GMP_SET_AUDIO          6
 #define GMP_SETUP_VIDEO_WINDOW 8
 #define GMP_SET_STREAM         9
--- a/gui/win32/interface.c	Tue Jul 05 11:03:03 2011 +0000
+++ b/gui/win32/interface.c	Tue Jul 05 11:34:26 2011 +0000
@@ -485,7 +485,7 @@
 {
     stream_t *stream = arg;
 #ifdef CONFIG_DVDREAD
-    dvd_priv_t *dvdp = arg;
+    dvd_priv_t *dvdp;
 #endif
     if(!mygui || !mygui->skin) return 0;
 
@@ -576,29 +576,23 @@
             {
 #ifdef CONFIG_DVDREAD
                 case STREAMTYPE_DVD:
-                    gui(GMP_SET_DVD, stream->priv);
+                    dvdp = stream->priv;
+                    guiInfo.DVD.titles = dvdp->vmg_file->tt_srpt->nr_of_srpts;
+                    guiInfo.DVD.chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts;
+                    guiInfo.DVD.angles = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles;
+                    guiInfo.DVD.nr_of_audio_channels = dvdp->nr_of_channels;
+                    memcpy(guiInfo.DVD.audio_streams, dvdp->audio_streams, sizeof(dvdp->audio_streams));
+                    guiInfo.DVD.nr_of_subtitles = dvdp->nr_of_subtitles;
+                    memcpy(guiInfo.DVD.subtitles, dvdp->subtitles, sizeof(dvdp->subtitles));
+                    guiInfo.DVD.current_title = dvd_title + 1;
+                    guiInfo.DVD.current_chapter = dvd_chapter + 1;
+                    guiInfo.DVD.current_angle = dvd_angle + 1;
+                    guiInfo.Track = dvd_title + 1;
                     break;
 #endif
             }
             break;
         }
-#ifdef CONFIG_DVDREAD
-        case GMP_SET_DVD:
-        {
-            guiInfo.DVD.titles = dvdp->vmg_file->tt_srpt->nr_of_srpts;
-            guiInfo.DVD.chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts;
-            guiInfo.DVD.angles = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles;
-            guiInfo.DVD.nr_of_audio_channels = dvdp->nr_of_channels;
-            memcpy(guiInfo.DVD.audio_streams, dvdp->audio_streams, sizeof(dvdp->audio_streams));
-            guiInfo.DVD.nr_of_subtitles = dvdp->nr_of_subtitles;
-            memcpy(guiInfo.DVD.subtitles, dvdp->subtitles, sizeof(dvdp->subtitles));
-            guiInfo.DVD.current_title = dvd_title + 1;
-            guiInfo.DVD.current_chapter = dvd_chapter + 1;
-            guiInfo.DVD.current_angle = dvd_angle + 1;
-            guiInfo.Track = dvd_title + 1;
-            break;
-        }
-#endif
         case GMP_REDRAW:
             mygui->updatedisplay(mygui, mygui->mainwindow);
             break;