Change lock mechanism to support set/unset preview callback in preview state [MPR... 13/137113/2
authorHaesu Gwon <haesu.gwon@samsung.com>
Tue, 4 Jul 2017 10:58:55 +0000 (19:58 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Tue, 18 Jul 2017 05:10:21 +0000 (14:10 +0900)
[Version] 0.10.127
[Profile] Common
[Issue Type] Update
[Dependency module] N/A

Change-Id: Iaaabab52069d742f41c4b4c73fa054f8387514e7
Signed-off-by: Haesu Gwon <haesu.gwon@samsung.com>
packaging/libmm-camcorder.spec
src/mm_camcorder_internal.c

index 0963808..e105585 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.126
+Version:    0.10.127
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 78c610f..327e08d 100644 (file)
@@ -2066,10 +2066,7 @@ int _mmcamcorder_set_video_stream_callback(MMHandleType handle, mm_camcorder_vid
        if (callback == NULL)
                _mmcam_dbg_warn("Video Stream Callback is disabled, because application sets it to NULL");
 
-       if (!_MMCAMCORDER_TRYLOCK_VSTREAM_CALLBACK(hcamcorder)) {
-               _mmcam_dbg_warn("Application's video stream callback is running now");
-               return MM_ERROR_CAMCORDER_INVALID_CONDITION;
-       }
+       _MMCAMCORDER_LOCK_VSTREAM_CALLBACK(hcamcorder);
 
        hcamcorder->vstream_cb = callback;
        hcamcorder->vstream_cb_param = user_data;