summaryrefslogtreecommitdiffstats
path: root/gst/audiofx/audioamplify.c
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-01-08 14:58:18 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-01-08 14:58:18 +0000
commitb76819bbd28ffd2ba208d0a2fc55cbbeb928f503 (patch)
tree90a76878827c8b95131b9a42101350ed89de6965 /gst/audiofx/audioamplify.c
parent9a1a9abb9e85e5ac05b5d8314e18114f5857e3f5 (diff)
Make elements GST_BUFFER_FLAG_GAP aware and call gst_base_transform_set_gap_aware for this.
Original commit message from CVS: * configure.ac: * gst/audiofx/audioamplify.c: (gst_audio_amplify_clipping_method_get_type), (gst_audio_amplify_init), (gst_audio_amplify_transform_ip): * gst/audiofx/audiodynamic.c: (gst_audio_dynamic_init), (gst_audio_dynamic_transform_ip): * gst/audiofx/audioinvert.c: (gst_audio_invert_init), (gst_audio_invert_transform_ip): * gst/audiofx/audiopanorama.c: (gst_audio_panorama_init), (gst_audio_panorama_transform): * gst/level/gstlevel.c: (gst_level_init): Make elements GST_BUFFER_FLAG_GAP aware and call gst_base_transform_set_gap_aware for this. Bump core requirement to CVS. * gst/audiofx/audiochebyshevfreqband.c: (gst_audio_chebyshev_freq_band_transform_ip): * gst/audiofx/audiochebyshevfreqlimit.c: (gst_audio_chebyshev_freq_limit_transform_ip): Also sync GObject properties to the controller if operating in passthrough mode.
Diffstat (limited to 'gst/audiofx/audioamplify.c')
-rw-r--r--gst/audiofx/audioamplify.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gst/audiofx/audioamplify.c b/gst/audiofx/audioamplify.c
index 9292e4ec..948c187c 100644
--- a/gst/audiofx/audioamplify.c
+++ b/gst/audiofx/audioamplify.c
@@ -97,6 +97,7 @@ gst_audio_amplify_clipping_method_get_type (void)
{0, NULL, NULL}
};
+ /* FIXME 0.11: rename to GstAudioAmplifyClippingMethod */
gtype = g_enum_register_static ("GstAudioPanoramaClippingMethod", values);
}
return gtype;
@@ -218,6 +219,7 @@ gst_audio_amplify_init (GstAudioAmplify * filter, GstAudioAmplifyClass * klass)
filter->clipping_method = METHOD_CLIP;
filter->format_index = 0;
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), TRUE);
+ gst_base_transform_set_gap_aware (GST_BASE_TRANSFORM (filter), TRUE);
}
static gboolean
@@ -414,12 +416,13 @@ gst_audio_amplify_transform_ip (GstBaseTransform * base, GstBuffer * buf)
guint num_samples =
GST_BUFFER_SIZE (buf) / (GST_AUDIO_FILTER (filter)->format.width / 8);
- if (gst_base_transform_is_passthrough (base))
- return GST_FLOW_OK;
-
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buf)))
gst_object_sync_values (G_OBJECT (filter), GST_BUFFER_TIMESTAMP (buf));
+ if (gst_base_transform_is_passthrough (base) ||
+ G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_GAP)))
+ return GST_FLOW_OK;
+
filter->process (filter, GST_BUFFER_DATA (buf), num_samples);
return GST_FLOW_OK;