[MPlayer-users] mplayer not compiling with dvdnav:(

Jonas Jermann jjermann at gmx.net
Fri Aug 9 14:00:02 CEST 2002


Hi

On Fri, Aug 09, 2002 at 08:35:57AM -0300, Paulo Dias wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> hi/2 all, mplayer can't compile with the new libdvdnav 0.1.3:(
> the output is:
> 
> make[1]: Leaving directory `/home/groo/cvs_downloads/mplayer/main'
> gcc -c -O4 -march=i686 -mcpu=i686 -pipe -ffast-math -fomit-frame-pointer 
> -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Ilibmpdemux -Iloader 
> -Ilibvo -I-I/usr/local/include -I/usr/local/include/dvdnav 
> -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include 
> -I/usr/X11R6/include  -o mplayer.o mplayer.c
> mplayer.c: In function `main':
> mplayer.c:1284: warning: assignment makes pointer from integer without a cast
> mplayer.c:1285: warning: assignment makes pointer from integer without a cast
> mplayer.c:2695: `dvdnav_stream_change_event_t' undeclared (first use in this 
> function)
> mplayer.c:2695: (Each undeclared identifier is reported only once
> mplayer.c:2695: for each function it appears in.)
> mplayer.c:2695: `stream_change' undeclared (first use in this function)
> mplayer.c:2695: parse error before `)'
> mplayer.c:2713: parse error before `)'
> make: *** [mplayer.o] Error 1
> 
> does anyone else has this behaviour? i'm using mplayer cvs 9/august/2002.
> thanks and keep up the good work:)

I hope the patch still works for current cvs otherwise :(

Bye, Jonas
-------------- next part --------------
--- mplayer.c	2002-08-06 17:51:23.000000000 +0200
+++ mplayer.c	2002-08-06 16:51:22.000000000 +0200
@@ -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,
--- configure	2002-08-06 17:52:15.000000000 +0200
+++ configure	2002-08-06 17:51:20.000000000 +0200
@@ -3083,6 +3083,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
@@ -4391,6 +4395,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


More information about the MPlayer-users mailing list