summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-05-31 18:29:00 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-05-31 18:29:00 +0200
commita8bb7140826c99ee2448695058146ec265b6e4e6 (patch)
tree84c514d4da77eb5f02b5959ccbd76a407900ad70
parent99a966ff01671a2724359c79fab7b3c7fb394d3a (diff)
downloadxine-lib-a8bb7140826c99ee2448695058146ec265b6e4e6.tar.gz
xine-lib-a8bb7140826c99ee2448695058146ec265b6e4e6.tar.bz2
Move modplug demuxing on its own plugin.
This way binary distributions can make it optional, as it requires quite a bit of CPU time during initialisation, even for audio files that nothing have to do with modplug.
-rw-r--r--ChangeLog3
-rw-r--r--m4/decoders.m42
-rw-r--r--src/demuxers/Makefile.am14
-rw-r--r--src/demuxers/demux_mod.c14
-rw-r--r--src/demuxers/group_audio.c9
-rw-r--r--src/demuxers/group_audio.h4
6 files changed, 23 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index 448894166..f6785d60d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,9 @@ xine-lib (1.1.90) (Unreleased)
not possible to distinguish between 401 Authentication Requried and 403
Forbidden.
* Merge the demuxer and the decoder for NSF files in a combined plugin.
+ * Move modplug demuxing on its own plugin, this way binary distributions
+ can make it optional, as it requires quite a bit of CPU time during
+ initialisation, even for audio files that nothing have to do with modplug.
xine-lib (1.1.7) (unreleased)
* Support libdca (new name for libdts) by shuffling around the dts.h file.
diff --git a/m4/decoders.m4 b/m4/decoders.m4
index 58d1c56e5..094f406ea 100644
--- a/m4/decoders.m4
+++ b/m4/decoders.m4
@@ -273,8 +273,6 @@ use internal ffmpeg.
PKG_CHECK_MODULES([LIBMODPLUG], [libmodplug >= 0.7], [have_modplug=yes], [have_modplug=no])
if test x"$enable_modplug" = x"yes" && test x"$have_modplug" != x"yes"; then
AC_MSG_ERROR([MODPlug support requested, but MODPlug not found])
- elif test x"$have_modplug" = x"yes"; then
- AC_DEFINE([HAVE_MODPLUG], 1, [define this if you have libmodplug installed])
fi
fi
AM_CONDITIONAL([ENABLE_MODPLUG], [test x"$have_modplug" = x"yes"])
diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am
index b57dc7369..aa6bc5d5e 100644
--- a/src/demuxers/Makefile.am
+++ b/src/demuxers/Makefile.am
@@ -24,6 +24,10 @@ if ENABLE_MNG
mng_module = xineplug_dmx_mng.la
endif
+if ENABLE_MODPLUG
+modplug_module = xineplug_dmx_modplug.la
+endif
+
if BUILD_DMX_IMAGE
image_module = xineplug_dmx_image.la
endif
@@ -33,6 +37,7 @@ xineplug_LTLIBRARIES = \
$(asf_module) \
$(mng_module) \
$(image_module) \
+ $(modplug_module) \
xineplug_dmx_games.la \
xineplug_dmx_audio.la \
xineplug_dmx_mpeg_ts.la \
@@ -114,11 +119,14 @@ xineplug_dmx_audio_la_SOURCES = group_audio.c demux_aud.c demux_aiff.c \
demux_cdda.c demux_mpgaudio.c \
demux_realaudio.c demux_snd.c demux_voc.c \
demux_vox.c demux_wav.c demux_ac3.c id3.c \
- demux_aac.c demux_mod.c demux_flac.c \
+ demux_aac.c demux_flac.c \
demux_mpc.c demux_dts.c demux_shn.c \
demux_tta.c
-xineplug_dmx_audio_la_LIBADD = $(XINE_LIB) $(LIBMODPLUG_LIBS)
-xineplug_dmx_audio_la_CFLAGS = $(AM_CFLAGS) $(LIBMODPLUG_CFLAGS)
+xineplug_dmx_audio_la_LIBADD = $(XINE_LIB)
+
+xineplug_dmx_modplug_la_SOURCES = demux_mod.c
+xineplug_dmx_modplug_la_LIBADD = $(XINE_LIB) $(LIBMODPLUG_LIBS)
+xineplug_dmx_modplug_la_CFLAGS = $(LIBMODPLUG_CFLAGS)
xineplug_dmx_yuv_frames_la_SOURCES = demux_yuv_frames.c
xineplug_dmx_yuv_frames_la_LIBADD = $(XINE_LIB)
diff --git a/src/demuxers/demux_mod.c b/src/demuxers/demux_mod.c
index 37e066b13..9acddd878 100644
--- a/src/demuxers/demux_mod.c
+++ b/src/demuxers/demux_mod.c
@@ -31,8 +31,6 @@
#include "config.h"
#endif
-#ifdef HAVE_MODPLUG
-
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
@@ -48,7 +46,6 @@
#include "xineutils.h"
#include "compat.h"
#include "demux.h"
-#include "group_audio.h"
#include "modplug.h"
#include "bswap.h"
@@ -377,7 +374,7 @@ static void class_dispose (demux_class_t *this_gen) {
free (this);
}
-void *demux_mod_init_plugin (xine_t *xine, void *data) {
+static void *demux_mod_init_plugin (xine_t *xine, void *data) {
demux_mod_class_t *this;
this = xine_xmalloc (sizeof (demux_mod_class_t));
@@ -392,4 +389,11 @@ void *demux_mod_init_plugin (xine_t *xine, void *data) {
return this;
}
-#endif /* HAVE_MODPLUG */
+static const demuxer_info_t demux_info_mod = {
+ 10 /* priority */
+};
+
+const plugin_info_t xine_plugin_info[] EXPORTED = {
+ { PLUGIN_DEMUX, 26, "modplug", XINE_VERSION_CODE, &demux_info_mod, demux_mod_init_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/demuxers/group_audio.c b/src/demuxers/group_audio.c
index 4635ec4a6..8c1efdde6 100644
--- a/src/demuxers/group_audio.c
+++ b/src/demuxers/group_audio.c
@@ -99,12 +99,6 @@ static const demuxer_info_t demux_info_wav = {
6 /* priority */
};
-#ifdef HAVE_MODPLUG
-static const demuxer_info_t demux_info_mod = {
- 10 /* priority */
-};
-#endif
-
const plugin_info_t xine_plugin_info[] EXPORTED = {
/* type, API, "name", version, special_info, init_function */
{ PLUGIN_DEMUX, 26, "aac", XINE_VERSION_CODE, &demux_info_aac, demux_aac_init_plugin },
@@ -123,8 +117,5 @@ const plugin_info_t xine_plugin_info[] EXPORTED = {
{ PLUGIN_DEMUX, 26, "voc", XINE_VERSION_CODE, &demux_info_voc, demux_voc_init_plugin },
{ PLUGIN_DEMUX, 26, "vox", XINE_VERSION_CODE, &demux_info_vox, demux_vox_init_plugin },
{ PLUGIN_DEMUX, 26, "wav", XINE_VERSION_CODE, &demux_info_wav, demux_wav_init_plugin },
-#ifdef HAVE_MODPLUG
- { PLUGIN_DEMUX, 26, "mod", XINE_VERSION_CODE, &demux_info_mod, demux_mod_init_plugin },
-#endif
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/demuxers/group_audio.h b/src/demuxers/group_audio.h
index e5456aab6..984b7c88e 100644
--- a/src/demuxers/group_audio.h
+++ b/src/demuxers/group_audio.h
@@ -42,8 +42,4 @@ void *demux_voc_init_plugin (xine_t *xine, void *data);
void *demux_vox_init_plugin (xine_t *xine, void *data);
void *demux_wav_init_plugin (xine_t *xine, void *data);
-#ifdef HAVE_MODPLUG
-void *demux_mod_init_plugin (xine_t *xine, void *data);
-#endif
-
#endif