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



commit 1df167939ea944b3a2b235b998afc6f4a15bda2b
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 41e32c4..f080ce6 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -175,7 +175,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);
 }
@@ -1135,6 +1135,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]