[Mplayer-cvslog] CVS: main configure,1.159,1.160 open.c,1.10,1.11

Jürgen Keil jkeil at mplayer.dev.hu
Sun Sep 9 20:03:05 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv29213

Modified Files:
	configure open.c 
Log Message:
Add support for libdvdread-0.9.0


Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -r1.159 -r1.160
--- configure	1 Sep 2001 19:36:44 -0000	1.159
+++ configure	9 Sep 2001 18:02:49 -0000	1.160
@@ -943,7 +943,6 @@
 #include <dvdread/dvd_reader.h>
 #include <dvdread/ifo_types.h>
 #include <dvdread/ifo_read.h>
-#include <dvdread/dvd_udf.h>
 #include <dvdread/nav_read.h>
 int main( void ) { return 0; }
 EOF

Index: open.c
===================================================================
RCS file: /cvsroot/mplayer/main/open.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- open.c	22 Aug 2001 08:24:29 -0000	1.10
+++ open.c	9 Sep 2001 18:02:50 -0000	1.11
@@ -31,9 +31,22 @@
 #include <dvdread/dvd_reader.h>
 #include <dvdread/ifo_types.h>
 #include <dvdread/ifo_read.h>
-#include <dvdread/dvd_udf.h>
 #include <dvdread/nav_read.h>
-//#include <dvdread/nav_print.h>
+
+#define	DVDREAD_VERSION(maj,min,micro)	((maj)*10000 + (min)*100 + (micro))
+
+/*
+ * Try to autodetect the libdvd-0.9.0 library
+ * (0.9.0 removed the <dvdread/dvd_udf.h> header, and moved the two defines
+ * DVD_VIDEO_LB_LEN and MAX_UDF_FILE_NAME_LEN from it to
+ * <dvdread/dvd_reader.h>)
+ */
+#if defined(DVD_VIDEO_LB_LEN) && defined(MAX_UDF_FILE_NAME_LEN)
+#define	LIBDVDREAD_VERSION	DVDREAD_VERSION(0,9,0)
+#else
+#define	LIBDVDREAD_VERSION	DVDREAD_VERSION(0,8,0)
+#endif
+
 
 typedef struct {
     dvd_reader_t *dvd;
@@ -351,7 +364,11 @@
     if(data[38]==0 && data[39]==0 && data[40]==1 && data[41]==0xBF &&
        data[1024]==0 && data[1025]==0 && data[1026]==1 && data[1027]==0xBF){
 	// found a Navi packet!!!
+#if LIBDVDREAD_VERSION >= DVDREAD_VERSION(0,9,0)
+        navRead_DSI( &d->dsi_pack, &(data[ DSI_START_BYTE ]) );
+#else
         navRead_DSI( &d->dsi_pack, &(data[ DSI_START_BYTE ]), sizeof(dsi_t) );
+#endif
 	if(d->cur_pack != d->dsi_pack.dsi_gi.nv_pck_lbn ){
 	    mp_msg(MSGT_DVD,MSGL_V, "Invalid NAVI packet! lba=0x%X  navi=0x%X  \n",
 		d->cur_pack,d->dsi_pack.dsi_gi.nv_pck_lbn);




More information about the MPlayer-cvslog mailing list