[cheese] Split setting of CheeseCamera caps from playing



commit e2a135238ec6af948fc1fa79d587817ea1c2a61b
Author: Raluca Elena Podiuc <ralucaelena1985 gmail com>
Date:   Thu Jul 28 23:20:09 2011 +0300

    Split setting of CheeseCamera caps from playing
    
    Add new cheese_camera_set_new_caps() method, split from
    cheese_camera_play().

 libcheese/cheese-camera.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index 557e3b7..0d8a66a 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -697,8 +697,9 @@ cheese_camera_switch_camera_device (CheeseCamera *camera)
  * Set the state of the GStreamer pipeline associated with the #CheeseCamera to
  * playing.
  */
-void
-cheese_camera_play (CheeseCamera *camera)
+
+static void
+cheese_camera_set_new_caps (CheeseCamera *camera)
 {
   CheeseCameraPrivate *priv;
   CheeseCameraDevice *device;
@@ -725,7 +726,13 @@ cheese_camera_play (CheeseCamera *camera)
     g_object_set (priv->camerabin, "viewfinder-caps", caps, NULL);
   }
   gst_caps_unref (caps);
+}
 
+void
+cheese_camera_play (CheeseCamera *camera)
+{
+  CheeseCameraPrivate *priv   = CHEESE_CAMERA_GET_PRIVATE (camera);
+  cheese_camera_set_new_caps (camera);
   gst_element_set_state (priv->camerabin, GST_STATE_PLAYING);
   priv->pipeline_is_playing = TRUE;
 }



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