*
* 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.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*
*/
* </refsect2>
*/
+/* FIXME 0.11: suppress warnings for deprecated API such as GValueArray
+ * with newer GLib versions (>= 2.31.0) */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <math.h>
#include <gst/gst.h>
#include <gst/audio/gstaudiofilter.h>
-#include <gst/controller/gstcontroller.h>
#include "audioiirfilter.h"
+#include "gst/glib-compat-private.h"
+
#define GST_CAT_DEFAULT gst_audio_iir_filter_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static void gst_audio_iir_filter_finalize (GObject * object);
static gboolean gst_audio_iir_filter_setup (GstAudioFilter * base,
- GstAudioInfo * info);
+ const GstAudioInfo * info);
static void
gst_audio_iir_filter_class_init (GstAudioIIRFilterClass * klass)
g_object_class_install_property (gobject_class, PROP_A,
g_param_spec_value_array ("a", "A",
- "Filter coefficients (numerator of transfer function)",
+ "Filter coefficients (denominator of transfer function)",
g_param_spec_double ("Coefficient", "Filter Coefficient",
"Filter coefficient", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_B,
g_param_spec_value_array ("b", "B",
- "Filter coefficients (denominator of transfer function)",
+ "Filter coefficients (numerator of transfer function)",
g_param_spec_double ("Coefficient", "Filter Coefficient",
"Filter coefficient", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
gst_audio_iir_filter_signals[SIGNAL_RATE_CHANGED] =
g_signal_new ("rate-changed", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstAudioIIRFilterClass, rate_changed),
- NULL, NULL, gst_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
+ NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_INT);
- gst_element_class_set_details_simple (gstelement_class,
+ gst_element_class_set_static_metadata (gstelement_class,
"Audio IIR filter", "Filter/Effect/Audio",
"Generic audio IIR filter with custom filter kernel",
"Sebastian Dröge <sebastian.droege@collabora.co.uk>");
b = NULL;
gst_audio_iir_filter_update_coefficients (self, a, b);
- self->lock = g_mutex_new ();
+ g_mutex_init (&self->lock);
}
/* GstAudioFilter vmethod implementations */
/* get notified of caps and plug in the correct process function */
static gboolean
-gst_audio_iir_filter_setup (GstAudioFilter * base, GstAudioInfo * info)
+gst_audio_iir_filter_setup (GstAudioFilter * base, const GstAudioInfo * info)
{
GstAudioIIRFilter *self = GST_AUDIO_IIR_FILTER (base);
gint new_rate = GST_AUDIO_INFO_RATE (info);
{
GstAudioIIRFilter *self = GST_AUDIO_IIR_FILTER (object);
- g_mutex_free (self->lock);
- self->lock = NULL;
+ g_mutex_clear (&self->lock);
if (self->a)
g_value_array_free (self->a);
switch (prop_id) {
case PROP_A:
- g_mutex_lock (self->lock);
+ g_mutex_lock (&self->lock);
gst_audio_iir_filter_update_coefficients (self, g_value_dup_boxed (value),
NULL);
- g_mutex_unlock (self->lock);
+ g_mutex_unlock (&self->lock);
break;
case PROP_B:
- g_mutex_lock (self->lock);
+ g_mutex_lock (&self->lock);
gst_audio_iir_filter_update_coefficients (self, NULL,
g_value_dup_boxed (value));
- g_mutex_unlock (self->lock);
+ g_mutex_unlock (&self->lock);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);