[cheese] cheese-camera: Set filter-caps property



commit 467ec12c1a22b266ad2ee5186e962b9638434e04
Author: Luciana Fujii Pontello <luciana fujii eti br>
Date:   Thu Jan 20 17:12:02 2011 -0200

    cheese-camera: Set filter-caps property
    
    Set filter-caps property to avoid camerabin default of video/x-raw-yuv
    format=(fourcc)I420.

 libcheese/cheese-camera.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index 074329c..b66c274 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -1105,6 +1105,7 @@ cheese_camera_setup (CheeseCamera *camera, const char *id, GError **error)
 
   GError  *tmp_error = NULL;
   GstElement *video_sink;
+  GstCaps *caps;
 
   cheese_camera_detect_camera_devices (camera);
 
@@ -1147,6 +1148,12 @@ cheese_camera_setup (CheeseCamera *camera, const char *id, GError **error)
                 GST_CAMERABIN_FLAG_VIDEO_COLOR_CONVERSION,
                 NULL);
 
+  /* Set caps to filter, so it doesn't defaults to I420 format*/
+
+  caps = gst_caps_from_string ("video/x-raw-yuv; video/x-raw-rgb");
+  g_object_set (G_OBJECT (priv->camerabin), "filter-caps", caps, NULL);
+  gst_caps_unref (caps);
+
   cheese_camera_set_camera_source (camera);
 
   cheese_camera_create_video_filter_bin (camera, &tmp_error);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]