summaryrefslogtreecommitdiffstats
path: root/gst/speexresample/gstspeexresample.h
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2007-11-20 07:02:45 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2007-11-20 07:02:45 +0000
commit644432907c659f4fdc64bef9cf13d54f6e30b60c (patch)
tree16191518dd33b15232d7a44526063fbbc92f2326 /gst/speexresample/gstspeexresample.h
parentac04e0124b18beb8fa0240479d284ec6383ebcc0 (diff)
downloadgst-plugins-bad-644432907c659f4fdc64bef9cf13d54f6e30b60c.tar.gz
gst-plugins-bad-644432907c659f4fdc64bef9cf13d54f6e30b60c.tar.bz2
gst-plugins-bad-644432907c659f4fdc64bef9cf13d54f6e30b60c.zip
Add resample element based on the Speex resampling algorithm.
Original commit message from CVS: * configure.ac: * gst/speexresample/arch.h: * gst/speexresample/fixed_generic.h: * gst/speexresample/gstspeexresample.c: (gst_speex_resample_base_init), (gst_speex_resample_class_init), (gst_speex_resample_init), (gst_speex_resample_start), (gst_speex_resample_stop), (gst_speex_resample_get_unit_size), (gst_speex_resample_transform_caps), (gst_speex_resample_init_state), (gst_speex_resample_update_state), (gst_speex_resample_reset_state), (gst_speex_resample_parse_caps), (gst_speex_resample_transform_size), (gst_speex_resample_set_caps), (gst_speex_resample_event), (gst_speex_resample_check_discont), (gst_speex_resample_process), (gst_speex_resample_transform), (gst_speex_resample_set_property), (gst_speex_resample_get_property), (plugin_init): * gst/speexresample/gstspeexresample.h: * gst/speexresample/resample.c: (speex_alloc), (speex_realloc), (speex_free), (compute_func), (main), (sinc), (cubic_coef), (resampler_basic_direct_single), (resampler_basic_direct_double), (resampler_basic_interpolate_single), (resampler_basic_interpolate_double), (update_filter), (speex_resampler_init), (speex_resampler_init_frac), (speex_resampler_destroy), (speex_resampler_process_native), (speex_resampler_process_float), (speex_resampler_process_int), (speex_resampler_process_interleaved_float), (speex_resampler_process_interleaved_int), (speex_resampler_set_rate), (speex_resampler_get_rate), (speex_resampler_set_rate_frac), (speex_resampler_get_ratio), (speex_resampler_set_quality), (speex_resampler_get_quality), (speex_resampler_set_input_stride), (speex_resampler_get_input_stride), (speex_resampler_set_output_stride), (speex_resampler_get_output_stride), (speex_resampler_skip_zeros), (speex_resampler_reset_mem), (speex_resampler_strerror): * gst/speexresample/speex_resampler.h: * gst/speexresample/speex_resampler_float.c: * gst/speexresample/speex_resampler_int.c: * gst/speexresample/speex_resampler_wrapper.h: Add resample element based on the Speex resampling algorithm.
Diffstat (limited to 'gst/speexresample/gstspeexresample.h')
-rw-r--r--gst/speexresample/gstspeexresample.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/gst/speexresample/gstspeexresample.h b/gst/speexresample/gstspeexresample.h
new file mode 100644
index 00000000..68731289
--- /dev/null
+++ b/gst/speexresample/gstspeexresample.h
@@ -0,0 +1,80 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) <2007> Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+
+#ifndef __SPEEX_RESAMPLE_H__
+#define __SPEEX_RESAMPLE_H__
+
+#include <gst/gst.h>
+#include <gst/base/gstbasetransform.h>
+
+#include "speex_resampler_wrapper.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_SPEEX_RESAMPLE \
+ (gst_speex_resample_get_type())
+#define GST_SPEEX_RESAMPLE(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SPEEX_RESAMPLE,GstSpeexResample))
+#define GST_SPEEX_RESAMPLE_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SPEEX_RESAMPLE,GstSpeexResampleClass))
+#define GST_IS_SPEEX_RESAMPLE(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SPEEX_RESAMPLE))
+#define GST_IS_SPEEX_RESAMPLE_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPEEX_RESAMPLE))
+
+typedef struct _GstSpeexResample GstSpeexResample;
+typedef struct _GstSpeexResampleClass GstSpeexResampleClass;
+
+/**
+ * GstSpeexResample:
+ *
+ * Opaque data structure.
+ */
+struct _GstSpeexResample {
+ GstBaseTransform element;
+
+ GstCaps *srccaps, *sinkcaps;
+
+ gboolean need_discont;
+
+ guint64 offset;
+ guint64 ts_offset;
+ GstClockTime next_ts;
+ GstClockTime prev_ts, prev_duration;
+
+ gboolean fp;
+ int channels;
+ int inrate;
+ int outrate;
+ int quality;
+
+ SpeexResamplerState *state;
+};
+
+struct _GstSpeexResampleClass {
+ GstBaseTransformClass parent_class;
+};
+
+GType gst_speex_resample_get_type(void);
+
+G_END_DECLS
+
+#endif /* __SPEEX_RESAMPLE_H__ */