[cheese/videobalance: 1/4] Add a videobalance to the pipeline
- From: Filippo Argiolas <fargiolas src gnome org>
- To: svn-commits-list gnome org
- Subject: [cheese/videobalance: 1/4] Add a videobalance to the pipeline
- Date: Wed, 22 Apr 2009 16:33:53 -0400 (EDT)
commit 59dd8ddc966c23f9ada5c69215f91529a3708b4f
Author: Filippo Argiolas <filippo argiolas gmail com>
Date: Wed Apr 22 18:54:52 2009 +0200
Add a videobalance to the pipeline
Add a videobalance element to video_display_bin to make room for upcoming
contrast, brightness, etc, preferences.
Not sure the colorspace converter is really needed, deeper look needed.
---
src/cheese-webcam.c | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/cheese-webcam.c b/src/cheese-webcam.c
index 1d2130e..17a6c01 100644
--- a/src/cheese-webcam.c
+++ b/src/cheese-webcam.c
@@ -78,6 +78,7 @@ typedef struct
GstElement *video_enc;
GstElement *effect_filter, *csp_post_effect;
+ GstElement *video_balance, *csp_post_balance;
gulong photo_handler_signal_id;
@@ -943,6 +944,17 @@ cheese_webcam_create_video_display_bin (CheeseWebcam *webcam, GError **error)
{
cheese_webcam_set_error_element_not_found (error, "ffmpegcolorspace");
}
+ if ((priv->video_balance = gst_element_factory_make ("videobalance", "video_balance")) == NULL)
+ {
+ cheese_webcam_set_error_element_not_found(error, "videobalance");
+ return FALSE;
+ }
+ if ((priv->csp_post_balance = gst_element_factory_make ("ffmpegcolorspace", "csp_post_balance")) == NULL)
+ {
+ cheese_webcam_set_error_element_not_found(error, "ffmpegcolorspace");
+ return FALSE;
+ }
+
if ((tee = gst_element_factory_make ("tee", "tee")) == NULL)
{
@@ -978,11 +990,15 @@ cheese_webcam_create_video_display_bin (CheeseWebcam *webcam, GError **error)
return FALSE;
gst_bin_add_many (GST_BIN (priv->video_display_bin), priv->webcam_source_bin,
- priv->effect_filter, priv->csp_post_effect, tee, save_queue,
+ priv->effect_filter, priv->csp_post_effect,
+ priv->video_balance, priv->csp_post_balance,
+ tee, save_queue,
video_display_queue, video_scale, video_sink, NULL);
ok = gst_element_link_many (priv->webcam_source_bin, priv->effect_filter,
- priv->csp_post_effect, tee, NULL);
+ priv->csp_post_effect,
+ priv->video_balance, priv->csp_post_balance,
+ tee, NULL);
ok &= gst_element_link_many (tee, save_queue, NULL);
ok &= gst_element_link_many (tee, video_display_queue, video_scale, video_sink, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]