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



commit f8a899b96c1a272ac54c3e77277dbb1ab888b233
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 62cf350..5685e0b 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -693,8 +693,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;
@@ -721,7 +722,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]