summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2018-05-15 15:14:59 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2018-05-15 15:14:59 +0900
commite1e66f6c33a0d32f43acb3500e47bdde87a308b8 (patch)
treedfd7b6e6c3e1e1508df91adfd341b8a56d28bd51
parentddb0da8367f440e198ee697825f10c89b6aea252 (diff)
downloadcamera-e1e66f6c33a0d32f43acb3500e47bdde87a308b8.tar.gz
camera-e1e66f6c33a0d32f43acb3500e47bdde87a308b8.tar.bz2
camera-e1e66f6c33a0d32f43acb3500e47bdde87a308b8.zip
- from camera_create to camera_set_display for headless device [Version] 0.4.7 [Profile] Common [Issue Type] Update [Dependency module] N/A [Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-unified_20180514.1] Change-Id: Ica1306707194dcc0edfcf294810361f8b12cd7e5 Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r--packaging/capi-media-camera.spec2
-rw-r--r--src/camera.c19
2 files changed, 9 insertions, 12 deletions
diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec
index c519c31..b903548 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.6
+Version: 0.4.7
Release: 0
Group: Multimedia/API
License: Apache-2.0
diff --git a/src/camera.c b/src/camera.c
index 59825aa..f2e5df9 100644
--- a/src/camera.c
+++ b/src/camera.c
@@ -2075,12 +2075,6 @@ static camera_cb_info_s *_camera_client_callback_new(gint sockfd)
goto ErrorExit;
}
- /* display interface handle */
- if (mm_display_interface_init(&cb_info->dp_interface) != MM_ERROR_NONE) {
- LOGE("display interface init failed");
- goto ErrorExit;
- }
-
cb_info->api_waiting[MUSE_CAMERA_API_CREATE] = 1;
for (i = 0 ; i < MUSE_CAMERA_API_MAX ; i++) {
@@ -2152,11 +2146,6 @@ ErrorExit:
g_cond_clear(&cb_info->api_cond[i]);
}
- if (cb_info->dp_interface) {
- mm_display_interface_deinit(cb_info->dp_interface);
- cb_info->dp_interface = NULL;
- }
-
g_free(cb_info);
cb_info = NULL;
}
@@ -2996,6 +2985,14 @@ int camera_set_display(camera_h camera, camera_display_type_e type, camera_displ
if (type == CAMERA_DISPLAY_TYPE_NONE) {
LOGD("display type NONE");
} else {
+ /* display interface handle */
+ if (!cb_info->dp_interface) {
+ if (mm_display_interface_init(&cb_info->dp_interface) != MM_ERROR_NONE) {
+ LOGE("display interface init failed");
+ return CAMERA_ERROR_NOT_SUPPORTED;
+ }
+ }
+
ret = mm_display_interface_set_display(cb_info->dp_interface, type, display, &cb_info->parent_id);
if (ret == MM_ERROR_NONE && type == CAMERA_DISPLAY_TYPE_EVAS) {
camera_flip_e flip = CAMERA_FLIP_NONE;