slomo gst-plugins-good: gst-plugins-good/ gst-plugins-good/gst/audiofx/
[email protected] Tue, 13 Jan 2009 00:24:39 -0800 (PST)
| Newsgroups | gmane.comp.video.gstreamer.cvs |
|---|---|
| Message-ID | <[email protected]> |
--===============1550921893171750648==
CVS Root: /cvs/gstreamer
Module: gst-plugins-good
Changes by: slomo
Date: Tue Jan 13 2009 08:24:39 UTC
Log message:
* gst/audiofx/audiochebband.c: (gst_audio_cheb_band_class_init),
(gst_audio_cheb_band_init), (gst_audio_cheb_band_finalize),
(gst_audio_cheb_band_set_property):
* gst/audiofx/audiochebband.h:
* gst/audiofx/audiocheblimit.c: (gst_audio_cheb_limit_class_init),
(gst_audio_cheb_limit_init), (gst_audio_cheb_limit_finalize),
(gst_audio_cheb_limit_set_property):
* gst/audiofx/audiocheblimit.h:
* gst/audiofx/audiowsincband.c: (gst_audio_wsincband_class_init),
(gst_audio_wsincband_init), (gst_audio_wsincband_finalize),
(gst_audio_wsincband_set_property):
* gst/audiofx/audiowsincband.h:
* gst/audiofx/audiowsinclimit.c: (gst_audio_wsinclimit_class_init),
(gst_audio_wsinclimit_init), (gst_audio_wsinclimit_finalize),
(gst_audio_wsinclimit_set_property):
* gst/audiofx/audiowsinclimit.h:
Use a custom mutex for protecting the instance fields instead of
the GstObject lock. Using the latter can lead to deadlocks, especially
with the FIR filters when updating the latency.
Modified files:
. : ChangeLog
gst/audiofx : audiochebband.c audiochebband.h audiocheblimit.c
audiocheblimit.h audiowsincband.c
audiowsincband.h audiowsinclimit.c
audiowsinclimit.h
Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3891&r2=1.3892
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/audiofx/audiochebband.c.diff?r1=1.9&r2=1.10
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/audiofx/audiochebband.h.diff?r1=1.3&r2=1.4
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/audiofx/audiocheblimit.c.diff?r1=1.10&r2=1.11
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/audiofx/audiocheblimit.h.diff?r1=1.3&r2=1.4
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/audiofx/audiowsincband.c.diff?r1=1.41&r2=1.42
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/audiofx/audiowsincband.h.diff?r1=1.9&r2=1.10
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/audiofx/audiowsinclimit.c.diff?r1=1.47&r2=1.48
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/audiofx/audiowsinclimit.h.diff?r1=1.11&r2=1.12
====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v
retrieving revision 1.3891
retrieving revision 1.3892
diff -u -d -r1.3891 -r1.3892
--- ChangeLog 11 Jan 2009 19:03:36 -0000 1.3891
+++ ChangeLog 13 Jan 2009 08:24:22 -0000 1.3892
@@ -1,3 +1,25 @@
+2009-01-13 Sebastian Dröge <[email protected]>
+
+ * gst/audiofx/audiochebband.c: (gst_audio_cheb_band_class_init),
+ (gst_audio_cheb_band_init), (gst_audio_cheb_band_finalize),
+ (gst_audio_cheb_band_set_property):
+ * gst/audiofx/audiochebband.h:
+ * gst/audiofx/audiocheblimit.c: (gst_audio_cheb_limit_class_init),
+ (gst_audio_cheb_limit_init), (gst_audio_cheb_limit_finalize),
+ (gst_audio_cheb_limit_set_property):
+ * gst/audiofx/audiocheblimit.h:
+ * gst/audiofx/audiowsincband.c: (gst_audio_wsincband_class_init),
+ (gst_audio_wsincband_init), (gst_audio_wsincband_finalize),
+ (gst_audio_wsincband_set_property):
+ * gst/audiofx/audiowsincband.h:
+ * gst/audiofx/audiowsinclimit.c: (gst_audio_wsinclimit_class_init),
+ (gst_audio_wsinclimit_init), (gst_audio_wsinclimit_finalize),
+ (gst_audio_wsinclimit_set_property):
+ * gst/audiofx/audiowsinclimit.h:
+ Use a custom mutex for protecting the instance fields instead of
+ the GstObject lock. Using the latter can lead to deadlocks, especially
+ with the FIR filters when updating the latency.
2009-01-11 Sebastian Dröge <[email protected]>
* gst/audiofx/Makefile.am:
Index: audiochebband.c
RCS file: /cvs/gstreamer/gst-plugins-good/gst/audiofx/audiochebband.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- audiochebband.c 5 Jan 2009 10:13:28 -0000 1.9
+++ audiochebband.c 13 Jan 2009 08:24:24 -0000 1.10
@@ -113,6 +113,7 @@
guint prop_id, const GValue * value, GParamSpec * pspec);
static void gst_audio_cheb_band_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
+static void gst_audio_cheb_band_finalize (GObject * object);
static gboolean gst_audio_cheb_band_setup (GstAudioFilter * filter,
GstRingBufferSpec * format);
@@ -164,6 +165,7 @@
gobject_class->set_property = gst_audio_cheb_band_set_property;
gobject_class->get_property = gst_audio_cheb_band_get_property;
+ gobject_class->finalize = gst_audio_cheb_band_finalize;
g_object_class_install_property (gobject_class, PROP_MODE,
g_param_spec_enum ("mode", "Mode",
@@ -210,6 +212,8 @@
filter->type = 1;
filter->poles = 4;
filter->ripple = 0.25;
+ filter->lock = g_mutex_new ();
}
static void
@@ -568,6 +572,17 @@
+gst_audio_cheb_band_finalize (GObject * object)
+{
+ GstAudioChebBand *filter = GST_AUDIO_CHEB_BAND (object);
+ g_mutex_free (filter->lock);
+ filter->lock = NULL;
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+static void
gst_audio_cheb_band_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
@@ -575,40 +590,40 @@
switch (prop_id) {
case PROP_MODE:
- GST_OBJECT_LOCK (filter);
+ g_mutex_lock (filter->lock);
filter->mode = g_value_get_enum (value);
generate_coefficients (filter);
- GST_OBJECT_UNLOCK (filter);
+ g_mutex_unlock (filter->lock);
break;
case PROP_TYPE:
filter->type = g_value_get_int (value);
case PROP_LOWER_FREQUENCY:
filter->lower_frequency = g_value_get_float (value);
case PROP_UPPER_FREQUENCY:
filter->upper_frequency = g_value_get_float (value);
case PROP_RIPPLE:
filter->ripple = g_value_get_float (value);
case PROP_POLES:
filter->poles = GST_ROUND_UP_4 (g_value_get_int (value));
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
Index: audiochebband.h
RCS file: /cvs/gstreamer/gst-plugins-good/gst/audiofx/audiochebband.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- audiochebband.h 5 Jan 2009 10:13:28 -0000 1.3
+++ audiochebband.h 13 Jan 2009 08:24:24 -0000 1.4
@@ -48,6 +48,9 @@
gfloat lower_frequency;
gfloat upper_frequency;
gfloat ripple;
+ /* < private > */
+ GMutex *lock;
};
struct _GstAudioChebBandClass
Index: audiocheblimit.c
RCS file: /cvs/gstreamer/gst-plugins-good/gst/audiofx/audiocheblimit.c,v
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- audiocheblimit.c 5 Jan 2009 10:13:29 -0000 1.10
+++ audiocheblimit.c 13 Jan 2009 08:24:24 -0000 1.11
@@ -109,6 +109,7 @@
static void gst_audio_cheb_limit_get_property (GObject * object,
+static void gst_audio_cheb_limit_finalize (GObject * object);
static gboolean gst_audio_cheb_limit_setup (GstAudioFilter * filter,
@@ -161,6 +162,7 @@
gobject_class->set_property = gst_audio_cheb_limit_set_property;
gobject_class->get_property = gst_audio_cheb_limit_get_property;
+ gobject_class->finalize = gst_audio_cheb_limit_finalize;
@@ -203,6 +205,8 @@
@@ -479,6 +483,17 @@
+gst_audio_cheb_limit_finalize (GObject * object)
+ GstAudioChebLimit *filter = GST_AUDIO_CHEB_LIMIT (object);
gst_audio_cheb_limit_set_property (GObject * object, guint prop_id,
@@ -486,34 +501,34 @@
case PROP_CUTOFF:
filter->cutoff = g_value_get_float (value);
filter->poles = GST_ROUND_UP_2 (g_value_get_int (value));
Index: audiocheblimit.h
RCS file: /cvs/gstreamer/gst-plugins-good/gst/audiofx/audiocheblimit.h,v
--- audiocheblimit.h 5 Jan 2009 10:13:29 -0000 1.3
+++ audiocheblimit.h 13 Jan 2009 08:24:24 -0000 1.4
@@ -49,6 +49,9 @@
gint poles;
gfloat cutoff;
struct _GstAudioChebLimitClass
Index: audiowsincband.c
RCS file: /cvs/gstreamer/gst-plugins-good/gst/audiofx/audiowsincband.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- audiowsincband.c 11 Jan 2009 19:03:38 -0000 1.41
+++ audiowsincband.c 13 Jan 2009 08:24:24 -0000 1.42
@@ -26,13 +26,6 @@
* chapter 16
* available at http://www.dspguide.com/
*
- * TODO: - Implement the convolution in place, probably only makes sense
- * when using FFT convolution as currently the convolution itself
- * is probably the bottleneck
- * - Maybe allow cascading the filter to get a better stopband attenuation.
- * Can be done by convolving a filter kernel with itself
- * - Drop the first kernel_length/2 samples and append the same number of
- * samples on EOS as the first few samples are essentialy zero.
*/
/**
@@ -150,6 +143,7 @@
const GValue * value, GParamSpec * pspec);
static void gst_audio_wsincband_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
+static void gst_audio_wsincband_finalize (GObject * object);
static gboolean gst_audio_wsincband_setup (GstAudioFilter * base,
@@ -177,6 +171,7 @@
gobject_class->set_property = gst_audio_wsincband_set_property;
gobject_class->get_property = gst_audio_wsincband_get_property;
+ gobject_class->finalize = gst_audio_wsincband_finalize;
/* FIXME: Don't use the complete possible range but restrict the upper boundary
* so automatically generated UIs can use a slider */
@@ -218,6 +213,8 @@
self->upper_frequency = 0.0;
self->mode = MODE_BAND_PASS;
self->window = WINDOW_HAMMING;
+ self->lock = g_mutex_new ();
@@ -353,6 +350,17 @@
+gst_audio_wsincband_finalize (GObject * object)
+ GstAudioWSincBand *self = GST_AUDIO_WSINC_BAND (object);
+ g_mutex_free (self->lock);
+ self->lock = NULL;
gst_audio_wsincband_set_property (GObject * object, guint prop_id,
@@ -364,7 +372,7 @@
case PROP_LENGTH:{
gint val;
- GST_OBJECT_LOCK (self);
+ g_mutex_lock (self->lock);
val = g_value_get_int (value);
if (val % 2 == 0)
val++;
@@ -375,32 +383,32 @@
self->kernel_length = val;
gst_audio_wsincband_build_kernel (self);
}
- GST_OBJECT_UNLOCK (self);
+ g_mutex_unlock (self->lock);
}
self->lower_frequency = g_value_get_float (value);
gst_audio_wsincband_build_kernel (self);
self->upper_frequency = g_value_get_float (value);
self->mode = g_value_get_enum (value);
case PROP_WINDOW:
self->window = g_value_get_enum (value);
Index: audiowsincband.h
RCS file: /cvs/gstreamer/gst-plugins-good/gst/audiofx/audiowsincband.h,v
--- audiowsincband.h 11 Jan 2009 19:03:38 -0000 1.9
+++ audiowsincband.h 13 Jan 2009 08:24:24 -0000 1.10
@@ -60,11 +60,13 @@
struct _GstAudioWSincBand {
GstAudioFXBaseFIRFilter parent;
- /* < private > */
gint mode;
gint window;
gfloat lower_frequency, upper_frequency;
gint kernel_length; /* length of the filter kernel */
struct _GstAudioWSincBandClass {
Index: audiowsinclimit.c
RCS file: /cvs/gstreamer/gst-plugins-good/gst/audiofx/audiowsinclimit.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- audiowsinclimit.c 11 Jan 2009 19:03:38 -0000 1.47
+++ audiowsinclimit.c 13 Jan 2009 08:24:25 -0000 1.48
@@ -26,11 +26,6 @@
@@ -147,6 +142,7 @@
static void gst_audio_wsinclimit_get_property (GObject * object, guint prop_id,
+static void gst_audio_wsinclimit_finalize (GObject * object);
static gboolean gst_audio_wsinclimit_setup (GstAudioFilter * base,
@@ -175,6 +171,7 @@
gobject_class->set_property = gst_audio_wsinclimit_set_property;
gobject_class->get_property = gst_audio_wsinclimit_get_property;
+ gobject_class->finalize = gst_audio_wsinclimit_finalize;
@@ -211,6 +208,8 @@
self->kernel_length = 101;
self->cutoff = 0.0;
@@ -293,6 +292,17 @@
+gst_audio_wsinclimit_finalize (GObject * object)
+ GstAudioWSincLimit *self = GST_AUDIO_WSINC_LIMIT (object);
gst_audio_wsinclimit_set_property (GObject * object, guint prop_id,
@@ -304,7 +314,7 @@
@@ -315,26 +325,26 @@
gst_audio_wsinclimit_build_kernel (self);
case PROP_FREQUENCY:
self->cutoff = g_value_get_float (value);
gst_audio_wsinclimit_build_kernel (self);
Index: audiowsinclimit.h
RCS file: /cvs/gstreamer/gst-plugins-good/gst/audiofx/audiowsinclimit.h,v
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- audiowsinclimit.h 11 Jan 2009 19:03:38 -0000 1.11
+++ audiowsinclimit.h 13 Jan 2009 08:24:25 -0000 1.12
struct _GstAudioWSincLimit {
gint kernel_length;
struct _GstAudioWSincLimitClass {
--===============1550921893171750648==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
--===============1550921893171750648==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
gstreamer-cvs-verbose mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gstreamer-cvs-verbose
--===============1550921893171750648==--