History

avserver: Remove unused loadable module support

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.

Martin Storsjö committed 13 years ago

Commit d010e951 parent 3ac7fa82 files · +1 −41Browse files

Unified · Split

2 files
  1. avserver.c +1 −35
  2. configure +0 −6
avserver.c+1−35
@@ -58,9 +58,6 @@ · 57 unmodified lines
5858 #include <time.h>
5959 #include <sys/wait.h>
6060 #include <signal.h>
61−#if HAVE_DLFCN_H
62−#include <dlfcn.h>
63−#endif
6461
6562 #include "cmdutils.h"
6663
@@ -3914,32 +3911,6 @@ static enum AVCodecID opt_video_codec(const char *arg) · 3847 unmodified lines
39143911 return p->id;
39153912 }
39163913
3917−/* simplistic plugin support */
3918−
3919−#if HAVE_DLOPEN
3920−static void load_module(const char *filename)
3921−{
3922− void *dll;
3923− void (*init_func)(void);
3924− dll = dlopen(filename, RTLD_NOW);
3925− if (!dll) {
3926− fprintf(stderr, "Could not load module '%s' - %s\n",
3927− filename, dlerror());
3928− return;
3929− }
3930−
3931− init_func = dlsym(dll, "avserver_module_init");
3932− if (!init_func) {
3933− fprintf(stderr,
3934− "%s: init function 'avserver_module_init()' not found\n",
3935− filename);
3936− dlclose(dll);
3937− }
3938−
3939− init_func();
3940−}
3941−#endif
3942−
39433914 static int avserver_opt_default(const char *opt, const char *arg,
39443915 AVCodecContext *avctx, int type)
39453916 {
@@ -4596,12 +4567,7 @@ static int parse_ffconfig(const char *filename) · 650 unmodified lines
45964567 redirect = NULL;
45974568 }
45984569 } else if (!av_strcasecmp(cmd, "LoadModule")) {
4599− get_arg(arg, sizeof(arg), &p);
4600−#if HAVE_DLOPEN
4601− load_module(arg);
4602−#else
4603− ERROR("Module support not compiled into this version: '%s'\n", arg);
4604−#endif
4570+ ERROR("Loadable modules no longer supported\n");
46054571 } else {
46064572 ERROR("Incorrect keyword: '%s'\n", cmd);
46074573 }
configure+0−6
@@ -1974,7 +1974,6 @@ enable dxva2 vdpau · 1973 unmodified lines
19741974
19751975 # build settings
19761976 SHFLAGS='-shared -Wl,-soname,$$(@F)'
1977−AVSERVERLDFLAGS=-Wl,-E
19781977 LIBPREF="lib"
19791978 LIBSUF=".a"
19801979 FULLNAME='$(NAME)$(BUILDSUF)'
@@ -3059,7 +3058,6 @@ case $target_os in · 1078 unmodified lines
30593058 host_libs=
30603059 ;;
30613060 sunos)
3062− AVSERVERLDFLAGS=""
30633061 SHFLAGS='-shared -Wl,-h,$$(@F)'
30643062 enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS"
30653063 network_extralibs="-lsocket -lnsl"
@@ -3104,7 +3102,6 @@ case $target_os in · 38 unmodified lines
31043102 SLIBSUF=".dylib"
31053103 SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
31063104 SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
3107− AVSERVERLDFLAGS=-Wl,-bind_at_load
31083105 objformat="macho"
31093106 enabled x86_64 && objformat="macho64"
31103107 enabled_any pic shared ||
@@ -3196,7 +3193,6 @@ case $target_os in · 85 unmodified lines
31963193 add_cppflags -D_GNU_SOURCE
31973194 add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap
31983195 SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf'
3199− AVSERVERLDFLAGS=""
32003196 LIBSUF="_s.a"
32013197 SLIBPREF=""
32023198 SLIBSUF=".dll"
@@ -3236,7 +3232,6 @@ case $target_os in · 33 unmodified lines
32363232 ;;
32373233 osf1)
32383234 add_cppflags -D_OSF_SOURCE -D_POSIX_PII -D_REENTRANT
3239− AVSERVERLDFLAGS=
32403235 ;;
32413236 minix)
32423237 ;;
@@ -4120,7 +4115,6 @@ LD_LIB=$LD_LIB · 877 unmodified lines
41204115 LD_PATH=$LD_PATH
41214116 DLLTOOL=$dlltool
41224117 LDFLAGS=$LDFLAGS
4123−LDFLAGS-avserver=$AVSERVERLDFLAGS
41244118 SHFLAGS=$(echo $($ldflags_filter $SHFLAGS))
41254119 YASMFLAGS=$YASMFLAGS
41264120 BUILDSUF=$build_suffix

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t