basecamerasrc: Notify earlier

Notify about ready-for-capture changes earlier to allow camerabin2
to do the videobin state switching before the capture starts.
This commit is contained in:
Thiago Santos 2010-12-22 11:44:55 -03:00
parent 1ff89c5f83
commit 614c4d8f6e

View 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);