summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/camera.c33
-rw-r--r--src/camera_internal.c3
2 files changed, 30 insertions, 6 deletions
diff --git a/src/camera.c b/src/camera.c
index 4a11ccf..5279908 100644
--- a/src/camera.c
+++ b/src/camera.c
@@ -892,6 +892,7 @@ int _camera_get_tbm_surface_format(int in_format, uint32_t *out_format)
case MM_PIXEL_FORMAT_NV12T:
*out_format = TBM_FORMAT_NV12;
break;
+//LCOV_EXCL_START
case MM_PIXEL_FORMAT_NV16:
*out_format = TBM_FORMAT_NV16;
break;
@@ -929,6 +930,7 @@ int _camera_get_tbm_surface_format(int in_format, uint32_t *out_format)
default:
LOGE("invalid in_format %d", in_format);
return CAMERA_ERROR_INVALID_PARAMETER;
+//LCOV_EXCL_STOP
}
return CAMERA_ERROR_NONE;
@@ -949,6 +951,7 @@ int _camera_get_media_packet_mimetype(int in_format, media_format_mimetype_e *mi
case MM_PIXEL_FORMAT_NV12T:
*mimetype = MEDIA_FORMAT_NV12;
break;
+//LCOV_EXCL_START
case MM_PIXEL_FORMAT_NV16:
*mimetype = MEDIA_FORMAT_NV16;
break;
@@ -986,6 +989,7 @@ int _camera_get_media_packet_mimetype(int in_format, media_format_mimetype_e *mi
default:
LOGE("invalid in_format %d", in_format);
return CAMERA_ERROR_INVALID_PARAMETER;
+//LCOV_EXCL_STOP
}
return CAMERA_ERROR_NONE;
@@ -1014,6 +1018,7 @@ static void _camera_preview_frame_create(camera_stream_data_s *stream, int num_b
frame->num_of_planes = stream->num_planes;
if (num_buffer_fd == 0) {
+//LCOV_EXCL_START
/* non-zero copy */
if (!data_bo_handle || !data_bo_handle->ptr) {
LOGE("NULL pointer");
@@ -1068,14 +1073,17 @@ static void _camera_preview_frame_create(camera_stream_data_s *stream, int num_b
break;
}
}
+//LCOV_EXCL_STOP
} else {
/* zero copy */
switch (stream->num_planes) {
+//LCOV_EXCL_START
case 1:
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;
+//LCOV_EXCL_STOP
case 2:
frame->data.double_plane.y = buffer_bo_handle[0].ptr;
if (stream->num_planes == (unsigned int)num_buffer_fd)
@@ -1088,6 +1096,7 @@ static void _camera_preview_frame_create(camera_stream_data_s *stream, int num_b
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_fd) {
frame->data.triple_plane.u = buffer_bo_handle[1].ptr;
@@ -1103,6 +1112,7 @@ static void _camera_preview_frame_create(camera_stream_data_s *stream, int num_b
stream->data.yuv420p.length_u + \
stream->data.yuv420p.length_v;
break;
+//LCOV_EXCL_STOP
default:
break;
}
@@ -1256,6 +1266,7 @@ static int _camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_
tsurf_info.planes[1].offset = tsurf_info.planes[0].size;
tsurf_info.size = tsurf_info.planes[0].size + tsurf_info.planes[1].size;
break;
+//LCOV_EXCL_START
case TBM_FORMAT_YUV420:
case TBM_FORMAT_YVU420:
tsurf_info.planes[0].size = stream->stride[0] * stream->elevation[0];
@@ -1276,10 +1287,12 @@ static int _camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_
break;
default:
break;
+//LCOV_EXCL_STOP
}
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:
@@ -1310,6 +1323,7 @@ static int _camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_
}
tsurf = tbm_surface_internal_create_with_bos(&tsurf_info, &mp_data->data_bo, 1);
+//LCOV_EXCL_STOP
}
/*LOGD("tbm surface %p", tsurf);*/
}
@@ -1495,6 +1509,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
case MUSE_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW:
__camera_event_handler_preview(cb_info, recv_msg, tfd);
break;
+//LCOV_EXCL_START
case MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS:
{
int percent = 0;
@@ -1553,6 +1568,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
(camera_state_e)current_state, cb_info->user_data[event]);
}
break;
+//LCOV_EXCL_STOP
case MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_RESOLUTION:
/* fall through */
case MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_RESOLUTION:
@@ -1593,6 +1609,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
/* fall through */
case MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_ROTATION:
/* fall through */
+//LCOV_EXCL_START
case MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_THEATER_MODE:
/* fall through */
case MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PTZ_TYPE:
@@ -1606,6 +1623,7 @@ static void _camera_client_user_callback(camera_cb_info_s *cb_info, char *recv_m
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, tfd);
break;
@@ -2242,7 +2260,7 @@ static camera_cb_info_s *_camera_client_callback_new(gint sockfd)
cb_info->is_server_connected = TRUE;
return cb_info;
-
+//LCOV_EXCL_START
ErrorExit:
if (cb_info) {
__destroy_msg_handler_thread(&cb_info->msg_handler_info);
@@ -2265,6 +2283,7 @@ ErrorExit:
}
return NULL;
+//LCOV_EXCL_STOP
}
static void _camera_client_callback_destroy(camera_cb_info_s *cb_info)
@@ -2323,7 +2342,7 @@ static void _camera_client_callback_destroy(camera_cb_info_s *cb_info)
return;
}
-
+//LCOV_EXCL_START
int _camera_start_evas_rendering(camera_h camera)
{
camera_cli_s *pc = (camera_cli_s *)camera;
@@ -2377,7 +2396,7 @@ int _camera_stop_evas_rendering(camera_h camera, bool keep_screen)
return ret;
}
-
+//LCOV_EXCL_STOP
int _camera_independent_request(int api, int device_type, const char *key, int *value)
{
@@ -2574,7 +2593,7 @@ int camera_create(camera_device_e device, camera_h *camera)
}
return ret;
-
+//LCOV_EXCL_START
ErrorExit:
if (bufmgr) {
tbm_bufmgr_deinit(bufmgr);
@@ -2608,6 +2627,7 @@ ErrorExit:
LOGE("camera create error : 0x%x", ret);
return ret;
+//LCOV_EXCL_STOP
}
@@ -2738,6 +2758,7 @@ int camera_stop_preview(camera_h camera)
LOGD("Enter");
+//LCOV_EXCL_START
if (CHECK_PREVIEW_CB(pc->cb_info, PREVIEW_CB_TYPE_EVAS)) {
ret = camera_get_state(camera, &current_state);
if (ret != CAMERA_ERROR_NONE) {
@@ -2751,7 +2772,7 @@ int camera_stop_preview(camera_h camera)
return ret;
}
}
-
+//LCOV_EXCL_STOP
/* send stop preview message */
_camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
@@ -3155,6 +3176,7 @@ int camera_set_display(camera_h camera, camera_display_type_e type, camera_displ
}
if (type == CAMERA_DISPLAY_TYPE_EVAS) {
+//LCOV_EXCL_START
camera_flip_e flip = CAMERA_FLIP_NONE;
camera_display_mode_e mode = CAMERA_DISPLAY_MODE_LETTER_BOX;
camera_rotation_e rotation = CAMERA_ROTATION_NONE;
@@ -3180,6 +3202,7 @@ int camera_set_display(camera_h camera, camera_display_type_e type, camera_displ
if (mode == CAMERA_DISPLAY_MODE_CUSTOM_ROI)
ret |= mm_display_interface_evas_set_roi_area(cb_info->dp_interface, x, y, width, height);
+//LCOV_EXCL_STOP
}
}
diff --git a/src/camera_internal.c b/src/camera_internal.c
index ac76cfd..ebc96d2 100644
--- a/src/camera_internal.c
+++ b/src/camera_internal.c
@@ -29,7 +29,7 @@
#endif
#define LOG_TAG "TIZEN_N_CAMERA"
-
+//LCOV_EXCL_START
int camera_start_evas_rendering(camera_h camera)
{
return _camera_start_evas_rendering(camera);
@@ -39,3 +39,4 @@ int camera_stop_evas_rendering(camera_h camera, bool keep_screen)
{
return _camera_stop_evas_rendering(camera, keep_screen);
}
+//LCOV_EXCL_STOP