Merge branch 'tizen' into tizen_line_coverage 65/200265/1
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 21 Feb 2019 03:03:24 +0000 (12:03 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 21 Feb 2019 03:03:24 +0000 (12:03 +0900)
Change-Id: I8d0a4209e959e400e1112a9bbb07dc1ae6b81564
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
1  2 
src/camera.c

diff --cc src/camera.c
index e514488c92fbc01f19856f00dd985a41b4f51504,1971fe6851ab40b01d25acef9a3ed67b18debb1c..56d6593a16d2192b3c189c33ee74edceff0dd95e
@@@ -867,8 -893,7 +897,8 @@@ static void _camera_preview_frame_creat
        frame->timestamp = stream->timestamp;
        frame->num_of_planes = stream->num_planes;
  
-       if (num_buffer_key == 0) {
+       if (num_buffer_fd == 0) {
 +//LCOV_EXCL_START
                /* non-zero copy */
                if (!data_bo_handle || !data_bo_handle->ptr) {
                        LOGE("NULL pointer");
                        frame->data.single_plane.size = stream->data.yuv420.length_yuv;
                        total_size = stream->data.yuv420.length_yuv;
                        break;
 +//LCOV_EXCL_STOP
                case 2:
                        frame->data.double_plane.y = buffer_bo_handle[0].ptr;
-                       if (stream->num_planes == (unsigned int)num_buffer_key)
+                       if (stream->num_planes == (unsigned int)num_buffer_fd)
                                frame->data.double_plane.uv = buffer_bo_handle[1].ptr;
                        else
                                frame->data.double_plane.uv = buffer_bo_handle[0].ptr + stream->data.yuv420sp.length_y;
                                stream->data.yuv420sp.length_uv;
                        break;
                case 3:
 +//LCOV_EXCL_START
                        frame->data.triple_plane.y = buffer_bo_handle[0].ptr;
-                       if (stream->num_planes == (unsigned int)num_buffer_key) {
+                       if (stream->num_planes == (unsigned int)num_buffer_fd) {
                                frame->data.triple_plane.u = buffer_bo_handle[1].ptr;
                                frame->data.triple_plane.v = buffer_bo_handle[2].ptr;
                        } else {
@@@ -1118,12 -1156,10 +1167,12 @@@ static int _camera_media_packet_create(
                                break;
                        default:
                                break;
 +//LCOV_EXCL_STOP
                        }
  
-                       tsurf = tbm_surface_internal_create_with_bos(&tsurf_info, buffer_bo, num_buffer_key);
+                       tsurf = tbm_surface_internal_create_with_bos(&tsurf_info, buffer_bo, num_buffer_fd);
                } else if (mp_data->data_bo) {
 +//LCOV_EXCL_START
                        switch (bo_format) {
                        case TBM_FORMAT_NV12:
                        case TBM_FORMAT_NV21:
@@@ -1338,9 -1373,8 +1387,9 @@@ static void _camera_client_user_callbac
                break;
        case MUSE_CAMERA_EVENT_TYPE_PREVIEW:
        case MUSE_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW:
-               __camera_event_handler_preview(cb_info, recv_msg);
+               __camera_event_handler_preview(cb_info, recv_msg, tfd);
                break;
 +//LCOV_EXCL_START
        case MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS:
                {
                        int percent = 0;
                        LOGW("stop foreach callback for event %d", event);
                }
                break;
 +//LCOV_EXCL_STOP
        case MUSE_CAMERA_EVENT_TYPE_CAPTURE:
-               __camera_event_handler_capture(cb_info, recv_msg);
+               __camera_event_handler_capture(cb_info, recv_msg, tfd);
                break;
        default:
                LOGW("unhandled event %d", event);