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



commit 59e95038d4eaf0a8aa30507518bc10632bd745ee
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 |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index 8c015ac..cced2f0 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -573,8 +573,8 @@ cheese_camera_switch_camera_device (CheeseCamera *camera)
  * @camera: a #CheeseCamera
  */
 
-void
-cheese_camera_play (CheeseCamera *camera)
+static void
+cheese_camera_set_new_caps (CheeseCamera *camera)
 {
   CheeseCameraPrivate *priv   = CHEESE_CAMERA_GET_PRIVATE (camera);
   CheeseCameraDevice  *device = g_ptr_array_index (priv->camera_devices, priv->selected_device);
@@ -597,7 +597,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]