From: Jeongmo Yang Date: Thu, 16 Mar 2017 07:55:25 +0000 (+0900) Subject: Add new command dispatcher(current NULL) and modify return value for dispatcher X-Git-Tag: accepted/tizen/common/20170329.171835~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ece8bceae96022a4c7a7895781835fedacd3900d;p=platform%2Fcore%2Fmultimedia%2Fmmsvc-camera.git Add new command dispatcher(current NULL) and modify return value for dispatcher [Version] 0.2.75 [Profile] Common [Issue Type] Update Change-Id: I7b89f36829dec90b4a5bb3ea995996e55022495d Signed-off-by: Jeongmo Yang --- diff --git a/muse/include/muse_camera.h b/muse/include/muse_camera.h index 3de83f2..d6c7146 100644 --- a/muse/include/muse_camera.h +++ b/muse/include/muse_camera.h @@ -340,7 +340,7 @@ typedef struct { */ typedef enum { MUSE_CAMERA_ERROR_INVALID = -1, - MUSE_CAMERA_ERROR_NONE = 1, + MUSE_CAMERA_ERROR_NONE = 0, } muse_camera_error_e; /** diff --git a/muse/src/muse_camera_dispatcher.c b/muse/src/muse_camera_dispatcher.c index 37c6c0b..9aeb869 100644 --- a/muse/src/muse_camera_dispatcher.c +++ b/muse/src/muse_camera_dispatcher.c @@ -1386,7 +1386,7 @@ int camera_dispatcher_create(muse_module_h module) ret = CAMERA_ERROR_PERMISSION_DENIED; LOGE("security check failed 0x%x", ret); muse_camera_msg_return(api, class, ret, module); - return MUSE_CAMERA_ERROR_NONE; + return MUSE_CAMERA_ERROR_INVALID; } /* init handle */ @@ -1395,7 +1395,7 @@ int camera_dispatcher_create(muse_module_h module) ret = CAMERA_ERROR_OUT_OF_MEMORY; LOGE("handle alloc failed 0x%x", ret); muse_camera_msg_return(api, class, ret, module); - return MUSE_CAMERA_ERROR_NONE; + return MUSE_CAMERA_ERROR_INVALID; } memset(muse_camera, 0x0, sizeof(muse_camera_handle_s)); @@ -1410,7 +1410,7 @@ int camera_dispatcher_create(muse_module_h module) ret = CAMERA_ERROR_INVALID_OPERATION; muse_camera_msg_return(api, class, ret, module); - return MUSE_CAMERA_ERROR_NONE; + return MUSE_CAMERA_ERROR_INVALID; } ret = legacy_camera_create((camera_device_e)device_type, &muse_camera->camera_handle); @@ -1419,7 +1419,7 @@ int camera_dispatcher_create(muse_module_h module) muse_camera = NULL; muse_camera_msg_return(api, class, ret, module); - return MUSE_CAMERA_ERROR_NONE; + return MUSE_CAMERA_ERROR_INVALID; } g_mutex_init(&muse_camera->task_lock); @@ -1492,7 +1492,7 @@ _CREATE_ERROR: muse_camera = NULL; muse_camera_msg_return(api, class, ret, module); - return MUSE_CAMERA_ERROR_NONE; + return MUSE_CAMERA_ERROR_INVALID; } @@ -1536,7 +1536,10 @@ int camera_dispatcher_destroy(muse_module_h module) muse_camera_msg_return(api, class, ret, module); - return MUSE_CAMERA_ERROR_NONE; + if (ret == CAMERA_ERROR_NONE) + return MUSE_CAMERA_ERROR_NONE; + else + return MUSE_CAMERA_ERROR_INVALID; } int camera_dispatcher_start_preview(muse_module_h module) @@ -5209,5 +5212,6 @@ int (*cmd_dispatcher[MUSE_MODULE_COMMAND_MAX])(muse_module_h module) = { camera_cmd_dispatcher_shutdown, /* MUSE_MODULE_COMMAND_SHUTDOWN */ NULL, /* MUSE_MODULE_COMMAND_DEBUG_INFO_DUMP */ NULL, /* MUSE_MODULE_COMMAND_CREATE_SERVER_ACK */ - NULL /* MUSE_MODULE_COMMAND_RESOURCE_NOT_AVAILABLE */ + NULL, /* MUSE_MODULE_COMMAND_RESOURCE_NOT_AVAILABLE */ + NULL /* MUSE_MODULE_COMMAND_EXTERNAL_STORAGE_STATE_CHANGED */ }; diff --git a/packaging/mmsvc-camera.spec b/packaging/mmsvc-camera.spec index e3d2ae7..10bcf03 100644 --- a/packaging/mmsvc-camera.spec +++ b/packaging/mmsvc-camera.spec @@ -1,6 +1,6 @@ Name: mmsvc-camera Summary: A Camera module for muse server -Version: 0.2.74 +Version: 0.2.75 Release: 0 Group: Multimedia/Libraries License: Apache-2.0