[cheese] Make startup slightly faster by avoiding going to PLAYING state



commit c8fa476cd85909383da50c249d99a23a36e66508
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Dec 3 19:01:22 2009 +0000

    Make startup slightly faster by avoiding going to PLAYING state
    
    When probing the framerates and resolutions supported by the
    webcam, avoid going to PLAYING then PAUSED state, and
    just use READY.
    
    Increase GStreamer requirements for bug #587082

 configure.ac              |    2 +-
 libcheese/cheese-camera.c |    4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5010dcf..2173eca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,7 +64,7 @@ GTK_REQUIRED=2.19.1
 GDK_REQUIRED=2.14.0
 LIBGNOMEDESKTOP_REQUIRED=2.26.0
 GCONF_REQUIRED=2.16.0
-GSTREAMER_REQUIRED=0.10.20
+GSTREAMER_REQUIRED=0.10.23
 LIBEBOOK_REQUIRED=1.12.0
 CAIRO_REQUIRED=1.4.0
 DBUS_REQUIRED=1.0
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index c839685..5182a7c 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -562,7 +562,7 @@ cheese_camera_get_camera_device_data (CheeseCamera       *camera,
     if ((pipeline != NULL) && (err == NULL))
     {
       /* Start the pipeline and wait for max. 10 seconds for it to start up */
-      gst_element_set_state (pipeline, GST_STATE_PLAYING);
+      gst_element_set_state (pipeline, GST_STATE_READY);
       ret = gst_element_get_state (pipeline, NULL, NULL, 10 * GST_SECOND);
 
       /* Check if any error messages were posted on the bus */
@@ -577,8 +577,6 @@ cheese_camera_get_camera_device_data (CheeseCamera       *camera,
         char       *name;
         GstCaps    *caps;
 
-        gst_element_set_state (pipeline, GST_STATE_PAUSED);
-
         src = gst_bin_get_by_name (GST_BIN (pipeline), "source");
 
         g_object_get (G_OBJECT (src), "device-name", &name, NULL);



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