summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2012-04-02 11:13:09 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2012-04-02 11:13:09 +0200
commitff58bf3db93d346a27d77d2b21f3fa5e43970518 (patch)
treeca8489dce44af7a261e1a98142f62be6de77c798 /gst
parent068ee88862af7a55c478a69a06530087b52932ce (diff)
downloadgstreamer-plugins-good-ff58bf3db93d346a27d77d2b21f3fa5e43970518.tar.gz
use transform_ip_on_passthrough
Diffstat (limited to 'gst')
-rw-r--r--gst/alpha/gstalphacolor.c4
-rw-r--r--gst/audiofx/audioamplify.c9
-rw-r--r--gst/audiofx/audiodynamic.c5
-rw-r--r--gst/audiofx/audiofxbaseiirfilter.c4
-rw-r--r--gst/audiofx/audioinvert.c9
-rw-r--r--gst/audiofx/audiokaraoke.c9
-rw-r--r--gst/videofilter/gstgamma.c5
-rw-r--r--gst/videofilter/gstvideobalance.c6
8 files changed, 22 insertions, 29 deletions
diff --git a/gst/alpha/gstalphacolor.c b/gst/alpha/gstalphacolor.c
index e7473e5c5..ea074eaf6 100644
--- a/gst/alpha/gstalphacolor.c
+++ b/gst/alpha/gstalphacolor.c
@@ -92,6 +92,7 @@ gst_alpha_color_class_init (GstAlphaColorClass * klass)
gstbasetransform_class->transform_caps =
GST_DEBUG_FUNCPTR (gst_alpha_color_transform_caps);
+ gstbasetransform_class->transform_ip_on_passthrough = FALSE;
gstvideofilter_class->set_info = GST_DEBUG_FUNCPTR (gst_alpha_color_set_info);
gstvideofilter_class->transform_frame_ip =
@@ -678,9 +679,6 @@ gst_alpha_color_transform_frame_ip (GstVideoFilter * filter,
{
GstAlphaColor *alpha = GST_ALPHA_COLOR (filter);
- if (gst_base_transform_is_passthrough (GST_BASE_TRANSFORM (filter)))
- return GST_FLOW_OK;
-
if (G_UNLIKELY (!alpha->process))
goto not_negotiated;
diff --git a/gst/audiofx/audioamplify.c b/gst/audiofx/audioamplify.c
index e91963363..eb5820801 100644
--- a/gst/audiofx/audioamplify.c
+++ b/gst/audiofx/audioamplify.c
@@ -297,10 +297,12 @@ gst_audio_amplify_class_init (GstAudioAmplifyClass * klass)
caps);
gst_caps_unref (caps);
- GST_AUDIO_FILTER_CLASS (klass)->setup =
- GST_DEBUG_FUNCPTR (gst_audio_amplify_setup);
GST_BASE_TRANSFORM_CLASS (klass)->transform_ip =
GST_DEBUG_FUNCPTR (gst_audio_amplify_transform_ip);
+ GST_BASE_TRANSFORM_CLASS (klass)->transform_ip_on_passthrough = FALSE;
+
+ GST_AUDIO_FILTER_CLASS (klass)->setup =
+ GST_DEBUG_FUNCPTR (gst_audio_amplify_setup);
}
static void
@@ -460,8 +462,7 @@ gst_audio_amplify_transform_ip (GstBaseTransform * base, GstBuffer * buf)
if (GST_CLOCK_TIME_IS_VALID (stream_time))
gst_object_sync_values (GST_OBJECT (filter), stream_time);
- if (gst_base_transform_is_passthrough (base) ||
- G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_GAP)))
+ if (G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_GAP)))
return GST_FLOW_OK;
gst_buffer_map (buf, &map, GST_MAP_READWRITE);
diff --git a/gst/audiofx/audiodynamic.c b/gst/audiofx/audiodynamic.c
index 830cd8b40..466ded195 100644
--- a/gst/audiofx/audiodynamic.c
+++ b/gst/audiofx/audiodynamic.c
@@ -256,8 +256,10 @@ gst_audio_dynamic_class_init (GstAudioDynamicClass * klass)
GST_AUDIO_FILTER_CLASS (klass)->setup =
GST_DEBUG_FUNCPTR (gst_audio_dynamic_setup);
+
GST_BASE_TRANSFORM_CLASS (klass)->transform_ip =
GST_DEBUG_FUNCPTR (gst_audio_dynamic_transform_ip);
+ GST_BASE_TRANSFORM_CLASS (klass)->transform_ip_on_passthrough = FALSE;
}
static void
@@ -705,8 +707,7 @@ gst_audio_dynamic_transform_ip (GstBaseTransform * base, GstBuffer * buf)
if (GST_CLOCK_TIME_IS_VALID (stream_time))
gst_object_sync_values (GST_OBJECT (filter), stream_time);
- if (gst_base_transform_is_passthrough (base) ||
- G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_GAP)))
+ if (G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_GAP)))
return GST_FLOW_OK;
gst_buffer_map (buf, &map, GST_MAP_READWRITE);
diff --git a/gst/audiofx/audiofxbaseiirfilter.c b/gst/audiofx/audiofxbaseiirfilter.c
index 2255449e5..8fd0977bc 100644
--- a/gst/audiofx/audiofxbaseiirfilter.c
+++ b/gst/audiofx/audiofxbaseiirfilter.c
@@ -116,6 +116,7 @@ gst_audio_fx_base_iir_filter_class_init (GstAudioFXBaseIIRFilterClass * klass)
trans_class->transform_ip =
GST_DEBUG_FUNCPTR (gst_audio_fx_base_iir_filter_transform_ip);
+ trans_class->transform_ip_on_passthrough = FALSE;
trans_class->stop = GST_DEBUG_FUNCPTR (gst_audio_fx_base_iir_filter_stop);
}
@@ -371,9 +372,6 @@ gst_audio_fx_base_iir_filter_transform_ip (GstBaseTransform * base,
if (GST_CLOCK_TIME_IS_VALID (stream_time))
gst_object_sync_values (GST_OBJECT (filter), stream_time);
- if (gst_base_transform_is_passthrough (base))
- return GST_FLOW_OK;
-
g_return_val_if_fail (filter->a != NULL, GST_FLOW_ERROR);
gst_buffer_map (buf, &map, GST_MAP_READWRITE);
diff --git a/gst/audiofx/audioinvert.c b/gst/audiofx/audioinvert.c
index 4172392cd..961b2a0e3 100644
--- a/gst/audiofx/audioinvert.c
+++ b/gst/audiofx/audioinvert.c
@@ -121,10 +121,12 @@ gst_audio_invert_class_init (GstAudioInvertClass * klass)
caps);
gst_caps_unref (caps);
- GST_AUDIO_FILTER_CLASS (klass)->setup =
- GST_DEBUG_FUNCPTR (gst_audio_invert_setup);
GST_BASE_TRANSFORM_CLASS (klass)->transform_ip =
GST_DEBUG_FUNCPTR (gst_audio_invert_transform_ip);
+ GST_BASE_TRANSFORM_CLASS (klass)->transform_ip_on_passthrough = FALSE;
+
+ GST_AUDIO_FILTER_CLASS (klass)->setup =
+ GST_DEBUG_FUNCPTR (gst_audio_invert_setup);
}
static void
@@ -240,8 +242,7 @@ gst_audio_invert_transform_ip (GstBaseTransform * base, GstBuffer * buf)
if (GST_CLOCK_TIME_IS_VALID (stream_time))
gst_object_sync_values (GST_OBJECT (filter), stream_time);
- if (gst_base_transform_is_passthrough (base) ||
- G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_GAP)))
+ if (G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_GAP)))
return GST_FLOW_OK;
gst_buffer_map (buf, &map, GST_MAP_READWRITE);
diff --git a/gst/audiofx/audiokaraoke.c b/gst/audiofx/audiokaraoke.c
index c737dd5c1..999c6fffd 100644
--- a/gst/audiofx/audiokaraoke.c
+++ b/gst/audiofx/audiokaraoke.c
@@ -142,10 +142,12 @@ gst_audio_karaoke_class_init (GstAudioKaraokeClass * klass)
caps);
gst_caps_unref (caps);
- GST_AUDIO_FILTER_CLASS (klass)->setup =
- GST_DEBUG_FUNCPTR (gst_audio_karaoke_setup);
GST_BASE_TRANSFORM_CLASS (klass)->transform_ip =
GST_DEBUG_FUNCPTR (gst_audio_karaoke_transform_ip);
+ GST_BASE_TRANSFORM_CLASS (klass)->transform_ip_on_passthrough = FALSE;
+
+ GST_AUDIO_FILTER_CLASS (klass)->setup =
+ GST_DEBUG_FUNCPTR (gst_audio_karaoke_setup);
}
static void
@@ -348,8 +350,7 @@ gst_audio_karaoke_transform_ip (GstBaseTransform * base, GstBuffer * buf)
if (GST_CLOCK_TIME_IS_VALID (stream_time))
gst_object_sync_values (GST_OBJECT (filter), stream_time);
- if (gst_base_transform_is_passthrough (base) ||
- G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_GAP)))
+ if (G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_GAP)))
return GST_FLOW_OK;
gst_buffer_map (buf, &map, GST_MAP_READWRITE);
diff --git a/gst/videofilter/gstgamma.c b/gst/videofilter/gstgamma.c
index 481f40452..2acd17086 100644
--- a/gst/videofilter/gstgamma.c
+++ b/gst/videofilter/gstgamma.c
@@ -134,6 +134,7 @@ gst_gamma_class_init (GstGammaClass * g_class)
trans_class->before_transform =
GST_DEBUG_FUNCPTR (gst_gamma_before_transform);
+ trans_class->transform_ip_on_passthrough = FALSE;
vfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_gamma_set_info);
vfilter_class->transform_frame_ip =
@@ -400,14 +401,10 @@ gst_gamma_transform_frame_ip (GstVideoFilter * vfilter, GstVideoFrame * frame)
if (!gamma->process)
goto not_negotiated;
- if (gst_base_transform_is_passthrough (GST_BASE_TRANSFORM (vfilter)))
- goto done;
-
GST_OBJECT_LOCK (gamma);
gamma->process (gamma, frame);
GST_OBJECT_UNLOCK (gamma);
-done:
return GST_FLOW_OK;
/* ERRORS */
diff --git a/gst/videofilter/gstvideobalance.c b/gst/videofilter/gstvideobalance.c
index aee281cce..ac204ddb0 100644
--- a/gst/videofilter/gstvideobalance.c
+++ b/gst/videofilter/gstvideobalance.c
@@ -434,15 +434,10 @@ gst_video_balance_transform_frame_ip (GstVideoFilter * vfilter,
if (!videobalance->process)
goto not_negotiated;
- /* if no change is needed, we are done */
- if (gst_base_transform_is_passthrough (GST_BASE_TRANSFORM (vfilter)))
- goto done;
-
GST_OBJECT_LOCK (videobalance);
videobalance->process (videobalance, frame);
GST_OBJECT_UNLOCK (videobalance);
-done:
return GST_FLOW_OK;
/* ERRORS */
@@ -519,6 +514,7 @@ gst_video_balance_class_init (GstVideoBalanceClass * klass)
trans_class->before_transform =
GST_DEBUG_FUNCPTR (gst_video_balance_before_transform);
+ trans_class->transform_ip_on_passthrough = FALSE;
vfilter_class->set_info = GST_DEBUG_FUNCPTR (gst_video_balance_set_info);
vfilter_class->transform_frame_ip =