Commit b76819bb authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

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.
parent 9a1a9abb
2008-01-08 Sebastian Dröge <slomo@circular-chaos.org>
* 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.
2008-01-07 Tim-Philipp Müller <tim at centricular dot net>
 
* sys/directdraw/gstdirectdrawsink.c:
......
......@@ -46,7 +46,7 @@ dnl AS_LIBTOOL_TAGS
AM_PROG_LIBTOOL
dnl *** required versions of GStreamer stuff ***
GST_REQ=0.10.15
GST_REQ=0.10.15.1
GSTPB_REQ=0.10.15
dnl *** autotools stuff ****
......
......@@ -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;
......
......@@ -885,12 +885,12 @@ gst_audio_chebyshev_freq_band_transform_ip (GstBaseTransform * base,
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))
return GST_FLOW_OK;
if (!filter->have_coeffs)
generate_coefficients (filter);
......
......@@ -785,12 +785,12 @@ gst_audio_chebyshev_freq_limit_transform_ip (GstBaseTransform * base,
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))
return GST_FLOW_OK;
if (!filter->have_coeffs)
generate_coefficients (filter);
......
......@@ -885,12 +885,12 @@ gst_audio_chebyshev_freq_band_transform_ip (GstBaseTransform * base,
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))
return GST_FLOW_OK;
if (!filter->have_coeffs)
generate_coefficients (filter);
......
......@@ -785,12 +785,12 @@ gst_audio_chebyshev_freq_limit_transform_ip (GstBaseTransform * base,
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))
return GST_FLOW_OK;
if (!filter->have_coeffs)
generate_coefficients (filter);
......
......@@ -280,6 +280,7 @@ gst_audio_dynamic_init (GstAudioDynamic * filter, GstAudioDynamicClass * klass)
filter->characteristics = CHARACTERISTICS_HARD_KNEE;
filter->mode = MODE_COMPRESSOR;
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), TRUE);
gst_base_transform_set_gap_aware (GST_BASE_TRANSFORM (filter), TRUE);
}
static void
......@@ -699,12 +700,13 @@ gst_audio_dynamic_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;
......
......@@ -148,6 +148,7 @@ gst_audio_invert_init (GstAudioInvert * filter, GstAudioInvertClass * klass)
{
filter->degree = 0.0;
gst_base_transform_set_in_place (GST_BASE_TRANSFORM (filter), TRUE);
gst_base_transform_set_gap_aware (GST_BASE_TRANSFORM (filter), TRUE);
}
static void
......@@ -240,12 +241,13 @@ gst_audio_invert_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;
......
......@@ -242,12 +242,15 @@ static void
gst_audio_panorama_init (GstAudioPanorama * filter,
GstAudioPanoramaClass * klass)
{
filter->panorama = 0;
filter->method = METHOD_PSYCHOACOUSTIC;
filter->width = 0;
filter->channels = 0;
filter->format_float = FALSE;
filter->process = NULL;
gst_base_transform_set_gap_aware (GST_BASE_TRANSFORM (filter), TRUE);
}
static gboolean
......@@ -634,6 +637,12 @@ gst_audio_panorama_transform (GstBaseTransform * base, GstBuffer * inbuf,
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (outbuf)))
gst_object_sync_values (G_OBJECT (filter), GST_BUFFER_TIMESTAMP (outbuf));
if (G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_GAP))) {
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_GAP);
memset (GST_BUFFER_DATA (outbuf), 0, GST_BUFFER_SIZE (outbuf));
return GST_FLOW_OK;
}
filter->process (filter, GST_BUFFER_DATA (inbuf),
GST_BUFFER_DATA (outbuf), num_samples);
......
......@@ -215,6 +215,8 @@ gst_level_init (GstLevel * filter, GstLevelClass * g_class)
filter->message = TRUE;
filter->process = NULL;
gst_base_transform_set_gap_aware (GST_BASE_TRANSFORM (filter), TRUE);
}
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment