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

gst/audiofx/: The transform_ip() methods should do nothing if in passthrough mode.

Original commit message from CVS:
* gst/audiofx/audioamplify.c: (gst_audio_amplify_transform_ip):
* gst/audiofx/audiochebyshevfreqband.c:
(gst_audio_chebyshev_freq_band_transform_ip):
* gst/audiofx/audiochebyshevfreqlimit.c:
(gst_audio_chebyshev_freq_limit_transform_ip):
* gst/audiofx/audiodynamic.c: (gst_audio_dynamic_transform_ip):
* gst/audiofx/audioinvert.c: (gst_audio_invert_transform_ip):
The transform_ip() methods should do nothing if in passthrough mode.
It might get non-writable buffers in that case but the buffer might
as well be writable.
* gst/audiofx/audiopanorama.c: (gst_audio_panorama_transform):
The transform() methods won't be called in passthrough mode and
otherwise the buffer is always writable so don't check here.
parent 919e9060
2007-12-06 Sebastian Dröge <slomo@circular-chaos.org>
* gst/audiofx/audioamplify.c: (gst_audio_amplify_transform_ip):
* gst/audiofx/audiochebyshevfreqband.c:
(gst_audio_chebyshev_freq_band_transform_ip):
* gst/audiofx/audiochebyshevfreqlimit.c:
(gst_audio_chebyshev_freq_limit_transform_ip):
* gst/audiofx/audiodynamic.c: (gst_audio_dynamic_transform_ip):
* gst/audiofx/audioinvert.c: (gst_audio_invert_transform_ip):
The transform_ip() methods should do nothing if in passthrough mode.
It might get non-writable buffers in that case but the buffer might
as well be writable.
* gst/audiofx/audiopanorama.c: (gst_audio_panorama_transform):
The transform() methods won't be called in passthrough mode and
otherwise the buffer is always writable so don't check here.
2007-12-06 Tim-Philipp Müller <tim at centricular dot net>
 
* gst/wavparse/gstwavparse.c: (gst_wavparse_srcpad_event):
......
......@@ -414,7 +414,7 @@ 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_buffer_is_writable (buf))
if (gst_base_transform_is_passthrough (base))
return GST_FLOW_OK;
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buf)))
......
......@@ -885,7 +885,7 @@ 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_buffer_is_writable (buf))
if (gst_base_transform_is_passthrough (base))
return GST_FLOW_OK;
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buf)))
......
......@@ -785,7 +785,7 @@ 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_buffer_is_writable (buf))
if (gst_base_transform_is_passthrough (base))
return GST_FLOW_OK;
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buf)))
......
......@@ -885,7 +885,7 @@ 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_buffer_is_writable (buf))
if (gst_base_transform_is_passthrough (base))
return GST_FLOW_OK;
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buf)))
......
......@@ -785,7 +785,7 @@ 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_buffer_is_writable (buf))
if (gst_base_transform_is_passthrough (base))
return GST_FLOW_OK;
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buf)))
......
......@@ -699,7 +699,7 @@ 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_buffer_is_writable (buf))
if (gst_base_transform_is_passthrough (base))
return GST_FLOW_OK;
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buf)))
......
......@@ -240,7 +240,7 @@ 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_buffer_is_writable (buf))
if (gst_base_transform_is_passthrough (base))
return GST_FLOW_OK;
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buf)))
......
......@@ -169,19 +169,19 @@ static GstFlowReturn gst_audio_panorama_transform (GstBaseTransform * base,
static GstAudioPanoramaProcessFunc panorama_process_functions[2][2][2] = {
{
{(GstAudioPanoramaProcessFunc) gst_audio_panorama_transform_m2s_int,
(GstAudioPanoramaProcessFunc)
gst_audio_panorama_transform_m2s_int_simple},
(GstAudioPanoramaProcessFunc)
gst_audio_panorama_transform_m2s_int_simple},
{(GstAudioPanoramaProcessFunc) gst_audio_panorama_transform_m2s_float,
(GstAudioPanoramaProcessFunc)
gst_audio_panorama_transform_m2s_float_simple}
(GstAudioPanoramaProcessFunc)
gst_audio_panorama_transform_m2s_float_simple}
},
{
{(GstAudioPanoramaProcessFunc) gst_audio_panorama_transform_s2s_int,
(GstAudioPanoramaProcessFunc)
gst_audio_panorama_transform_s2s_int_simple},
(GstAudioPanoramaProcessFunc)
gst_audio_panorama_transform_s2s_int_simple},
{(GstAudioPanoramaProcessFunc) gst_audio_panorama_transform_s2s_float,
(GstAudioPanoramaProcessFunc)
gst_audio_panorama_transform_s2s_float_simple}
(GstAudioPanoramaProcessFunc)
gst_audio_panorama_transform_s2s_float_simple}
}
};
......@@ -631,9 +631,6 @@ gst_audio_panorama_transform (GstBaseTransform * base, GstBuffer * inbuf,
GstAudioPanorama *filter = GST_AUDIO_PANORAMA (base);
guint num_samples = GST_BUFFER_SIZE (outbuf) / (2 * filter->width);
if (!gst_buffer_is_writable (outbuf))
return GST_FLOW_OK;
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (outbuf)))
gst_object_sync_values (G_OBJECT (filter), GST_BUFFER_TIMESTAMP (outbuf));
......
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