Apply more macro to exclude lines from coverage measurement 36/314036/1 accepted/tizen/unified/20240705.082057 accepted/tizen/unified/dev/20240708.053909 accepted/tizen/unified/x/20240705.112630
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 4 Jul 2024 08:44:48 +0000 (17:44 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 4 Jul 2024 08:45:44 +0000 (17:45 +0900)
[Version] 1.1.8
[Issue Type] Coverage

Change-Id: I938ec05d398ae463edfe668413c82ef87b2f5ac7
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/capi-media-webrtc.spec
src/webrtc_source_camera.c
src/webrtc_source_private.c
src/webrtc_transceiver.c

index 11c691cfff86bbffc23fe8f12eab2cd3c037d005..397c4ff621ec734dbf0e569dafe3c8ca74fa1d09 100644 (file)
@@ -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
index b12b1955e8cd7d38a0822be151384ad36a2bb9ea..d317699212415e80425c1c97bd6bda4ca4ab3dcb 100644 (file)
@@ -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);
 
index 1035e1008ed262f78355eb4eda99eaf63c2f4fa6..cdd4bfbcd915b964c76eeebc798da6e5eeb6376c 100644 (file)
@@ -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)
 {
index 495d3365eab3c0ec8d680c3d4dc8117b2c63a595..e162b6a95ed59a7e41a40fc5eec9826dc0b2bf67 100644 (file)
@@ -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