basecamerasrc: Notify earlier
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>
Wed, 22 Dec 2010 14:44:55 +0000 (11:44 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>
Thu, 23 Dec 2010 17:25:06 +0000 (14:25 -0300)
Notify about ready-for-capture changes earlier to allow camerabin2
to do the videobin state switching before the capture starts.

gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c

index 7469f50..57582cb 100644 (file)
@@ -232,11 +232,12 @@ gst_base_camera_src_start_capture (GstBaseCameraSrc * src)
   }
 
   src->capturing = TRUE;
+  g_object_notify (G_OBJECT (src), "ready-for-capture");
   if (klass->start_capture (src)) {
     GST_DEBUG_OBJECT (src, "Capture started");
-    g_object_notify (G_OBJECT (src), "ready-for-capture");
   } else {
     src->capturing = FALSE;
+    g_object_notify (G_OBJECT (src), "ready-for-capture");
     GST_WARNING_OBJECT (src, "Failed to start capture");
   }
   g_mutex_unlock (src->capturing_mutex);