Remove delay when force stop is called while continuous capturing 40/147640/1 accepted/tizen/unified/20170908.220343 submit/tizen/20170907.073627
authorJeongmo Yang <jm80.yang@samsung.com>
Fri, 24 Mar 2017 07:39:13 +0000 (16:39 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 5 Sep 2017 07:36:35 +0000 (16:36 +0900)
- "capturing" flag is not updated although continuous shot break attribute is set as TRUE

[Version] 0.10.133
[Profile] Common
[Issue Type] Bug fix
[Dependency module] N/A

Change-Id: Id0a3341530b061943b13e94d05dfbfe87a4c87a6
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/libmm-camcorder.spec
src/mm_camcorder_attribute.c
src/mm_camcorder_stillshot.c

index 0e97076..d804c54 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.132
+Version:    0.10.133
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index bc6799e..4e80004 100644 (file)
@@ -2004,6 +2004,7 @@ bool _mmcamcorder_commit_capture_break_cont_shot(MMHandleType handle, int attr_i
        const char *videosrc_name = NULL;
        mmf_camcorder_t *hcamcorder = MMF_CAMCORDER(handle);
        _MMCamcorderSubContext *sc = NULL;
+       _MMCamcorderImageInfo *info = NULL;
        GstCameraControl *control = NULL;
        type_element *VideosrcElement = NULL;
 
@@ -2022,7 +2023,18 @@ bool _mmcamcorder_commit_capture_break_cont_shot(MMHandleType handle, int attr_i
        if (!sc)
                return TRUE;
 
+       info = sc->info_image;
+       if (!info) {
+               _mmcam_dbg_err("info image is NULL");
+               return FALSE;
+       }
+
        if (ivalue && current_state == MM_CAMCORDER_STATE_CAPTURING) {
+               if (info->capture_send_count > 0) {
+                       info->capturing = FALSE;
+                       _mmcam_dbg_warn("capturing -> FALSE and skip capture callback since now");
+               }
+
                if (!GST_IS_CAMERA_CONTROL(sc->element[_MMCAMCORDER_VIDEOSRC_SRC].gst)) {
                        _mmcam_dbg_warn("Can't cast Video source into camera control.");
                        return TRUE;
index 0539c50..f6d1b7d 100644 (file)
@@ -1209,6 +1209,10 @@ static void __mmcamcorder_image_capture_cb(GstElement *element, GstSample *sampl
        if (!info->capturing || stop_cont_shot) {
                _mmcam_dbg_warn("stop command[%d] or not capturing state[%d]. skip this...", stop_cont_shot, info->capturing);
 
+               /* set FALSE here for the case that info->capturing is still FALSE
+                       (== capture_send_count is 0 at the time _mmcamcorder_commit_capture_break_cont_shot is called) */
+               info->capturing = FALSE;
+
                /*free GstBuffer*/
                if (sample1)
                        gst_sample_unref(sample1);