Commit b08c0a90 authored by Stefan Kost's avatar Stefan Kost

audioresample: Only pull in liboil if its actualy used.

Liboil still has quite significant startup overhead especialy on embedded
platforms. In audioresample it was only used for the profiling timer.
parent 080493cc
......@@ -313,6 +313,7 @@ case $ac_cv_audioresample_format in
AC_DEFINE(AUDIORESAMPLE_FORMAT_AUTO,1,[The implementation that should be used for integer audio resampling witll be benchmarked at runtime])
AC_SUBST(AUDIORESAMPLE_FORMAT_AUTO)
esac
AM_CONDITIONAL(AUDIORESAMPLE_NEEDS_LIBOIL, test "$ac_cv_audioresample_format" = "auto")
dnl *** plug-ins to include ***
......
plugin_LTLIBRARIES = libgstaudioresample.la
if AUDIORESAMPLE_NEEDS_LIBOIL
COND_LIBOIL_CFLAGS=$(LIBOIL_CFLAGS)
COND_LIBOIL_LIBS=$(LIBOIL_LIBS)
else
COND_LIBOIL_CFLAGS=
COND_LIBOIL_LIBS=
endif
libgstaudioresample_la_SOURCES = \
gstaudioresample.c \
speex_resampler_int.c \
......@@ -10,13 +18,13 @@ libgstaudioresample_la_CFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_CFLAGS) \
$(LIBOIL_CFLAGS)
$(COND_LIBOIL_CFLAGS)
libgstaudioresample_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) \
$(GST_BASE_LIBS) \
$(GST_LIBS) \
$(LIBOIL_LIBS) \
$(COND_LIBOIL_LIBS) \
$(LIBM)
libgstaudioresample_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
......
......@@ -49,9 +49,11 @@
#include <gst/audio/audio.h>
#include <gst/base/gstbasetransform.h>
#if defined AUDIORESAMPLE_FORMAT_AUTO
#define OIL_ENABLE_UNSTABLE_API
#include <liboil/liboilprofile.h>
#include <liboil/liboil.h>
#endif
GST_DEBUG_CATEGORY (audio_resample_debug);
#define GST_CAT_DEFAULT audio_resample_debug
......@@ -1392,10 +1394,9 @@ plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (audio_resample_debug, "audioresample", 0,
"audio resampling element");
#if defined AUDIORESAMPLE_FORMAT_AUTO
oil_init ();
#if defined AUDIORESAMPLE_FORMAT_AUTO
if (!_benchmark_integer_resampling ())
return FALSE;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment