diff options
author | Jeongmo Yang <jm80.yang@samsung.com> | 2015-12-02 18:07:30 +0900 |
---|---|---|
committer | Jeongmo Yang <jm80.yang@samsung.com> | 2015-12-02 18:07:30 +0900 |
commit | 0f2e7757557cfba0a16394cbb0d8d16122845a10 (patch) | |
tree | 089fdbedc5de2d4f7e95d739f44abe5af83c076a | |
parent | 571320aeb3756fd1cbe5a26b4994d104a448c949 (diff) | |
download | camera-0f2e7757557cfba0a16394cbb0d8d16122845a10.tar.gz camera-0f2e7757557cfba0a16394cbb0d8d16122845a10.tar.bz2 camera-0f2e7757557cfba0a16394cbb0d8d16122845a10.zip |
Release version 0.2.25submit/tizen/20151204.043354accepted/tizen/wearable/20151206.223302accepted/tizen/tv/20151206.223246accepted/tizen/mobile/20151206.223235
1. Fix Svace issues
Change-Id: I0fc8ed14458b8287d9e85dc204ecc25d97d318a0
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r-- | packaging/capi-media-camera.spec | 2 | ||||
-rwxr-xr-x | src/camera.c | 25 |
2 files changed, 16 insertions, 11 deletions
diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec index 04004c6..fd34bb9 100644 --- a/packaging/capi-media-camera.spec +++ b/packaging/capi-media-camera.spec @@ -3,7 +3,7 @@ Name: capi-media-camera Summary: A Camera API -Version: 0.2.24 +Version: 0.2.25 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/camera.c b/src/camera.c index 7430597..d07107f 100755 --- a/src/camera.c +++ b/src/camera.c @@ -422,7 +422,7 @@ int _camera_media_packet_finalize(media_packet_h pkt, int error_code, void *user muse_camera_msg_send1_no_return(MUSE_CAMERA_API_RETURN_BUFFER, cb_info->fd, cb_info, INT, tbm_key); - + g_free(mp_data); mp_data = NULL; } @@ -575,6 +575,7 @@ static void _client_user_callback(camera_cb_info_s *cb_info, char *recv_msg, mus frame.data.single_plane.yuv = buf_pos; frame.data.single_plane.size = stream->data.yuv420.length_yuv; total_size = stream->data.yuv420.length_yuv; + break; case 2: frame.data.double_plane.y = buf_pos; frame.data.double_plane.y_size = stream->data.yuv420sp.length_y; @@ -583,6 +584,7 @@ static void _client_user_callback(camera_cb_info_s *cb_info, char *recv_msg, mus frame.data.double_plane.uv_size = stream->data.yuv420sp.length_uv; total_size = stream->data.yuv420sp.length_y + \ stream->data.yuv420sp.length_uv; + break; case 3: frame.data.triple_plane.y = buf_pos; frame.data.triple_plane.y_size = stream->data.yuv420p.length_y; @@ -595,6 +597,7 @@ static void _client_user_callback(camera_cb_info_s *cb_info, char *recv_msg, mus total_size = stream->data.yuv420p.length_y + \ stream->data.yuv420p.length_u + \ stream->data.yuv420p.length_v; + break; default: break; } @@ -605,6 +608,7 @@ static void _client_user_callback(camera_cb_info_s *cb_info, char *recv_msg, mus frame.data.single_plane.yuv = buffer_bo_handle[0].ptr; frame.data.single_plane.size = stream->data.yuv420.length_yuv; total_size = stream->data.yuv420.length_yuv; + break; case 2: frame.data.double_plane.y = buffer_bo_handle[0].ptr; if (stream->num_planes == (unsigned int)num_buffer_key) { @@ -616,6 +620,7 @@ static void _client_user_callback(camera_cb_info_s *cb_info, char *recv_msg, mus frame.data.double_plane.uv_size = stream->data.yuv420sp.length_uv; total_size = stream->data.yuv420sp.length_y + \ stream->data.yuv420sp.length_uv; + break; case 3: frame.data.triple_plane.y = buffer_bo_handle[0].ptr; if (stream->num_planes == (unsigned int)num_buffer_key) { @@ -631,6 +636,7 @@ static void _client_user_callback(camera_cb_info_s *cb_info, char *recv_msg, mus total_size = stream->data.yuv420p.length_y + \ stream->data.yuv420p.length_u + \ stream->data.yuv420p.length_v; + break; default: break; } @@ -1799,16 +1805,17 @@ ErrorExit: int ret = CAMERA_ERROR_NONE; muse_camera_api_e api = MUSE_CAMERA_API_DESTROY; camera_cli_s *pc = (camera_cli_s *)camera; - int sock_fd = pc->cb_info->fd; + int sock_fd = 0; + LOGD("ENTER"); - if (pc == NULL) { - LOGE("pc is already nul!!"); - return CAMERA_ERROR_INVALID_PARAMETER; - } else if (pc->cb_info == NULL) { + if (pc->cb_info == NULL) { + LOGE("cb_info NULL, INVALID_PARAMETER"); return CAMERA_ERROR_INVALID_PARAMETER; } + sock_fd = pc->cb_info->fd; + muse_camera_msg_send(api, sock_fd, pc->cb_info, ret); if (ret == CAMERA_ERROR_NONE) { if (pc->client_handle) { @@ -1874,8 +1881,7 @@ int camera_start_preview(camera_h camera) } if (pc->cb_info->prev_state == CAMERA_STATE_CREATED) { - muse_camera_msg_get_string(caps, pc->cb_info->recv_msg); - if (caps == NULL) { + if (muse_camera_msg_get_string(caps, pc->cb_info->recv_msg) == FALSE) { LOGE("failed to get caps string"); goto _START_PREVIEW_ERROR; } @@ -2374,8 +2380,7 @@ int camera_set_display(camera_h camera, camera_display_type_e type, camera_displ } } - muse_camera_msg_get_string(socket_path, pc->cb_info->recv_msg); - if (socket_path == NULL) { + if (muse_camera_msg_get_string(socket_path, pc->cb_info->recv_msg) == FALSE) { LOGE("failed to get socket path"); goto _SET_DISPLAY_ERROR; } |