Add more macro to exclude lines from coverage measurement 53/281253/1 accepted/tizen/unified/20220919.090132
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 15 Sep 2022 02:11:28 +0000 (11:11 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 15 Sep 2022 02:45:08 +0000 (11:45 +0900)
[Version] 0.3.240
[Issue Type] Line coverage

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

index f9455d6ed92b8c95a77012a924af8c9075a3c120..63e49ef248ecfe64ad221c4dd8a4c0b99f6eac67 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    0.3.239
+Version:    0.3.240
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 50285e0573f521f4301ab2107cd0ba50277a415d..64dd5d574c964cf54b414ca6a7526ee292939fc5 100644 (file)
@@ -19,6 +19,7 @@
 #include "webrtc_private.h"
 #include "webrtc_source_private.h"
 
+//LCOV_EXCL_START
 static void __remove_filesrc_pad_block_probe(webrtc_gst_slot_s *source, unsigned int av_idx)
 {
        RET_IF(source == NULL, "source is NULL");
@@ -56,6 +57,7 @@ int _remove_all_filesrc_pad_block_probes(webrtc_s *webrtc)
 
        return WEBRTC_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
 
 static void __remove_rest_of_elements_for_filesrc_pipeline(webrtc_gst_slot_s *source)
 {
@@ -680,6 +682,7 @@ static int __link_decodebin_with_queue(GstPad *pad, webrtc_gst_slot_s *source, b
 }
 
 #ifdef SUPPORT_FILESRC_AUDIO_FORMAT_CHANGE
+//LCOV_EXCL_START
 static int __create_rest_of_raw_audio_elements_for_filesrc_pipeline(webrtc_s *webrtc, webrtc_gst_slot_s *source, GList **element_list)
 {
        GstElement *queue = NULL;
@@ -733,6 +736,7 @@ exit:
        SAFE_G_LIST_FREE_FULL(_element_list, gst_object_unref);
        return WEBRTC_ERROR_INVALID_OPERATION;
 }
+//LCOV_EXCL_STOP
 #endif
 
 static void __filesrc_pipeline_decodebin_pad_added_cb(GstElement *element, GstPad *pad, gpointer data)
index 74d5329dbfa26fb2aff9abca9ee786ebb41db2df..04d24474713165c83954d5531081dc94fc2ee478 100644 (file)
@@ -24,6 +24,7 @@ typedef struct {
        GstBuffer *buffer;
 } packet_buffer_s;
 
+//LCOV_EXCL_START
 static void __memory_finalize_cb(packet_buffer_s *packet_buffer)
 {
        LOG_DEBUG("packet[%p] buffer[%p] is about to release", packet_buffer->packet, packet_buffer->buffer);
@@ -48,7 +49,6 @@ static GstAudioFormat __get_gst_audio_format(media_format_mimetype_e mime_type)
        }
 }
 
-//LCOV_EXCL_START
 static GstBuffer* __make_buffer_from_zerocopy_video_packet(webrtc_gst_slot_s *source, media_packet_h packet)
 {
        int ret = MEDIA_PACKET_ERROR_NONE;
@@ -187,6 +187,7 @@ static int __fill_gst_buffer_mapped_data_from_packet(GstBuffer *buffer, media_pa
                        }
 
                } else {
+//LCOV_EXCL_START
                        guchar *data_ptr;
                        media_packet_get_buffer_data_ptr(packet, (void **)&data_ptr);
                        if (data_ptr == NULL) {
@@ -195,6 +196,7 @@ static int __fill_gst_buffer_mapped_data_from_packet(GstBuffer *buffer, media_pa
                                return WEBRTC_ERROR_INVALID_OPERATION;
                        }
                        memcpy(buff_info.data, data_ptr, size);
+//LCOV_EXCL_STOP
                }
 
                buff_info.size = size;
@@ -482,6 +484,7 @@ int _push_media_packet(webrtc_s *webrtc, unsigned int source_id, media_packet_h
 
        /* the incoming media packet should have zerocopy format (e.g., SN12) */
        if (source->zerocopy_enabled) {
+//LCOV_EXCL_START
                if (!source->allocator)
                        source->allocator = gst_tizen_allocator_new();
                buffer = __make_buffer_from_zerocopy_video_packet(source, packet);
@@ -495,11 +498,13 @@ int _push_media_packet(webrtc_s *webrtc, unsigned int source_id, media_packet_h
                }
                gst_buffer_unref(buffer);
                return WEBRTC_ERROR_NONE;
+//LCOV_EXCL_STOP
        }
 
        ret = media_packet_get_extra(packet, (void **)&buffer);
        RET_VAL_IF(ret != MEDIA_PACKET_ERROR_NONE, WEBRTC_ERROR_INVALID_OPERATION, "failed to media_packet_get_extra()");
        if (GST_IS_BUFFER(buffer)) {
+//LCOV_EXCL_START
                LOG_DEBUG("external gst buffer[%p]", buffer);
                g_signal_emit_by_name(G_OBJECT(appsrc), "push-buffer", buffer, &gst_ret, NULL);
                if (gst_ret != GST_FLOW_OK) {
@@ -508,6 +513,7 @@ int _push_media_packet(webrtc_s *webrtc, unsigned int source_id, media_packet_h
                }
                media_packet_destroy(packet);
                return WEBRTC_ERROR_NONE;
+//LCOV_EXCL_STOP
        }
 
        /* FIXME: make subfunction for codes below */
index 998d11e4c4eb35cf7de21e5e38c012939cbf0be0..35c61da4e957b9534e98260cdaedadd7f6153f08 100644 (file)
@@ -177,6 +177,7 @@ void _update_transceivers_fec(webrtc_s *webrtc, bool is_offer)
        }
 }
 
+//LCOV_EXCL_START
 static GstCaps *__make_transceiver_caps_with_pt(rtp_payload_info_s *payload_info, int payload_type)
 {
        RET_VAL_IF(payload_info == NULL, NULL, "payload_info is NULL");
@@ -246,6 +247,7 @@ static void __check_and_update_transceiver(webrtc_gst_slot_s *source)
                        __update_transceiver_with_pt(source, WEBRTC_MEDIA_TYPE_VIDEO, payload_info);
        }
 }
+//LCOV_EXCL_STOP
 
 void _update_transceivers_for_offer(webrtc_s *webrtc)
 {