From 95d596ea1566127ef7ed4a1eec642a1f9fb3a8b9 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Fri, 3 Oct 2003 16:30:07 +0000 Subject: remove unresolved X11 symbols from xine-lib (xine-lib should always be X11- independent) that appeared when statically linking in libXv drawback: the Xv test in the health check is not supported on systems with only the static libXv any more CVS patchset: 5426 CVS date: 2003/10/03 16:30:07 --- src/xine-utils/Makefile.am | 6 +----- src/xine-utils/xine_check.c | 33 ++++++++------------------------- 2 files changed, 9 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am index 6174f882d..60e779099 100644 --- a/src/xine-utils/Makefile.am +++ b/src/xine-utils/Makefile.am @@ -8,10 +8,6 @@ if PPC_ARCH pppc_files = ppcasm_string.S endif -if HAVE_XV_STATIC -xv_libs = $(XV_LIB) -endif - AM_CFLAGS = $(THREAD_CFLAGS) $(X_CFLAGS) libxineutils_la_SOURCES = $(pppc_files) \ @@ -27,7 +23,7 @@ libxineutils_la_SOURCES = $(pppc_files) \ xmlparser.c \ xine_buffer.c -libxineutils_la_LIBADD = $(THREAD_LIBS) $(xv_libs) +libxineutils_la_LIBADD = $(THREAD_LIBS) include_HEADERS = attributes.h \ compat.h \ diff --git a/src/xine-utils/xine_check.c b/src/xine-utils/xine_check.c index 82e258149..a2a399ea2 100644 --- a/src/xine-utils/xine_check.c +++ b/src/xine-utils/xine_check.c @@ -56,11 +56,10 @@ #include #ifdef HAVE_X11 -#include -#endif - -#ifdef HAVE_XV -#include +# include +# ifdef HAVE_XV +# include +# endif #endif #endif /* !__linux__ */ @@ -337,9 +336,7 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { unsigned int ver, rev, eventB, reqB, errorB; char *disname = NULL; void *x11_handle; -#ifndef HAVE_XV_STATIC void *xv_handle; -#endif Display *(*xopendisplay)(char*); char *(*xdisplayname)(char*); int (*xvqueryextension)(Display*, unsigned int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*); @@ -348,7 +345,7 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { char *err = NULL; int formats, adaptors, i; XvImageFormatValues *img_formats; - XvAdaptorInfo *adaptor_info; + XvAdaptorInfo *adaptor_info; hc->title = "Check for MIT Xv extension"; hc->explanation = "You can improve performance by installing an X11\n" @@ -382,12 +379,13 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { return hc; } -#ifndef HAVE_XV_STATIC dlerror(); /* clear error code */ xv_handle = dlopen("libXv.so", RTLD_LAZY); if(!xv_handle) { hc->msg = dlerror(); - hc->status = XINE_HEALTH_CHECK_FAIL; + /* Xv might still work when linked statically into the output plugin, + * so reporting FAIL would be wrong here */ + hc->status = XINE_HEALTH_CHECK_UNSUPPORTED; dlclose(x11_handle); return hc; } @@ -421,11 +419,6 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { dlclose(xv_handle); return hc; } -#else - xvqueryextension = XvQueryExtension; - xvqueryadaptors = XvQueryAdaptors; - xvlistimageformats = XvListImageFormats; -#endif if(!(dpy = (*xopendisplay)(disname))) { @@ -434,9 +427,7 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { } set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "Unable to open display: %s\n", disname); dlclose(x11_handle); -#ifndef HAVE_XV_STATIC dlclose(xv_handle); -#endif return hc; } @@ -446,9 +437,7 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { } set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "Unable to open display: %s\n",disname); dlclose(x11_handle); -#ifndef HAVE_XV_STATIC dlclose(xv_handle); -#endif return hc; } else { @@ -463,18 +452,14 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { &adaptors,&adaptor_info)) { set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "video_out_xv: XvQueryAdaptors failed.\n"); dlclose(x11_handle); -#ifndef HAVE_XV_STATIC dlclose(xv_handle); -#endif return hc; } if (!adaptor_info) { set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "video_out_xv: No adaptors found.\n"); dlclose(x11_handle); -#ifndef HAVE_XV_STATIC dlclose(xv_handle); -#endif return hc; } @@ -496,9 +481,7 @@ xine_health_check_t* xine_health_check_xv (xine_health_check_t* hc) { } dlclose(x11_handle); -#ifndef HAVE_XV_STATIC dlclose(xv_handle); -#endif return hc; #else -- cgit v1.2.3