[MPlayer-dev-eng] [PATCH] libdvdnav API changes
Jonas Jermann
jjermann at gmx.net
Wed Aug 7 17:39:16 CEST 2002
Hi
Afaik, just dvdnav_stream_change_event_t changed to
dvdnav_audio/spu/etc_stream_change_event_t and physical in
stream_change->physical to physical_wide, physical_letterbox and
physical_pan_scan (I set dvdsub_id to physical_wide, which is the
default afaik (?)...).
I included an ugly dvdnav version detection (configure) and
applied the changes from above to mplayer.c.
Could someone please overlook/check it before (if) it gets
commited (I don't know how to do such things). At least it
compiled for me after the patch.
Btw, libdvdnav is still unusable IMHO:
It freezed when I wanted to select the language
The buttons aren't highlighted/marked (did someone else get
highlighted buttons? I just got a text output)
Playback is slow (no cache, cd device settings didn't help)
Can't seek...
Skipopening didn't work for me
And of course many config things are missing (just possible
through the menu)
I hope that someone takes a look at it, mpdvdkit etc again
and improves dvd supprot for mplayer. This patch just let it
compile again...
Regards
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-dev-eng
mailing list