* <refsect2>
* <title>Example launch line</title>
* |[
- * gst-launch videotestsrc ! videobalance saturation=0.0 ! ffmpegcolorspace ! ximagesink
+ * gst-launch-1.0 videotestsrc ! videobalance saturation=0.0 ! videoconvert ! ximagesink
* ]| This pipeline converts the image to black and white by setting the
* saturation to 0.0.
* </refsect2>
static void
gst_video_balance_update_properties (GstVideoBalance * videobalance)
{
- gboolean passthrough = gst_video_balance_is_passthrough (videobalance);
+ gboolean passthrough;
GstBaseTransform *base = GST_BASE_TRANSFORM (videobalance);
- gst_base_transform_set_passthrough (base, passthrough);
-
+ GST_OBJECT_LOCK (videobalance);
+ passthrough = gst_video_balance_is_passthrough (videobalance);
if (!passthrough)
gst_video_balance_update_tables (videobalance);
+ GST_OBJECT_UNLOCK (videobalance);
+
+ gst_base_transform_set_passthrough (base, passthrough);
}
static void
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 */
DEFAULT_PROP_SATURATION,
GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
- gst_element_class_set_details_simple (gstelement_class, "Video balance",
+ gst_element_class_set_static_metadata (gstelement_class, "Video balance",
"Filter/Effect/Video",
"Adjusts brightness, contrast, hue, saturation on a video stream",
"David Schleef <ds@schleef.org>");
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 =
break;
}
- gst_video_balance_update_properties (balance);
GST_OBJECT_UNLOCK (balance);
+ gst_video_balance_update_properties (balance);
if (label) {
GstColorBalanceChannel *channel =