[Mplayer-cvslog] CVS: main mplayer.c,1.448,1.449 configure,1.415,1.416 cfg-common.h,1.31,1.32
Arpi of Ize
arpi at mplayer.dev.hu
Thu Mar 28 21:39:47 CET 2002
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv9809
Modified Files:
mplayer.c configure cfg-common.h
Log Message:
DVDnav support patch by David Holm and Kees Cook <mplayer at outflux.net>
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.448
retrieving revision 1.449
diff -u -r1.448 -r1.449
--- mplayer.c 27 Mar 2002 03:45:55 -0000 1.448
+++ mplayer.c 28 Mar 2002 20:39:44 -0000 1.449
@@ -48,6 +48,9 @@
#include "codec-cfg.h"
#include "dvdauth.h"
+#ifdef USE_DVDNAV
+#include <dvdnav.h>
+#endif
#ifdef USE_DVDREAD
#include "spudec.h"
#endif
@@ -627,7 +630,7 @@
}
- if(!filename && !vcd_track && !dvd_title && !tv_param_on){
+ if(!filename && !vcd_track && !dvd_title && !dvd_nav && !tv_param_on){
if(!use_gui){
// no file/vcd/dvd -> show HELP:
mp_msg(MSGT_CPLAYER, MSGL_INFO, help_text);
@@ -1962,6 +1965,13 @@
break;
// quit
case KEY_ESC: // ESC
+#ifdef USE_DVDNAV
+ if(dvd_nav) {
+ printf("menu\n");
+ dvdnav_menu_call(stream->priv,DVD_MENU_Root);
+ break;
+ }
+#endif
case 'q':
exit_player(MSGTR_Exit_quit);
case KEY_ENTER: // ESC
@@ -2437,6 +2447,34 @@
if(sub_pos >100) sub_pos=100;
if(sub_pos <0) sub_pos=0;
} break;
+#ifdef USE_DVDNAV
+ case MP_CMD_DVDNAV: {
+ switch (cmd->args[0].v.i) {
+ case MP_CMD_DVDNAV_UP:
+ dvdnav_upper_button_select(stream->priv);
+ break;
+ case MP_CMD_DVDNAV_DOWN:
+ dvdnav_lower_button_select(stream->priv);
+ break;
+ case MP_CMD_DVDNAV_LEFT:
+ dvdnav_left_button_select(stream->priv);
+ break;
+ case MP_CMD_DVDNAV_RIGHT:
+ dvdnav_right_button_select(stream->priv);
+ break;
+ case MP_CMD_DVDNAV_MENU:
+ dvdnav_menu_call(stream->priv,DVD_MENU_Root);
+ break;
+ case MP_CMD_DVDNAV_SELECT:
+ dvdnav_button_activate(stream->priv);
+ break;
+ default:
+ mp_msg(MSGT_CPLAYER, MSGL_V, "Weird DVD Nav cmd %d\n",cmd->args[0].v.i);
+ break;
+ }
+ break;
+ }
+#endif
default : {
#ifdef HAVE_NEW_GUI
if ( ( use_gui )&&( cmd->id > MP_CMD_GUI_EVENTS ) ) guiGetEvent( guiIEvent,(char *)cmd->id );
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.415
retrieving revision 1.416
diff -u -r1.415 -r1.416
--- configure 27 Mar 2002 03:45:54 -0000 1.415
+++ configure 28 Mar 2002 20:39:44 -0000 1.416
@@ -207,6 +207,7 @@
--with-csslibdir=DIR libcss in DIR
--with-madlibdir=DIR libmad (libmad shared lib.) in DIR
--with-mlibdir=DIR libmlib (MLIB support) in DIR (Solaris only)
+ --with-libdvdnav=DIR libdvdnav in DIR
--with-win32libdir=DIR W*ndows DLL files in DIR
--with-xanimlibdir=DIR XAnim DLL files in DIR
--with-xvidcore=PATH path to XviD libcore.a (e.g: /opt/lib/libcore.a)
@@ -787,6 +788,7 @@
_vorbis=auto
_faad=auto
_css=auto
+_dvdnav=no
_dvdread=auto
_xanim=auto
_xinerama=auto
@@ -970,6 +972,10 @@
--language=*)
LINGUAS=`echo $ac_option | cut -d '=' -f 2`
;;
+ --with-libdvdnav=*)
+ _dvdnavdir=`echo $ac_option | cut -d '=' -f 2`
+ _dvdnav=yes
+ ;;
--with-win32libdir=*)
_win32libdir=`echo $ac_option | cut -d '=' -f 2`
@@ -2414,7 +2420,6 @@
echores "no"
fi
-
echocheck "DVD support (libdvdread - new style)"
if test "$_dvdread" = auto ; then
cat > $TMPC << EOF
@@ -2443,6 +2448,28 @@
echores "no"
fi
+echocheck "libdvdnav"
+if test "$_dvdnav" = yes ; then
+ cat > $TMPC <<EOF
+#include <dvdnav.h>
+int main(void) { dvdnav_t *dvd=0; return 0; }
+EOF
+ _dvdnav=no
+ cc_check $_inc_extra -I$_dvdnavdir $_ld_css -L$_dvdnavdir/.libs -ldvdnav && _dvdnav=yes
+fi
+if test "$_dvdnav" = yes ; then
+ _largefiles=yes
+ _def_dvdnav='#define USE_DVDNAV 1'
+ _ld_css="$_ld_css -L$_dvdnavdir/.libs -ldvdnav"
+ _inc_extra="$_inc_extra -I$_dvdnavdir"
+ _inputmodules="dvdnav $_inputmodules"
+ echores "yes"
+else
+ _def_dvdnav='#undef USE_DVDNAV'
+ _noinputmodules="dvdnav $_noinputmodules"
+ echores "no"
+fi
+
echocheck "zlib"
cat > $TMPC << EOF
#include <zlib.h>
@@ -3465,6 +3492,9 @@
/* DeCSS support using libcss */
$_def_css
+
+/* DVD navigation support using libdvdnav */
+$_def_dvdnav
/* Define this to enable MPEG 1/2 image postprocessing (requires FAST cpu!) */
#define MPEG12_POSTPROC 1
Index: cfg-common.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-common.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- cfg-common.h 26 Mar 2002 05:25:14 -0000 1.31
+++ cfg-common.h 28 Mar 2002 20:39:44 -0000 1.32
@@ -12,6 +12,9 @@
#else
{"vcd", "VCD support is NOT available on this system!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
#endif
+#ifdef USE_DVDNAV
+ {"dvdnav", &dvd_nav, CONF_TYPE_FLAG, 0, 0, 1},
+#endif
#ifdef USE_DVDREAD
{"dvd-device", &dvd_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"dvd", &dvd_title, CONF_TYPE_INT, CONF_RANGE, 1, 99, NULL},
More information about the MPlayer-cvslog
mailing list