From 37aa6a9c718eb78731bd2427470db678fb5fe7cc Mon Sep 17 00:00:00 2001 From: Lasse Laukkanen Date: Tue, 1 Nov 2011 10:38:33 -0300 Subject: [PATCH] camerabin2: track also preview images with processing counter Makes camerabin2 only signal that it is idle after all previews have been generated, images are captured and saved, and videos have been finished properly. --- gst/camerabin2/gstcamerabin2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c index 8d1de91408..4c68a3f779 100644 --- a/gst/camerabin2/gstcamerabin2.c +++ b/gst/camerabin2/gstcamerabin2.c @@ -377,6 +377,11 @@ gst_camera_bin_start_capture (GstCameraBin2 * camerabin) GST_CAMERA_BIN2_PROCESSING_INC (camerabin); + if (camerabin->post_previews) { + /* Count processing of preview images too */ + GST_CAMERA_BIN2_PROCESSING_INC (camerabin); + } + if (camerabin->location) location = g_strdup_printf (camerabin->location, capture_index); @@ -974,6 +979,9 @@ gst_camera_bin_handle_message (GstBin * bin, GstMessage * message) gst_structure_take_value ((GstStructure *) structure, "location", value); } + + GST_LOG_OBJECT (bin, "received preview-image message"); + GST_CAMERA_BIN2_PROCESSING_DEC (GST_CAMERA_BIN2_CAST (bin)); } } break;