diff options
author | Jeongmo Yang <jm80.yang@samsung.com> | 2016-01-15 17:34:47 +0900 |
---|---|---|
committer | Jeongmo Yang <jm80.yang@samsung.com> | 2016-01-15 17:34:47 +0900 |
commit | 5da9e9e8500b0fb5549cc4d3f496a9dc6d3572a1 (patch) | |
tree | 51fccebcd0590fecd6a199503bf55f626282285d | |
parent | d540da887eda8166b466e797840d8158cb253b8d (diff) | |
download | camera-accepted/tizen/wearable/20160115.114724.tar.gz camera-accepted/tizen/wearable/20160115.114724.tar.bz2 camera-accepted/tizen/wearable/20160115.114724.zip |
[Release version 0.2.39] Change timinig to create client handlesubmit/tizen/20160115.103735accepted/tizen/wearable/20160115.114724accepted/tizen/tv/20160115.114720accepted/tizen/mobile/20160115.114716
Change-Id: I035abc11ff702896c7b4f8438d7d531f489954fc
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r-- | packaging/capi-media-camera.spec | 4 | ||||
-rw-r--r-- | src/camera.c | 19 |
2 files changed, 13 insertions, 10 deletions
diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec index bc20c95..914e2d7 100644 --- a/packaging/capi-media-camera.spec +++ b/packaging/capi-media-camera.spec @@ -3,8 +3,8 @@ Name: capi-media-camera Summary: A Camera API -Version: 0.2.38 -Release: 1 +Version: 0.2.39 +Release: 0 Group: Multimedia/API License: Apache-2.0 Source0: %{name}-%{version}.tar.gz diff --git a/src/camera.c b/src/camera.c index ef92bc2..5b3b38f 100644 --- a/src/camera.c +++ b/src/camera.c @@ -1810,6 +1810,13 @@ int camera_create(camera_device_e device, camera_h* camera) goto ErrorExit; } + ret = mm_camcorder_client_create(&pc->client_handle); + if (ret != MM_ERROR_NONE) { + LOGE("camera client create Failed 0x%x", ret); + ret = __convert_camera_error_code(__func__, ret); + goto ErrorExit; + } + pc->cb_info = _client_callback_new(sock_fd); if (pc->cb_info == NULL) { LOGE("cb_info alloc failed"); @@ -1845,6 +1852,10 @@ ErrorExit: bufmgr = NULL; if (pc) { + if (pc->client_handle) { + mm_camcorder_client_destroy(pc->client_handle); + pc->client_handle = NULL; + } _client_callback_destroy(pc->cb_info); pc->cb_info = NULL; g_free(pc); @@ -2437,14 +2448,6 @@ int camera_set_display(camera_h camera, camera_display_type_e type, camera_displ muse_camera_msg_send(api, sock_fd, pc->cb_info, ret); if (ret == CAMERA_ERROR_NONE) { - if (pc->client_handle == NULL) { - ret = mm_camcorder_client_create(&pc->client_handle); - if (ret != MM_ERROR_NONE) { - LOGE("camera client create Failed 0x%x", ret); - goto _SET_DISPLAY_ERROR; - } - } - if (muse_camera_msg_get_string(socket_path, pc->cb_info->recv_msg) == FALSE) { LOGE("failed to get socket path"); goto _SET_DISPLAY_ERROR; |