2005-08-23 19:29:38 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
2009-01-23 11:31:06 +00:00
|
|
|
* Copyright (C) <2007-2008> Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
2005-08-23 19:29:38 +00:00
|
|
|
*
|
|
|
|
* 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
|
2012-11-03 23:05:09 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2005-08-23 19:29:38 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2009-01-23 11:31:06 +00:00
|
|
|
#ifndef __AUDIO_RESAMPLE_H__
|
|
|
|
#define __AUDIO_RESAMPLE_H__
|
2005-08-23 19:29:38 +00:00
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2005-08-24 14:08:58 +00:00
|
|
|
#include <gst/base/gstbasetransform.h>
|
2009-01-23 11:31:06 +00:00
|
|
|
#include <gst/audio/audio.h>
|
2005-08-23 19:29:38 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2020-03-12 06:42:52 +00:00
|
|
|
#define GST_TYPE_AUDIO_RESAMPLE (gst_audio_resample_get_type())
|
|
|
|
G_DECLARE_FINAL_TYPE (GstAudioResample, gst_audio_resample, GST, AUDIO_RESAMPLE,
|
|
|
|
GstBaseTransform)
|
2005-08-23 19:29:38 +00:00
|
|
|
|
docs/plugins/: Add audioresample to docs.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
Add audioresample to docs.
* gst/audioconvert/gstaudioconvert.c:
Add revision date.
* gst/audioresample/gstaudioresample.c:
(gst_audioresample_base_init), (gst_audioresample_class_init),
(gst_audioresample_init), (gst_audioresample_dispose),
(audioresample_get_unit_size), (audioresample_transform_caps),
(resample_set_state_from_caps), (audioresample_transform_size),
(audioresample_set_caps), (audioresample_event),
(audioresample_do_output), (audioresample_transform),
(audioresample_pushthrough), (gst_audioresample_set_property),
(gst_audioresample_get_property), (plugin_init):
* gst/audioresample/gstaudioresample.h:
Added docs.
Small code cleanups.
2006-03-02 18:23:55 +00:00
|
|
|
/**
|
2009-01-23 11:31:06 +00:00
|
|
|
* GstAudioResample:
|
docs/plugins/: Add audioresample to docs.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
Add audioresample to docs.
* gst/audioconvert/gstaudioconvert.c:
Add revision date.
* gst/audioresample/gstaudioresample.c:
(gst_audioresample_base_init), (gst_audioresample_class_init),
(gst_audioresample_init), (gst_audioresample_dispose),
(audioresample_get_unit_size), (audioresample_transform_caps),
(resample_set_state_from_caps), (audioresample_transform_size),
(audioresample_set_caps), (audioresample_event),
(audioresample_do_output), (audioresample_transform),
(audioresample_pushthrough), (gst_audioresample_set_property),
(gst_audioresample_get_property), (plugin_init):
* gst/audioresample/gstaudioresample.h:
Added docs.
Small code cleanups.
2006-03-02 18:23:55 +00:00
|
|
|
*
|
|
|
|
* Opaque data structure.
|
|
|
|
*/
|
2009-01-23 11:31:06 +00:00
|
|
|
struct _GstAudioResample {
|
2005-08-24 14:08:58 +00:00
|
|
|
GstBaseTransform element;
|
2005-08-23 19:29:38 +00:00
|
|
|
|
2009-01-23 11:31:06 +00:00
|
|
|
/* <private> */
|
2007-03-14 17:16:30 +00:00
|
|
|
gboolean need_discont;
|
2005-08-23 19:29:38 +00:00
|
|
|
|
2009-08-21 04:57:58 +00:00
|
|
|
GstClockTime t0;
|
|
|
|
guint64 in_offset0;
|
|
|
|
guint64 out_offset0;
|
2010-12-13 08:56:04 +00:00
|
|
|
guint64 samples_in;
|
|
|
|
guint64 samples_out;
|
2015-11-13 14:32:29 +00:00
|
|
|
|
2010-12-17 04:40:33 +00:00
|
|
|
guint64 num_gap_samples;
|
|
|
|
guint64 num_nongap_samples;
|
2010-12-13 08:56:04 +00:00
|
|
|
|
2011-08-18 17:15:03 +00:00
|
|
|
/* properties */
|
2015-11-13 14:32:29 +00:00
|
|
|
GstAudioResamplerMethod method;
|
2011-08-18 17:15:03 +00:00
|
|
|
gint quality;
|
2015-11-13 14:32:29 +00:00
|
|
|
GstAudioResamplerFilterMode sinc_filter_mode;
|
2012-10-07 01:00:52 +00:00
|
|
|
guint32 sinc_filter_auto_threshold;
|
2016-02-15 17:06:19 +00:00
|
|
|
GstAudioResamplerFilterInterpolation sinc_filter_interpolation;
|
2012-10-07 01:00:52 +00:00
|
|
|
|
2015-11-13 14:32:29 +00:00
|
|
|
/* state */
|
|
|
|
GstAudioInfo in;
|
|
|
|
GstAudioInfo out;
|
2016-01-04 17:28:38 +00:00
|
|
|
GstAudioConverter *converter;
|
2005-08-23 19:29:38 +00:00
|
|
|
};
|
2021-03-29 12:06:30 +00:00
|
|
|
GST_ELEMENT_REGISTER_DECLARE (audioresample);
|
2005-08-23 19:29:38 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2009-01-23 11:31:06 +00:00
|
|
|
#endif /* __AUDIO_RESAMPLE_H__ */
|