From c0a9952af8e1325e709533edbc6b9b053315ff04 Mon Sep 17 00:00:00 2001 From: Jeongmo Yang Date: Thu, 13 Jun 2019 10:25:08 +0900 Subject: [PATCH] Fix bug - The minus value could not be sent for setting pan/tilt [Version] 0.4.25 [Profile] Common [Issue Type] Bug fix Change-Id: I88b14492347254a481df830b921cb0a406dbfdcb Signed-off-by: Jeongmo Yang --- packaging/capi-media-camera.spec | 2 +- src/camera.c | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec index 182cf1e..54283d3 100644 --- a/packaging/capi-media-camera.spec +++ b/packaging/capi-media-camera.spec @@ -1,6 +1,6 @@ Name: capi-media-camera Summary: A Camera API -Version: 0.4.24 +Version: 0.4.25 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/camera.c b/src/camera.c index 4e34fd3..4a11ccf 100644 --- a/src/camera.c +++ b/src/camera.c @@ -6373,9 +6373,8 @@ int camera_attr_set_pan(camera_h camera, camera_attr_ptz_move_type_e move_type, int ret = CAMERA_ERROR_NONE; camera_cli_s *pc = (camera_cli_s *)camera; muse_camera_api_e api = MUSE_CAMERA_API_ATTR_SET_PAN; - camera_msg_param param; - int set_move_type = (int)move_type; - int value = 0; + camera_msg_param param0; + camera_msg_param param1; if (!pc || !pc->cb_info) { LOGE("NULL handle"); @@ -6384,10 +6383,11 @@ int camera_attr_set_pan(camera_h camera, camera_attr_ptz_move_type_e move_type, LOGD("Enter"); - value = (set_move_type << 16) | pan_step; - CAMERA_MSG_PARAM_SET(param, INT, value); + CAMERA_MSG_PARAM_SET(param0, INT, move_type); + CAMERA_MSG_PARAM_SET(param1, INT, pan_step); - _camera_msg_send_param1(api, pc->cb_info, &ret, ¶m, CAMERA_CB_TIMEOUT); + _camera_msg_send_param2_int(api, pc->cb_info, &ret, + ¶m0, ¶m1, CAMERA_CB_TIMEOUT); LOGD("ret : 0x%x", ret); @@ -6450,9 +6450,8 @@ int camera_attr_set_tilt(camera_h camera, camera_attr_ptz_move_type_e move_type, int ret = CAMERA_ERROR_NONE; camera_cli_s *pc = (camera_cli_s *)camera; muse_camera_api_e api = MUSE_CAMERA_API_ATTR_SET_TILT; - camera_msg_param param; - int set_move_type = (int)move_type; - int value = 0; + camera_msg_param param0; + camera_msg_param param1; if (!pc || !pc->cb_info) { LOGE("NULL handle"); @@ -6461,10 +6460,11 @@ int camera_attr_set_tilt(camera_h camera, camera_attr_ptz_move_type_e move_type, LOGD("Enter"); - value = (set_move_type << 16) | tilt_step; - CAMERA_MSG_PARAM_SET(param, INT, value); + CAMERA_MSG_PARAM_SET(param0, INT, move_type); + CAMERA_MSG_PARAM_SET(param1, INT, tilt_step); - _camera_msg_send_param1(api, pc->cb_info, &ret, ¶m, CAMERA_CB_TIMEOUT); + _camera_msg_send_param2_int(api, pc->cb_info, &ret, + ¶m0, ¶m1, CAMERA_CB_TIMEOUT); LOGD("ret : 0x%x", ret); -- 2.7.4