[DVDnav-discuss] [PATCH] [dvdread] Add support for Darwin hosts

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Apr 18 15:09:47 CEST 2007


Hello,
On Wed, Apr 18, 2007 at 10:50:20AM +0200, Diego 'Flameeyes' Petten? wrote:
> Index: src/dvdread/dvd_input.c
> ===================================================================
> --- src/dvdread/dvd_input.c	(revision 880)
> +++ src/dvdread/dvd_input.c	(working copy)
> @@ -287,10 +287,12 @@
>  #else
>    /* dlopening libdvdcss */
>  
> -#ifndef WIN32
> +#ifdef __APPLE__
> +  dvdcss_library = dlopen("libdvdcss.2.dylib", RTLD_LAZY);
> +#elif defined(WIN32)
> +  dvdcss_library = dlopen("libdvdcss.dll", RTLD_LAZY);
> +#else
>    dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
> -#else
> -  dvdcss_library = dlopen("libdvdcss.dll", RTLD_LAZY);
>  #endif
>  
>    if(dvdcss_library != NULL) {
> @@ -323,7 +325,7 @@
>        dvdcss_library = NULL;
>      } else if(!DVDcss_open  || !DVDcss_close || !DVDcss_title || !DVDcss_seek
>  	      || !DVDcss_read || !DVDcss_error || !dvdcss_version) {
> -      fprintf(stderr,  "libdvdread: Missing symbols in libdvdcss.so.2, "
> +      fprintf(stderr,  "libdvdread: Missing symbols in libdvdcss.so, "

Unrelated? Esp. since the linux name above still is with the .2.
Maybe just defining the name is better, something like
#ifdef __APPLE__
#define CSS_LIB "libdvdcss.2.dylib"
#elif defined(WIN32)
...

  dvdcss_library = dlopen(CSS_LIB, RTLD_LAZY);
and using the define in the printf as well.

Greetings,
Reimar Döffinger



More information about the DVDnav-discuss mailing list