[cheese/camerabin2: 13/18] libcheese: split cheese_camera_set_new_caps from cheese_camera_play



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

    libcheese: split cheese_camera_set_new_caps 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 40abf9d..eab375b 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -717,8 +717,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;
@@ -745,7 +746,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]