summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2016-12-08 15:05:00 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2016-12-08 15:05:00 +0900
commit7c2d80a0c3aa9b064e5f7ea92b9ac2e8c7beac90 (patch)
treedbc04b347fdb644acbab8027362479d1ab388318
parent3ae032d25a0c7d905266ee28b6c5ef2700b87612 (diff)
downloadcamera-7c2d80a0c3aa9b064e5f7ea92b9ac2e8c7beac90.tar.gz
camera-7c2d80a0c3aa9b064e5f7ea92b9ac2e8c7beac90.tar.bz2
camera-7c2d80a0c3aa9b064e5f7ea92b9ac2e8c7beac90.zip
[Version] 0.2.89 [Profile] Common [Issue Type] Bug fix [Dependency module] N/A [Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-3.0-mobile_20161206.3] Change-Id: I63b1037f2620935c170d10a3633ee8aa66b440fc Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r--packaging/capi-media-camera.spec2
-rw-r--r--src/camera.c10
-rw-r--r--test/camera_test.c4
3 files changed, 15 insertions, 1 deletions
diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec
index 4eb1ca4..85f05b0 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.2.88
+Version: 0.2.89
Release: 0
Group: Multimedia/API
License: Apache-2.0
diff --git a/src/camera.c b/src/camera.c
index 8919206..088d4e6 100644
--- a/src/camera.c
+++ b/src/camera.c
@@ -2578,6 +2578,7 @@ ErrorExit:
int camera_change_device(camera_h camera, camera_device_e device)
{
+ int i = 0;
int ret = CAMERA_ERROR_NONE;
muse_camera_api_e api = MUSE_CAMERA_API_CHANGE_DEVICE;
camera_cli_s *pc = (camera_cli_s *)camera;
@@ -2592,6 +2593,15 @@ int camera_change_device(camera_h camera, camera_device_e device)
_camera_msg_send_param1(api, pc->cb_info, &ret, &param, CAMERA_CB_TIMEOUT);
+ if (ret == CAMERA_ERROR_NONE) {
+ /* reset callback and user data */
+ for (i = 0 ; i < MUSE_CAMERA_EVENT_TYPE_NUM ; i++) {
+ pc->cb_info->user_cb[i] = NULL;
+ pc->cb_info->user_data[i] = NULL;
+ }
+ UNSET_PREVIEW_CB_TYPE(pc->cb_info, PREVIEW_CB_TYPE_USER);
+ }
+
return ret;
}
diff --git a/test/camera_test.c b/test/camera_test.c
index e2ae643..88211eb 100644
--- a/test/camera_test.c
+++ b/test/camera_test.c
@@ -795,6 +795,10 @@ static void main_menu(gchar buf)
camera_change_device(hcamcorder->camera, hcamcorder->type);
+ camera_set_error_cb(hcamcorder->camera, _camera_error_cb, NULL);
+ camera_set_state_changed_cb(hcamcorder->camera, _camera_state_changed_cb, NULL);
+ camera_set_interrupted_cb(hcamcorder->camera, _camera_interrupted_cb, NULL);
+
camera_set_display_mode(hcamcorder->camera, CAMERA_DISPLAY_MODE_LETTER_BOX);
camera_start_preview(hcamcorder->camera);