From: Sangchul Lee Date: Thu, 4 Jul 2024 08:44:48 +0000 (+0900) Subject: Apply more macro to exclude lines from coverage measurement X-Git-Tag: accepted/tizen/unified/20240705.082057^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ee65e1c19e5161b15601d45fdb39469c722056f;p=platform%2Fcore%2Fapi%2Fwebrtc.git Apply more macro to exclude lines from coverage measurement [Version] 1.1.8 [Issue Type] Coverage Change-Id: I938ec05d398ae463edfe668413c82ef87b2f5ac7 Signed-off-by: Sangchul Lee --- diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 11c691cf..397c4ff6 100644 --- a/packaging/capi-media-webrtc.spec +++ b/packaging/capi-media-webrtc.spec @@ -1,6 +1,6 @@ Name: capi-media-webrtc Summary: A WebRTC library in Tizen Native API -Version: 1.1.7 +Version: 1.1.8 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/webrtc_source_camera.c b/src/webrtc_source_camera.c index b12b1955..d3176992 100644 --- a/src/webrtc_source_camera.c +++ b/src/webrtc_source_camera.c @@ -59,6 +59,7 @@ static int __get_device_type(webrtc_s *webrtc, camera_device_type_e *type) } } +//LCOV_EXCL_START LOG_ERROR_IF_REACHED("invalid camera_factory_name(%s)", camera_factory_name); return WEBRTC_ERROR_INVALID_OPERATION; } @@ -68,6 +69,7 @@ static gchar *__get_device_prop_value_string(const char *prefix, unsigned int de RET_VAL_IF(prefix == NULL, NULL, "prefix is NULL"); return g_strdup_printf("%s%u", prefix, device_id); } +//LCOV_EXCL_STOP static int __validate_source_and_get_camera_device_type(webrtc_s *webrtc, unsigned int source_id, camera_device_type_e *type, GstElement **camerasrc) { @@ -107,6 +109,7 @@ int _set_camera_device_id(webrtc_s *webrtc, unsigned int source_id, unsigned int LOG_DEBUG("device prop[name:%s, value:%d]", __camera_infos[type].device_prop_name, (gint)device_id); g_object_set(G_OBJECT(camerasrc), __camera_infos[type].device_prop_name, (gint)device_id, NULL); break; +//LCOV_EXCL_START case CAMERA_DEVICE_PROP_VAL_TYPE_STRING: { gchar *device_prop_value = __get_device_prop_value_string(__camera_infos[type].device_prop_value_prefix, device_id); LOG_DEBUG("device prop[name:%s, value:%s]", __camera_infos[type].device_prop_name, device_prop_value); @@ -118,6 +121,7 @@ int _set_camera_device_id(webrtc_s *webrtc, unsigned int source_id, unsigned int LOG_ERROR_IF_REACHED("invalid device_prop_value_type(%d)", __camera_infos[type].device_prop_value_type); return WEBRTC_ERROR_INVALID_OPERATION; } +//LCOV_EXCL_STOP LOG_INFO("source_id[%u], device_id[%u]", source_id, device_id); @@ -143,6 +147,7 @@ int _get_camera_device_id(webrtc_s *webrtc, unsigned int source_id, unsigned int *device_id = (unsigned int)id; break; } +//LCOV_EXCL_START case CAMERA_DEVICE_PROP_VAL_TYPE_STRING: { g_autofree gchar *id_str = NULL; g_auto(GStrv) tokens = NULL; @@ -156,6 +161,7 @@ int _get_camera_device_id(webrtc_s *webrtc, unsigned int source_id, unsigned int LOG_ERROR_IF_REACHED("invalid device_prop_value_type(%d)", __camera_infos[type].device_prop_value_type); return WEBRTC_ERROR_INVALID_OPERATION; } +//LCOV_EXCL_STOP LOG_INFO("source_id[%u], device_id[%u]", source_id, *device_id); diff --git a/src/webrtc_source_private.c b/src/webrtc_source_private.c index 1035e100..cdd4bfbc 100644 --- a/src/webrtc_source_private.c +++ b/src/webrtc_source_private.c @@ -188,6 +188,7 @@ const char * _get_video_media_type(const char *codec_name) return MEDIA_TYPE_VIDEO_VP8; if (!strcmp(codec_name, "vp9") || !strcmp(codec_name, "VP9")) return MEDIA_TYPE_VIDEO_VP9; +//LCOV_EXCL_START if (!strcmp(codec_name, "theora") || !strcmp(codec_name, "THEORA")) return MEDIA_TYPE_VIDEO_THEORA; if (!strcmp(codec_name, "h264") || !strcmp(codec_name, "H264")) @@ -200,6 +201,7 @@ const char * _get_video_media_type(const char *codec_name) LOG_ERROR("not supported video codec_name[%s]", codec_name); return NULL; +//LCOV_EXCL_STOP } static GstAudioFormat __get_gst_audio_raw_format_from_string(const char *format) @@ -424,6 +426,7 @@ exit: return ret; } +//LCOV_EXCL_START webrtc_transceiver_encoding_s *_find_encoding_by_ssrc(GHashTable *encodings, int ssrc) { GHashTableIter iter; @@ -443,6 +446,7 @@ webrtc_transceiver_encoding_s *_find_encoding_by_ssrc(GHashTable *encodings, int } return NULL; } +//LCOV_EXCL_STOP static GstCaps *__make_default_raw_caps(webrtc_gst_slot_s *source, int ssrc, webrtc_ini_s *ini) { @@ -1055,6 +1059,7 @@ void _set_video_src_origin_resolution(webrtc_gst_slot_s *source, int width, int LOG_DEBUG("video origin resolution is updated. origin_width[%d] origin_height[%d]", width, height); } +//LCOV_EXCL_START GstCaps *_make_video_raw_caps_with_resolution(webrtc_gst_slot_s *source, webrtc_ini_s *ini, int width, int height) { GstCaps *caps = NULL; @@ -1081,6 +1086,7 @@ GstCaps *_make_video_raw_caps_with_resolution(webrtc_gst_slot_s *source, webrtc_ return caps; } +//LCOV_EXCL_STOP static gboolean __foreach_src_pad_cb(GstElement *element, GstPad *pad, gpointer user_data) { diff --git a/src/webrtc_transceiver.c b/src/webrtc_transceiver.c index 495d3365..e162b6a9 100644 --- a/src/webrtc_transceiver.c +++ b/src/webrtc_transceiver.c @@ -757,6 +757,7 @@ int _get_transceiver_codec(webrtc_s *webrtc, unsigned int source_id, webrtc_medi return WEBRTC_ERROR_NONE; } +//LCOV_EXCL_START int _add_transceiver_encoding(webrtc_s *webrtc, unsigned int source_id, webrtc_media_type_e media_type, const char *rid, int target_bitrate, int width, int height) { int ret; @@ -911,3 +912,4 @@ int _get_transceiver_recv_drop(webrtc_s *webrtc, unsigned int source_id, webrtc_ return WEBRTC_ERROR_NONE; } +//LCOV_EXCL_STOP