From 4740659c6092018a35bb820dfefac545b23c5dc2 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Sun, 9 Jun 2013 17:14:00 +0200
Subject: [PATCH 02/35] cheese-camera: remove extranous csp_post_balance
videoconvert element
camerabin2 already has a videoconvert element both before and after its
video-source-filter element, so ending our own video-source-filter bin with
a videoconvert element puts 2 videoconvert elements behind each other, which
is not really useful.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
libcheese/cheese-camera.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index c42d896..7737209 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -89,7 +89,7 @@ struct _CheeseCameraPrivate
ClutterTexture *video_texture;
GstElement *effect_filter;
- GstElement *video_balance, *csp_post_balance;
+ GstElement *video_balance;
GstElement *camera_tee, *effects_tee;
GstElement *main_valve, *effects_valve;
@@ -608,29 +608,22 @@ cheese_camera_create_video_filter_bin (CheeseCamera *camera, GError **error)
cheese_camera_set_error_element_not_found (error, "videobalance");
return FALSE;
}
- if ((priv->csp_post_balance = gst_element_factory_make ("videoconvert", "csp_post_balance")) == NULL)
- {
- cheese_camera_set_error_element_not_found (error, "videoconvert");
- return FALSE;
- }
if (error != NULL && *error != NULL)
return FALSE;
gst_bin_add_many (GST_BIN (priv->video_filter_bin), priv->camera_tee,
priv->main_valve, priv->effect_filter,
- priv->video_balance, priv->csp_post_balance,
- priv->effects_preview_bin, NULL);
+ priv->video_balance, priv->effects_preview_bin, NULL);
ok &= gst_element_link_many (priv->camera_tee, priv->main_valve,
- priv->effect_filter, priv->video_balance,
- priv->csp_post_balance, NULL);
+ priv->effect_filter, priv->video_balance, NULL);
gst_pad_link (gst_element_get_request_pad (priv->camera_tee, "src_%u"),
gst_element_get_static_pad (priv->effects_preview_bin, "sink"));
/* add ghostpads */
- pad = gst_element_get_static_pad (priv->csp_post_balance, "src");
+ pad = gst_element_get_static_pad (priv->video_balance, "src");
gst_element_add_pad (priv->video_filter_bin, gst_ghost_pad_new ("src", pad));
gst_object_unref (GST_OBJECT (pad));
--
1.8.2.1