Change calling thread from sub to main for capture callback 68/88968/1 accepted/tizen/3.0/ivi/20161011.055413 accepted/tizen/3.0/mobile/20161015.033621 accepted/tizen/3.0/tv/20161016.005432 accepted/tizen/3.0/wearable/20161015.083520 accepted/tizen/common/20160921.162255 accepted/tizen/ivi/20160922.042642 accepted/tizen/mobile/20160922.042422 accepted/tizen/tv/20160922.042514 accepted/tizen/wearable/20160922.042557 submit/tizen/20160921.041639 submit/tizen_3.0_ivi/20161010.000005 submit/tizen_3.0_mobile/20161015.000004 submit/tizen_3.0_tv/20161015.000004 submit/tizen_3.0_wearable/20161015.000004
authorJeongmo Yang <jm80.yang@samsung.com>
Wed, 21 Sep 2016 08:44:28 +0000 (17:44 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Wed, 21 Sep 2016 08:44:28 +0000 (17:44 +0900)
[Version] 0.2.50
[Profile] Common
[Issue Type] Update

Change-Id: I3d3b05e03edb061b97040bd89f343ed3a668c599
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
muse/src/muse_camera_dispatcher.c
packaging/mmsvc-camera.spec

index 4d4d8bc..546c8f0 100644 (file)
@@ -519,7 +519,7 @@ void _camera_dispatcher_capturing_cb(camera_image_data_s* image, camera_image_da
        /* send message */
        muse_camera_msg_event3(MUSE_CAMERA_CB_EVENT,
                MUSE_CAMERA_EVENT_TYPE_CAPTURE,
-               MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+               MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
                module,
                INT, tbm_key_main,
                INT, tbm_key_post,
@@ -584,25 +584,26 @@ void _camera_dispatcher_state_changed_cb(camera_state_e previous, camera_state_e
                INT, by_policy);
 
        muse_camera = (muse_camera_handle_s *)muse_core_ipc_get_handle(module);
-       if (muse_camera) {
-               ret = legacy_camera_get_device_type(muse_camera->camera_handle, &device_type);
-               if (ret != CAMERA_ERROR_NONE) {
-                       LOGE("get device type failed 0x%x", ret);
-                       return;
-               }
+       if (!muse_camera) {
+               LOGW("NULL muse camera handle");
+               return;
+       }
 
-               snprintf(value_key, KEY_LENGTH, "device_state_camera%d", device_type);
-               if (previous == CAMERA_STATE_CREATED && current == CAMERA_STATE_PREVIEW)
-                       set_value = CAMERA_DEVICE_STATE_WORKING;
-               else if (previous == CAMERA_STATE_PREVIEW && current == CAMERA_STATE_CREATED)
-                       set_value = CAMERA_DEVICE_STATE_NULL;
+       ret = legacy_camera_get_device_type(muse_camera->camera_handle, &device_type);
+       if (ret != CAMERA_ERROR_NONE) {
+               LOGE("get device type failed 0x%x", ret);
+               return;
+       }
 
-               if (set_value != -1) {
-                       LOGD("device state set : %d", set_value);
-                       muse_core_client_set_value(module, value_key, set_value);
-               }
-       } else {
-               LOGW("NULL muse camera handle");
+       snprintf(value_key, KEY_LENGTH, "device_state_camera%d", device_type);
+       if (previous == CAMERA_STATE_CREATED && current == CAMERA_STATE_PREVIEW)
+               set_value = CAMERA_DEVICE_STATE_WORKING;
+       else if (previous == CAMERA_STATE_PREVIEW && current == CAMERA_STATE_CREATED)
+               set_value = CAMERA_DEVICE_STATE_NULL;
+
+       if (set_value != -1) {
+               LOGD("device[%s] state set : %d", value_key, set_value);
+               muse_core_client_set_value(module, value_key, set_value);
        }
 
        return;
index 12339df..92e8f72 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-camera
 Summary:    A Camera module for muse server
-Version:    0.2.49
+Version:    0.2.50
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0