mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
basecamerasrc: Add some more logging
Adds some more logging and always assume capture has started before start_capture is called. This helps on image captures that might call finish_capture directly from start_capture or before start_capture finishes.
This commit is contained in:
parent
539f10f4d9
commit
ea959add31
1 changed files with 6 additions and 1 deletions
|
@ -222,6 +222,8 @@ gst_base_camera_src_start_capture (GstBaseCameraSrc * src)
|
|||
|
||||
g_return_if_fail (klass->start_capture != NULL);
|
||||
|
||||
GST_DEBUG_OBJECT (src, "Starting capture");
|
||||
|
||||
g_mutex_lock (src->capturing_mutex);
|
||||
if (src->capturing) {
|
||||
GST_WARNING_OBJECT (src, "Capturing already ongoing");
|
||||
|
@ -229,10 +231,12 @@ gst_base_camera_src_start_capture (GstBaseCameraSrc * src)
|
|||
return;
|
||||
}
|
||||
|
||||
if (klass->start_capture (src)) {
|
||||
src->capturing = TRUE;
|
||||
if (klass->start_capture (src)) {
|
||||
GST_DEBUG_OBJECT (src, "Capture started");
|
||||
g_object_notify (G_OBJECT (src), "ready-for-capture");
|
||||
} else {
|
||||
src->capturing = FALSE;
|
||||
GST_WARNING_OBJECT (src, "Failed to start capture");
|
||||
}
|
||||
g_mutex_unlock (src->capturing_mutex);
|
||||
|
@ -258,6 +262,7 @@ gst_base_camera_src_stop_capture (GstBaseCameraSrc * src)
|
|||
void
|
||||
gst_base_camera_src_finish_capture (GstBaseCameraSrc * self)
|
||||
{
|
||||
GST_DEBUG_OBJECT (self, "Finishing capture");
|
||||
g_return_if_fail (self->capturing);
|
||||
self->capturing = FALSE;
|
||||
g_object_notify (G_OBJECT (self), "ready-for-capture");
|
||||
|
|
Loading…
Reference in a new issue