mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-08 18:39:54 +00:00
80c3258a6a
Original commit message from CVS: * gst/speexresample/gstspeexresample.c: (gst_speex_resample_start), (gst_speex_resample_get_unit_size), (gst_speex_resample_push_drain), (gst_speex_resample_event), (gst_speex_resample_check_discont), (gst_speex_resample_process), (gst_speex_resample_transform): * gst/speexresample/gstspeexresample.h: Rewrite timestamp tracking to make it more robust and guarantee a continous stream. * tests/check/Makefile.am: * tests/check/elements/speexresample.c: (setup_speexresample), (cleanup_speexresample), (fail_unless_perfect_stream), (test_perfect_stream_instance), (GST_START_TEST), (test_discont_stream_instance), (live_switch_alloc_only_48000), (live_switch_get_sink_caps), (live_switch_push), (speexresample_suite): Add unit tests for speexresample based on the audioresample unit tests. |
||
---|---|---|
.. | ||
arch.h | ||
fixed_arm4.h | ||
fixed_arm5e.h | ||
fixed_bfin.h | ||
fixed_debug.h | ||
fixed_generic.h | ||
gstspeexresample.c | ||
gstspeexresample.h | ||
Makefile.am | ||
README | ||
resample.c | ||
speex_resampler.h | ||
speex_resampler_float.c | ||
speex_resampler_int.c | ||
speex_resampler_wrapper.h |
arch.h fixed_arm4.h fixed_arm5e.h fixed_bfin.h fixed_debug.h fixed_generic.h resample.c speex_resampler.h are taken from http://git.xiph.org/speex.git/ as of 2008-10-28. The only changes are: --- arch.h 2008-10-28 12:21:37.000000000 +0100 +++ arch.h 2008-10-28 12:27:56.000000000 +0100 @@ -78,7 +78,10 @@ #include "../include/speex/speex_types.h" #endif +#ifndef ABS #define ABS(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute integer value. */ +#endif + #define ABS16(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute 16-bit value. */ #define MIN16(a,b) ((a) < (b) ? (a) : (b)) /**< Maximum 16-bit value. */ #define MAX16(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 16-bit value. */ --- resample.c 2008-10-28 12:21:35.000000000 +0100 +++ resample.c 2008-10-28 12:33:46.000000000 +0100 @@ -63,22 +63,27 @@ #ifdef OUTSIDE_SPEEX #include <stdlib.h> -static void * + +#include <glib.h> + +#define EXPORT + +static inline void * speex_alloc (int size) { - return calloc (size, 1); + return g_malloc0 (size); } -static void * +static inline void * speex_realloc (void *ptr, int size) { - return realloc (ptr, size); + return g_realloc (ptr, size); } -static void +static inline void speex_free (void *ptr) { - free (ptr); + g_free (ptr); } #include "speex_resampler.h" @@ -90,7 +95,6 @@ #include "os_support.h" #endif /* OUTSIDE_SPEEX */ -#include "stack_alloc.h" #include <math.h> #ifndef M_PI --- speex_resampler.h 2008-10-28 12:21:37.000000000 +0100 +++ speex_resampler.h 2008-10-28 12:30:48.000000000 +0100 @@ -77,10 +77,10 @@ #define speex_resampler_reset_mem CAT_PREFIX(RANDOM_PREFIX,_resampler_reset_mem) #define speex_resampler_strerror CAT_PREFIX(RANDOM_PREFIX,_resampler_strerror) -#define spx_int16_t short -#define spx_int32_t int -#define spx_uint16_t unsigned short -#define spx_uint32_t unsigned int +#define spx_int16_t gint16 +#define spx_int32_t gint32 +#define spx_uint16_t guint16 +#define spx_uint32_t guint32 #else /* OUTSIDE_SPEEX */