changeset 6971:6fc2e5d5f323

dvdnav api changed
author jonas
date Sun, 11 Aug 2002 17:14:41 +0000
parents 3263d686e99a
children 767cdf7b3cf2
files configure mplayer.c
diffstat 2 files changed, 28 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sun Aug 11 15:49:42 2002 +0000
+++ b/configure	Sun Aug 11 17:14:41 2002 +0000
@@ -3101,6 +3101,10 @@
   else
    _ld_css="$_ld_css -ldvdnav"
   fi
+  if test -n "$_dvdnavconfig" ; then
+   _dvdnav_version=`$_dvdnavconfig --version | sed "s/\.//g"`
+   _def_dvdnav_version="#define DVDNAVVERSION $_dvdnav_version"
+  fi
   if test -n "$_dvdnavdir" ; then
    _inc_extra="$_inc_extra -I$_dvdnavdir"
   fi
@@ -4412,6 +4416,7 @@
 
 /* DVD navigation support using libdvdnav */
 $_def_dvdnav
+$_def_dvdnav_version
 
 /* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
 #define MPEG12_POSTPROC 1
--- a/mplayer.c	Sun Aug 11 15:49:42 2002 +0000
+++ b/mplayer.c	Sun Aug 11 17:14:41 2002 +0000
@@ -2692,7 +2692,24 @@
         break;
         }
       case DVDNAV_SPU_STREAM_CHANGE: {
-        dvdnav_stream_change_event_t * stream_change=(dvdnav_stream_change_event_t*)(dvdnav_event->details);
+#if DVDNAVVERSION > 012
+        dvdnav_spu_stream_change_event_t *stream_change = (dvdnav_spu_stream_change_event_t*)(dvdnav_event->details);
+
+        printf("DVDNAV Event: Nav SPU Stream Change: phys: %d/%d/%d logical: %d\n",
+                stream_change->physical_wide,
+                stream_change->physical_letterbox,
+                stream_change->physical_pan_scan,
+                stream_change->logical);
+
+        if (vo_spudec && dvdsub_id!=stream_change->physical_wide) {
+                mp_msg(MSGT_INPUT,MSGL_DBG2,"d_dvdsub->id change: was %d is now %d\n",
+                        d_dvdsub->id,stream_change->physical_wide);
+                // FIXME: need a better way to change SPU id
+                d_dvdsub->id=dvdsub_id=stream_change->physical_wide;
+                if (vo_spudec) spudec_reset(vo_spudec);
+        }
+#else
+        dvdnav_stream_change_event_t *stream_change = (dvdnav_stream_change_event_t*)(dvdnav_event->details);
 
         printf("DVDNAV Event: Nav SPU Stream Change: phys: %d logical: %d\n",
                 stream_change->physical,
@@ -2705,12 +2722,16 @@
                 d_dvdsub->id=dvdsub_id=stream_change->physical;
                 if (vo_spudec) spudec_reset(vo_spudec);
         }
-
+#endif
         break;
         }
       case DVDNAV_AUDIO_STREAM_CHANGE: {
         int aid_temp;
+#if DVDNAVVERSION > 012
+        dvdnav_audio_stream_change_event_t *stream_change = (dvdnav_audio_stream_change_event_t*)(dvdnav_event->details);
+#else
         dvdnav_stream_change_event_t *stream_change = (dvdnav_stream_change_event_t*)(dvdnav_event->details);
+#endif
 
         printf("DVDNAV Event: Nav Audio Stream Change: phys: %d logical: %d\n",
                 stream_change->physical,