From d010e95f86089abe9a3d4d4a66ac8102312d28a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Wed, 17 Jul 2013 18:24:23 +0300 Subject: [PATCH] avserver: Remove unused loadable module support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There is no record of this ever being used at all, anywhere, since the feature was added in 2effd274466. This gets rid of extra linker tricks just to support a feature that isn't used, simplifying portability to other platforms. Signed-off-by: Martin Storsjö --- avserver.c | 36 +----------------------------------- configure | 6 ------ 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/avserver.c b/avserver.c index 16a24ff..976c895 100644 --- a/avserver.c +++ b/avserver.c @@ -58,9 +58,6 @@ #include #include #include -#if HAVE_DLFCN_H -#include -#endif #include "cmdutils.h" @@ -3914,32 +3911,6 @@ static enum AVCodecID opt_video_codec(const char *arg) return p->id; } -/* simplistic plugin support */ - -#if HAVE_DLOPEN -static void load_module(const char *filename) -{ - void *dll; - void (*init_func)(void); - dll = dlopen(filename, RTLD_NOW); - if (!dll) { - fprintf(stderr, "Could not load module '%s' - %s\n", - filename, dlerror()); - return; - } - - init_func = dlsym(dll, "avserver_module_init"); - if (!init_func) { - fprintf(stderr, - "%s: init function 'avserver_module_init()' not found\n", - filename); - dlclose(dll); - } - - init_func(); -} -#endif - static int avserver_opt_default(const char *opt, const char *arg, AVCodecContext *avctx, int type) { @@ -4596,12 +4567,7 @@ static int parse_ffconfig(const char *filename) redirect = NULL; } } else if (!av_strcasecmp(cmd, "LoadModule")) { - get_arg(arg, sizeof(arg), &p); -#if HAVE_DLOPEN - load_module(arg); -#else - ERROR("Module support not compiled into this version: '%s'\n", arg); -#endif + ERROR("Loadable modules no longer supported\n"); } else { ERROR("Incorrect keyword: '%s'\n", cmd); } diff --git a/configure b/configure index 0e6b450..d15e3f0 100755 --- a/configure +++ b/configure @@ -1974,7 +1974,6 @@ enable dxva2 vdpau # build settings SHFLAGS='-shared -Wl,-soname,$$(@F)' -AVSERVERLDFLAGS=-Wl,-E LIBPREF="lib" LIBSUF=".a" FULLNAME='$(NAME)$(BUILDSUF)' @@ -3059,7 +3058,6 @@ case $target_os in host_libs= ;; sunos) - AVSERVERLDFLAGS="" SHFLAGS='-shared -Wl,-h,$$(@F)' enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS" network_extralibs="-lsocket -lnsl" @@ -3104,7 +3102,6 @@ case $target_os in SLIBSUF=".dylib" SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)' SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)' - AVSERVERLDFLAGS=-Wl,-bind_at_load objformat="macho" enabled x86_64 && objformat="macho64" enabled_any pic shared || @@ -3196,7 +3193,6 @@ case $target_os in add_cppflags -D_GNU_SOURCE add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf' - AVSERVERLDFLAGS="" LIBSUF="_s.a" SLIBPREF="" SLIBSUF=".dll" @@ -3236,7 +3232,6 @@ case $target_os in ;; osf1) add_cppflags -D_OSF_SOURCE -D_POSIX_PII -D_REENTRANT - AVSERVERLDFLAGS= ;; minix) ;; @@ -4120,7 +4115,6 @@ LD_LIB=$LD_LIB LD_PATH=$LD_PATH DLLTOOL=$dlltool LDFLAGS=$LDFLAGS -LDFLAGS-avserver=$AVSERVERLDFLAGS SHFLAGS=$(echo $($ldflags_filter $SHFLAGS)) YASMFLAGS=$YASMFLAGS BUILDSUF=$build_suffix -- 2.7.4