[cheese/camerabin2: 8/13] cheese-camera: Enable post-preview property when needed



commit 56221252c510e69db648465b3a24c38a21c37f6e
Author: Luciana Fujii Pontello <luciana fujii collabora co uk>
Date:   Tue May 10 22:05:46 2011 -0300

    cheese-camera: Enable post-preview property when needed
    
    When taking a photo to pixbuf, sets post-preview to enable camerabin2 to
    send the preview message.

 libcheese/cheese-camera.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index 45755d1..76ddd14 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -149,7 +149,7 @@ cheese_camera_photo_data (CheeseCamera *camera, GstBuffer *buffer)
                                      FALSE, bits_per_pixel, width, height, stride,
                                      data ? (GdkPixbufDestroyNotify) g_free : NULL, NULL);
 
-  g_object_set (G_OBJECT (priv->camerabin), "preview-caps", NULL, NULL);
+  g_object_set (G_OBJECT (priv->camerabin), "post-previews", FALSE, NULL);
   g_signal_emit (camera, camera_signals[PHOTO_TAKEN], 0, pixbuf);
   g_object_unref (pixbuf);
 }
@@ -899,6 +899,7 @@ cheese_camera_take_photo_pixbuf (CheeseCamera *camera)
                               "bpp", G_TYPE_INT, 24,
                               "depth", G_TYPE_INT, 24,
                               NULL);
+  g_object_set (G_OBJECT (priv->camerabin), "post-previews", TRUE, NULL);
   g_object_set (G_OBJECT (priv->camerabin), "preview-caps", caps, NULL);
   gst_caps_unref (caps);
 



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