diff options
author | 2001-09-09 18:02:50 +0000 | |
---|---|---|
committer | 2001-09-09 18:02:50 +0000 | |
commit | 7b9aa1f1101c824b310c9295c041a5593487dd04 (patch) | |
tree | 7ae8ce367653b3437b1be19e4bc4014616fa9762 /open.c | |
parent | 9ba327c517a63b369439b7db3b595e9191ffb1c0 (diff) |
Add support for libdvdread-0.9.0
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1876 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'open.c')
-rw-r--r-- | open.c | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -31,9 +31,22 @@ int dvd_angle=1; #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 @@ read_next: 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); |