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 \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_CFLAGS) \
- $(COND_LIBOIL_CFLAGS)
+ $(ORC_CFLAGS)
libgstaudioresample_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) \
$(GST_BASE_LIBS) \
$(GST_LIBS) \
- $(COND_LIBOIL_LIBS) \
+ $(ORC_LIBS) -lorc-test-0.4 \
$(LIBM)
libgstaudioresample_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
#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
+#include <orc/orc.h>
+#include <orc-test/orctest.h>
+#include <orc-test/orcprofile.h>
+
GST_DEBUG_CATEGORY (audio_resample_debug);
#define GST_CAT_DEFAULT audio_resample_debug
static gboolean
_benchmark_integer_resampling (void)
{
- OilProfile a, b;
+ OrcProfile a, b;
gdouble av, bv;
SpeexResamplerState *sta, *stb;
int i;
- oil_profile_init (&a);
- oil_profile_init (&b);
+ orc_profile_init (&a);
+ orc_profile_init (&b);
sta = resample_float_resampler_init (1, 48000, 24000, 4, NULL);
if (sta == NULL) {
/* Benchmark */
for (i = 0; i < 10; i++) {
- oil_profile_start (&a);
+ orc_profile_start (&a);
if (!_benchmark_int_float (sta))
goto error;
- oil_profile_stop (&a);
+ orc_profile_stop (&a);
}
/* Benchmark */
for (i = 0; i < 10; i++) {
- oil_profile_start (&b);
+ orc_profile_start (&b);
if (!_benchmark_int_int (stb))
goto error;
- oil_profile_stop (&b);
+ orc_profile_stop (&b);
}
/* Handle results */
- oil_profile_get_ave_std (&a, &av, NULL);
- oil_profile_get_ave_std (&b, &bv, NULL);
+ orc_profile_get_ave_std (&a, &av, NULL);
+ orc_profile_get_ave_std (&b, &bv, NULL);
/* Remember benchmark result in global variable */
gst_audio_resample_use_int = (av > bv);
GST_DEBUG_CATEGORY_INIT (audio_resample_debug, "audioresample", 0,
"audio resampling element");
#if defined AUDIORESAMPLE_FORMAT_AUTO
- oil_init ();
-
if (!_benchmark_integer_resampling ())
return FALSE;
#endif