From 664b8e39ac81798d9033a0e300ea6181ac357016 Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Tue, 8 Aug 2017 15:11:27 +0900 Subject: [PATCH 01/16] Change fuction set_state to set_state_with_parent in have-type callback sometimes state hang during demux state shange [Version] 0.1.22 [Profile] Mobile, Wearable, TV [Issue Type] Fix bugs Change-Id: Ib5256c4d381dac72c34b1bba33ff02f7ced05941 --- include/port_gst/mediademuxer_port_gst.h | 9 +++++++++ packaging/capi-mediademuxer.spec | 2 +- src/port_gst/mediademuxer_port_gst.c | 26 +++++++++++++++++--------- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/include/port_gst/mediademuxer_port_gst.h b/include/port_gst/mediademuxer_port_gst.h index 9737be4..c784b81 100755 --- a/include/port_gst/mediademuxer_port_gst.h +++ b/include/port_gst/mediademuxer_port_gst.h @@ -42,6 +42,15 @@ extern "C" { } \ } while (0) +#define MEDIADEMUXER_SYNC_STATE_WITH_PARENT(x_element, error) \ + do { \ + MD_I("Sync state with parent [%s]\n", GST_ELEMENT_NAME(x_element)); \ + if (GST_STATE_CHANGE_FAILURE == gst_element_sync_state_with_parent(x_element)) { \ + MD_E("failed to sync %s state with parent\n", GST_ELEMENT_NAME(x_element)); \ + goto error; \ + } \ + } while (0) + #define MEDIADEMUXER_LINK_PAD(srcpad, sinkpad, error) \ do { \ if (GST_PAD_LINK_OK != gst_pad_link(srcpad, sinkpad)) { \ diff --git a/packaging/capi-mediademuxer.spec b/packaging/capi-mediademuxer.spec index 4b07b67..1d022c6 100755 --- a/packaging/capi-mediademuxer.spec +++ b/packaging/capi-mediademuxer.spec @@ -1,6 +1,6 @@ Name: capi-mediademuxer Summary: A Media Demuxer library in Tizen Native API -Version: 0.1.21 +Version: 0.1.22 Release: 1 Group: Multimedia/API License: Apache-2.0 diff --git a/src/port_gst/mediademuxer_port_gst.c b/src/port_gst/mediademuxer_port_gst.c index 4538aa4..3cc57aa 100755 --- a/src/port_gst/mediademuxer_port_gst.c +++ b/src/port_gst/mediademuxer_port_gst.c @@ -451,8 +451,8 @@ int __gst_add_track_info(GstPad *pad, GstCaps *caps, track **head, goto ERROR; } - MEDIADEMUXER_SET_STATE(temp->queue, GST_STATE_PAUSED, ERROR); MEDIADEMUXER_LINK_PAD(pad, queue_sink_pad, ERROR); + MEDIADEMUXER_SYNC_STATE_WITH_PARENT(temp->queue, ERROR); temp->appsink = gst_element_factory_make("appsink", NULL); if (!temp->appsink) { @@ -470,7 +470,6 @@ int __gst_add_track_info(GstPad *pad, GstCaps *caps, track **head, gst_app_sink_set_max_buffers((GstAppSink *) temp->appsink, (guint) 0); gst_app_sink_set_drop((GstAppSink *) temp->appsink, true); - MEDIADEMUXER_SET_STATE(temp->appsink, GST_STATE_PAUSED, ERROR); queue_src_pad = gst_element_get_static_pad(temp->queue, "src"); if (!queue_src_pad) { @@ -511,10 +510,11 @@ int __gst_add_track_info(GstPad *pad, GstCaps *caps, track **head, MD_E("sink pad of video parse(%s) not available", GST_ELEMENT_NAME(parse_element)); goto ERROR; } - MEDIADEMUXER_SET_STATE(parse_element, GST_STATE_PAUSED, ERROR); /* Link demuxer pad with sink pad of parse element */ MEDIADEMUXER_LINK_PAD(queue_src_pad, parse_sink_pad, ERROR); + MEDIADEMUXER_SYNC_STATE_WITH_PARENT(parse_element, ERROR); + if (strstr(temp->caps_string, "h264")) { outcaps = gst_caps_new_simple("video/x-h264", "stream-format", G_TYPE_STRING, "byte-stream", NULL); gst_element_link_filtered(parse_element, temp->appsink, outcaps); @@ -564,7 +564,7 @@ int __gst_add_track_info(GstPad *pad, GstCaps *caps, track **head, goto ERROR; } MEDIADEMUXER_LINK_PAD(queue_src_pad, id3_sinkpad, ERROR); - MEDIADEMUXER_SET_STATE(id3tag, GST_STATE_PAUSED, ERROR); + MEDIADEMUXER_SYNC_STATE_WITH_PARENT(id3tag, ERROR); id3_srcpad = gst_element_get_static_pad(id3tag, "src"); if (!id3_srcpad) { MD_E("fail to get id3demux src pad.\n"); @@ -608,7 +608,6 @@ int __gst_add_track_info(GstPad *pad, GstCaps *caps, track **head, MD_E("sink pad of audio parse(%s) not available", GST_ELEMENT_NAME(parse_element)); goto ERROR; } - MEDIADEMUXER_SET_STATE(parse_element, GST_STATE_PAUSED, ERROR); /* Link demuxer pad with sink pad of parse element */ if (id3tag) @@ -616,6 +615,8 @@ int __gst_add_track_info(GstPad *pad, GstCaps *caps, track **head, else MEDIADEMUXER_LINK_PAD(queue_src_pad, parse_sink_pad, ERROR); + MEDIADEMUXER_SYNC_STATE_WITH_PARENT(parse_element, ERROR); + /* Link src pad with appSink element */ gst_element_link(parse_element, temp->appsink); } else { @@ -624,6 +625,8 @@ int __gst_add_track_info(GstPad *pad, GstCaps *caps, track **head, } else { MEDIADEMUXER_LINK_PAD(queue_src_pad, apppad, ERROR); } + + MEDIADEMUXER_SYNC_STATE_WITH_PARENT(temp->appsink, ERROR); /* gst_pad_link(pad, fpad) */ if (*head == NULL) { *head = temp; @@ -797,8 +800,13 @@ static void __gst_cb_typefind(GstElement *tf, guint probability, G_CALLBACK(__gst_on_pad_added), gst_handle); g_signal_connect(gst_handle->demux, "no-more-pads", G_CALLBACK(__gst_no_more_pad), gst_handle); - gst_bin_add_many(GST_BIN(gst_handle->pipeline), - gst_handle->demux, NULL); + if (!gst_bin_add(GST_BIN(gst_handle->pipeline), gst_handle->demux)) { + gst_object_unref(gst_handle->demux); + MD_E("fail add demuxer(%s) in pipeline", + GST_ELEMENT_NAME(gst_handle->demux)); + goto ERROR; + } + pad = gst_element_get_static_pad(gst_handle->typefind, "src"); if (!pad) { MD_E("fail to get typefind src pad.\n"); @@ -816,8 +824,8 @@ static void __gst_cb_typefind(GstElement *tf, guint probability, } gst_pad_unlink(pad, fake_pad); MEDIADEMUXER_LINK_PAD(pad, demuxer_pad, ERROR); - MEDIADEMUXER_SET_STATE(gst_handle->demux, - GST_STATE_PAUSED, ERROR); + + MEDIADEMUXER_SYNC_STATE_WITH_PARENT(gst_handle->demux, ERROR); if (pad) gst_object_unref(pad); if (demuxer_pad) -- 2.7.4 From d3d5f40fbc8a5b1710e7e56a351c03d84ae3d93c Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Wed, 30 Aug 2017 16:14:30 +0900 Subject: [PATCH 02/16] Add element lock state for prevent deadlock Add handle NULL check [Version] 0.1.23 [Profile] Mobile, Wearable, TV [Issue Type] Fix bugs Change-Id: Id9ee77adba954eadee1d7a85633763403b8ff4f5 --- include/mediademuxer_util.h | 8 ++ packaging/capi-mediademuxer.spec | 2 +- src/port_gst/mediademuxer_port_gst.c | 185 +++++++++++++++++++---------------- 3 files changed, 110 insertions(+), 85 deletions(-) diff --git a/include/mediademuxer_util.h b/include/mediademuxer_util.h index 01c0670..93c7a58 100755 --- a/include/mediademuxer_util.h +++ b/include/mediademuxer_util.h @@ -84,6 +84,14 @@ extern "C" { } \ } while (0) +#define MEDIADEMUXER_CHECK_NULL_VOID(x_var) \ + do { \ + if (!x_var) { \ + MD_E("[%s] is NULL\n", #x_var); \ + return; \ + } \ + } while (0) + #define MEDIADEMUXER_CHECK_SET_AND_PRINT(x_var, x_cond, ret, ret_val, err_text) \ do { \ if (x_var != x_cond) { \ diff --git a/packaging/capi-mediademuxer.spec b/packaging/capi-mediademuxer.spec index 1d022c6..94b2671 100755 --- a/packaging/capi-mediademuxer.spec +++ b/packaging/capi-mediademuxer.spec @@ -1,6 +1,6 @@ Name: capi-mediademuxer Summary: A Media Demuxer library in Tizen Native API -Version: 0.1.22 +Version: 0.1.23 Release: 1 Group: Multimedia/API License: Apache-2.0 diff --git a/src/port_gst/mediademuxer_port_gst.c b/src/port_gst/mediademuxer_port_gst.c index 3cc57aa..4076551 100755 --- a/src/port_gst/mediademuxer_port_gst.c +++ b/src/port_gst/mediademuxer_port_gst.c @@ -333,6 +333,7 @@ static void __gst_no_more_pad(GstElement *element, gpointer data) int loop_track; track_info *head_track = &(gst_handle->info); track *head = head_track->head; + MEDIADEMUXER_CHECK_NULL_VOID(gst_handle); gst_handle->selected_tracks = (bool *) g_malloc(sizeof(bool) * (gst_handle->total_tracks)); MD_I("Allocating %p to core->selected_tracks \n", gst_handle->selected_tracks); @@ -677,7 +678,9 @@ static void __gst_on_pad_added(GstElement *element, GstPad *pad, gpointer data) track *tmp = NULL; mdgst_handle_t *gst_handle = (mdgst_handle_t *)data; track_info *head_track = &(gst_handle->info); - GstCaps *caps = gst_pad_get_current_caps(pad); + GstCaps *caps = NULL; + MEDIADEMUXER_CHECK_NULL_VOID(gst_handle); + caps = gst_pad_get_current_caps(pad); if (!caps) { MD_E("caps is NULL"); return; @@ -775,101 +778,114 @@ static void __gst_cb_typefind(GstElement *tf, guint probability, GstPad *pad = NULL; GstPad *demuxer_pad = NULL; GstPad *fake_pad = NULL; - gchar *type; + gchar *type = NULL; + MEDIADEMUXER_CHECK_NULL_VOID(gst_handle); type = gst_caps_to_string(caps); - if (type) { - MD_I("Media type %s found, probability %d%%\n", type, probability); - if (strstr(type, "quicktime") || (strstr(type, "audio/x-m4a")) || strstr(type, "x-3gp") - || strstr(type, "ogg") || strstr(type, "flv") || strstr(type, "x-msvideo")) { - gst_handle->is_valid_container = true; - if (strstr(type, "ogg")) - gst_handle->demux = gst_element_factory_make("oggdemux", NULL); - else if (strstr(type, "flv")) - gst_handle->demux = gst_element_factory_make("flvdemux", NULL); - else if (strstr(type, "x-msvideo")) - gst_handle->demux = gst_element_factory_make("avidemux", NULL); - else - gst_handle->demux = gst_element_factory_make("qtdemux", NULL); - if (!gst_handle->demux) { - gst_handle->is_valid_container = false; - MD_E("factory not able to create qtdemux\n"); - goto ERROR; - } else { - g_signal_connect(gst_handle->demux, "pad-added", - G_CALLBACK(__gst_on_pad_added), gst_handle); - g_signal_connect(gst_handle->demux, "no-more-pads", - G_CALLBACK(__gst_no_more_pad), gst_handle); - if (!gst_bin_add(GST_BIN(gst_handle->pipeline), gst_handle->demux)) { - gst_object_unref(gst_handle->demux); - MD_E("fail add demuxer(%s) in pipeline", - GST_ELEMENT_NAME(gst_handle->demux)); - goto ERROR; - } + if (!type) { + MD_E("Fail to get caps string"); + goto ERROR; + } - pad = gst_element_get_static_pad(gst_handle->typefind, "src"); - if (!pad) { - MD_E("fail to get typefind src pad.\n"); - goto ERROR; - } - demuxer_pad = gst_element_get_static_pad(gst_handle->demux, "sink"); - if (!demuxer_pad) { - MD_E("fail to get qtdemuc sink pad.\n"); - goto ERROR; - } - fake_pad = gst_element_get_static_pad(gst_handle->fakesink, "sink"); - if (!fake_pad) { - MD_E("fail to get fakesink sink pad.\n"); - goto ERROR; - } - gst_pad_unlink(pad, fake_pad); - MEDIADEMUXER_LINK_PAD(pad, demuxer_pad, ERROR); - - MEDIADEMUXER_SYNC_STATE_WITH_PARENT(gst_handle->demux, ERROR); - if (pad) - gst_object_unref(pad); - if (demuxer_pad) - gst_object_unref(demuxer_pad); - if (fake_pad) - gst_object_unref(fake_pad); - } - } else if ((strstr(type, "adts")) - || (strstr(type, "audio/mpeg")) - || (strstr(type, "audio/x-wav")) - || (strstr(type, "audio/x-flac")) - || (strstr(type, "application/x-id3")) - || (strstr(type, "audio/x-amr-nb-sh")) - || (strstr(type, "audio/x-amr-wb-sh"))) { - MD_I("Audio only format is found\n"); - pad = gst_element_get_static_pad(gst_handle->typefind, "src"); - if (!pad) { - MD_E("fail to get typefind src pad.\n"); - goto ERROR; - } - fake_pad = gst_element_get_static_pad(gst_handle->fakesink, "sink"); - if (!fake_pad) { - MD_E("fail to get fakesink sink pad.\n"); - goto ERROR; - } - gst_pad_unlink(pad, fake_pad); - if (pad) - gst_object_unref(pad); - if (fake_pad) - gst_object_unref(fake_pad); + MD_I("Media type %s found, probability %d%%\n", type, probability); + if (strstr(type, "quicktime") || strstr(type, "audio/x-m4a") || + strstr(type, "x-3gp") || strstr(type, "ogg") || + strstr(type, "flv") || strstr(type, "x-msvideo")) { + gst_handle->is_valid_container = true; + if (strstr(type, "ogg")) + gst_handle->demux = gst_element_factory_make("oggdemux", NULL); + else if (strstr(type, "flv")) + gst_handle->demux = gst_element_factory_make("flvdemux", NULL); + else if (strstr(type, "x-msvideo")) + gst_handle->demux = gst_element_factory_make("avidemux", NULL); + else + gst_handle->demux = gst_element_factory_make("qtdemux", NULL); - __gst_create_audio_only_pipeline(data, caps); - } else { + if (!gst_handle->demux) { gst_handle->is_valid_container = false; - MD_E("Not supported container %s\n", type); + MD_E("factory not able to create qtdemux\n"); + goto ERROR; } - g_free(type); + g_signal_connect(gst_handle->demux, "pad-added", + G_CALLBACK(__gst_on_pad_added), gst_handle); + g_signal_connect(gst_handle->demux, "no-more-pads", + G_CALLBACK(__gst_no_more_pad), gst_handle); + gst_element_set_locked_state(gst_handle->demux, TRUE); + if (!gst_bin_add(GST_BIN(gst_handle->pipeline), gst_handle->demux)) { + MD_E("fail add demuxer(%s) in pipeline", + GST_ELEMENT_NAME(gst_handle->demux)); + gst_object_unref(gst_handle->demux); + gst_handle->demux = NULL; + goto ERROR; + } + + pad = gst_element_get_static_pad(gst_handle->typefind, "src"); + if (!pad) { + MD_E("fail to get typefind src pad.\n"); + goto ERROR; + } + demuxer_pad = gst_element_get_static_pad(gst_handle->demux, "sink"); + if (!demuxer_pad) { + MD_E("fail to get qtdemuc sink pad.\n"); + goto ERROR; + } + fake_pad = gst_element_get_static_pad(gst_handle->fakesink, "sink"); + if (!fake_pad) { + MD_E("fail to get fakesink sink pad.\n"); + goto ERROR; + } + gst_pad_unlink(pad, fake_pad); + MEDIADEMUXER_LINK_PAD(pad, demuxer_pad, ERROR); + + MEDIADEMUXER_SYNC_STATE_WITH_PARENT(gst_handle->demux, ERROR); + gst_element_set_locked_state(gst_handle->demux, FALSE); + if (pad) + gst_object_unref(pad); + if (demuxer_pad) + gst_object_unref(demuxer_pad); + if (fake_pad) + gst_object_unref(fake_pad); + + } else if ((strstr(type, "adts")) + || (strstr(type, "audio/mpeg")) + || (strstr(type, "audio/x-wav")) + || (strstr(type, "audio/x-flac")) + || (strstr(type, "application/x-id3")) + || (strstr(type, "audio/x-amr-nb-sh")) + || (strstr(type, "audio/x-amr-wb-sh"))) { + MD_I("Audio only format is found\n"); + pad = gst_element_get_static_pad(gst_handle->typefind, "src"); + if (!pad) { + MD_E("fail to get typefind src pad.\n"); + goto ERROR; + } + fake_pad = gst_element_get_static_pad(gst_handle->fakesink, "sink"); + if (!fake_pad) { + MD_E("fail to get fakesink sink pad.\n"); + goto ERROR; + } + gst_pad_unlink(pad, fake_pad); + if (pad) + gst_object_unref(pad); + if (fake_pad) + gst_object_unref(fake_pad); + + __gst_create_audio_only_pipeline(data, caps); + } else { + gst_handle->is_valid_container = false; + MD_E("Not supported container %s\n", type); } + + g_free(type); MEDIADEMUXER_FLEAVE(); return; + ERROR: gst_handle->is_valid_container = false; if (type) g_free(type); + if (gst_handle->demux) + gst_element_set_locked_state(gst_handle->demux, FALSE); if (pad) gst_object_unref(pad); if (demuxer_pad) @@ -1214,7 +1230,7 @@ int _set_mime_video(media_format_h format, track *head) /* Round off the framerate */ if (frame_rate_denominator) - frame_rate = (int)floor((frame_rate_numerator / frame_rate_denominator) + 0.5); + frame_rate = (int)floor(((gdouble)frame_rate_numerator / frame_rate_denominator) + 0.5); MD_I("set frame rate %d", frame_rate); if (media_format_set_video_frame_rate(format, frame_rate)) { @@ -1766,6 +1782,7 @@ ERROR: void _gst_clear_struct(mdgst_handle_t *gst_handle) { MEDIADEMUXER_FENTER(); + MEDIADEMUXER_CHECK_NULL_VOID(gst_handle); if (gst_handle->selected_tracks) { MD_I("Deallocating gst_handle->selected_tracks %p\n", gst_handle->selected_tracks); -- 2.7.4 From 31903fd0e2de14a8a07a4c2894ad2d0c459e8a9e Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Fri, 29 Sep 2017 10:18:48 +0900 Subject: [PATCH 03/16] Fix coverity issues [Version] 0.1.24 [Profile] Mobile, Wearable, TV [Issue Type] Fix coverity issues Change-Id: I67cfb39f8904474b741e3a646274f71fb5fc8364 --- packaging/capi-mediademuxer.spec | 2 +- src/port_gst/mediademuxer_port_gst.c | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/packaging/capi-mediademuxer.spec b/packaging/capi-mediademuxer.spec index 94b2671..cdd1708 100755 --- a/packaging/capi-mediademuxer.spec +++ b/packaging/capi-mediademuxer.spec @@ -1,6 +1,6 @@ Name: capi-mediademuxer Summary: A Media Demuxer library in Tizen Native API -Version: 0.1.23 +Version: 0.1.24 Release: 1 Group: Multimedia/API License: Apache-2.0 diff --git a/src/port_gst/mediademuxer_port_gst.c b/src/port_gst/mediademuxer_port_gst.c index 4076551..ae1adb7 100755 --- a/src/port_gst/mediademuxer_port_gst.c +++ b/src/port_gst/mediademuxer_port_gst.c @@ -699,6 +699,13 @@ static void __gst_on_pad_added(GstElement *element, GstPad *pad, gpointer data) } gst_caps_unref(caps); tmp = head_track->head; + + if (!tmp) { + MD_I("trak is NULL\n"); + MEDIADEMUXER_FLEAVE(); + return; + } + while (tmp->next) tmp = tmp->next; if (!tmp || !tmp->caps_string) { @@ -1253,7 +1260,7 @@ int _set_mime_audio(media_format_h format, track *head) int bit = 0; int channels = 0; int id3_flag = 0; - const gchar *stream_format; + const gchar *stream_format = NULL; media_format_mimetype_e mime_type = MEDIA_FORMAT_MAX; struc = gst_caps_get_structure(head->caps, 0); @@ -1274,10 +1281,12 @@ int _set_mime_audio(media_format_h format, track *head) goto ERROR; stream_format = gst_structure_get_string(struc, "stream-format"); - if (strncmp(stream_format, "adts", 4) == 0) - media_format_set_audio_aac_type(format, 1); - else - media_format_set_audio_aac_type(format, 0); + if (stream_format) { + if (strncmp(stream_format, "adts", 4) == 0) + media_format_set_audio_aac_type(format, 1); + else + media_format_set_audio_aac_type(format, 0); + } } else if (mpegversion == 1 || id3_flag) { gst_structure_get_int(struc, "layer", &layer); -- 2.7.4 From 1703d65a71d369a16f3d699de8d89d2d52de8617 Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Mon, 16 Oct 2017 16:57:46 +0900 Subject: [PATCH 04/16] Fix coverity issues [Version] 0.1.25 [Profile] Mobile, Wearable, TV [Issue Type] Fix coverity issues Change-Id: I8f45adbfd1e966f01aed84b25c109c3c6579681a --- packaging/capi-mediademuxer.spec | 2 +- src/port_gst/mediademuxer_port_gst.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packaging/capi-mediademuxer.spec b/packaging/capi-mediademuxer.spec index cdd1708..d9fbcf1 100755 --- a/packaging/capi-mediademuxer.spec +++ b/packaging/capi-mediademuxer.spec @@ -1,6 +1,6 @@ Name: capi-mediademuxer Summary: A Media Demuxer library in Tizen Native API -Version: 0.1.24 +Version: 0.1.25 Release: 1 Group: Multimedia/API License: Apache-2.0 diff --git a/src/port_gst/mediademuxer_port_gst.c b/src/port_gst/mediademuxer_port_gst.c index ae1adb7..c0f1a3e 100755 --- a/src/port_gst/mediademuxer_port_gst.c +++ b/src/port_gst/mediademuxer_port_gst.c @@ -708,11 +708,19 @@ static void __gst_on_pad_added(GstElement *element, GstPad *pad, gpointer data) while (tmp->next) tmp = tmp->next; - if (!tmp || !tmp->caps_string) { - MD_I("trak or trak caps_string is NULL\n"); + + if (!tmp) { + MD_I("trak is NULL\n"); + MEDIADEMUXER_FLEAVE(); + return; + } + + if (!tmp->caps_string) { + MD_I("trak caps_string is NULL\n"); MEDIADEMUXER_FLEAVE(); return; } + if (tmp->caps_string[0] == 'v') { MD_I("found Video Pad\n"); (head_track->num_video_track)++; -- 2.7.4 From 41497313433fa2f928c4a1e5de13817e1408b261 Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Thu, 19 Oct 2017 17:18:56 +0900 Subject: [PATCH 05/16] Fix coverity issues [Version] 0.1.25 [Profile] Mobile, Wearable, TV [Issue Type] Fix coverity issues Change-Id: I732f1610e3c9a906d1c952770606d61686f11cef --- src/port_gst/mediademuxer_port_gst.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/port_gst/mediademuxer_port_gst.c b/src/port_gst/mediademuxer_port_gst.c index c0f1a3e..fb745d1 100755 --- a/src/port_gst/mediademuxer_port_gst.c +++ b/src/port_gst/mediademuxer_port_gst.c @@ -706,13 +706,13 @@ static void __gst_on_pad_added(GstElement *element, GstPad *pad, gpointer data) return; } - while (tmp->next) + while (tmp->next) { tmp = tmp->next; - - if (!tmp) { - MD_I("trak is NULL\n"); - MEDIADEMUXER_FLEAVE(); - return; + if (!tmp) { + MD_I("trak is NULL\n"); + MEDIADEMUXER_FLEAVE(); + return; + } } if (!tmp->caps_string) { -- 2.7.4 From cce7760d690414c9fd29a028203896ceb8e75fa7 Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Tue, 30 Jan 2018 10:56:54 +0900 Subject: [PATCH 06/16] Fix mistakes in header description [Version] 0.1.26 [Profile] Mobile, Wearable, TV [Issue Type] Fix description bugs Change-Id: Iee9d5d42d4a6059785a3606b9c4b51e7c32313bb --- include/mediademuxer.h | 103 ++++++++++++++++++++------------------- packaging/capi-mediademuxer.spec | 2 +- 2 files changed, 53 insertions(+), 52 deletions(-) diff --git a/include/mediademuxer.h b/include/mediademuxer.h index be38977..2cbe965 100755 --- a/include/mediademuxer.h +++ b/include/mediademuxer.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __TIZEN_MEDIADEMUXER_H__ -#define __TIZEN_MEDIADEMUXER_H__ +#ifndef __TIZEN_MULTIMEDIA_MEDIADEMUXER_H__ +#define __TIZEN_MULTIMEDIA_MEDIADEMUXER_H__ #include #include @@ -43,7 +43,7 @@ extern "C" { typedef struct mediademuxer_s *mediademuxer_h; /** - * @brief Enumeration for media demuxer state + * @brief Enumeration for media demuxer state. * @since_tizen 3.0 */ typedef enum { @@ -81,10 +81,10 @@ typedef enum { * #MEDIADEMUXER_ERROR_SEEK_FAILED, * #MEDIADEMUXER_ERROR_DRM_NOT_PERMITTED * @since_tizen 3.0 - * @param[in] error The error that occurred in media demuxer - * @param[in] user_data The user data passed from the code where - * mediademuxer_set_error_cb() was invoked - * This data will be accessible from mediademuxer_error_cb() + * @param[in] error The error that occurred in media demuxer + * @param[in] user_data The user data passed from the code where + * mediademuxer_set_error_cb() was invoked + * This data will be accessible from mediademuxer_error_cb() * @pre Create media demuxer handle by calling mediademuxer_create() function. * @see mediademuxer_set_error_cb() * @see mediademuxer_unset_error_cb() @@ -94,10 +94,10 @@ typedef void (*mediademuxer_error_cb) (mediademuxer_error_e error, void *user_da /** * @brief Called when end of stream occurs in media demuxer. * @since_tizen 3.0 - * @param[in] track_num The track_num which indicate eos for which track number occured - * @param[in] user_data The user data passed from the code where - * mediademuxer_set_eos_cb() was invoked - * This data will be accessible from mediademuxer_eos_cb() + * @param[in] track_num The track_num which indicate eos for which track number occured + * @param[in] user_data The user data passed from the code where + * mediademuxer_set_eos_cb() was invoked + * This data will be accessible from mediademuxer_eos_cb() * @pre Create media demuxer handle by calling mediademuxer_create() function. * @see mediademuxer_set_eos_cb() * @see mediademuxer_unset_eos_cb() @@ -108,7 +108,7 @@ typedef void (*mediademuxer_eos_cb) (int track_num, void *user_data); * @brief Creates a media demuxer handle for demuxing. * @since_tizen 3.0 * @remarks You must release @a demuxer using mediademuxer_destroy() function. - * @param[out] demuxer A new handle to media demuxer + * @param[out] demuxer A new handle to media demuxer * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation @@ -125,7 +125,7 @@ int mediademuxer_create(mediademuxer_h *demuxer); * @remarks The mediastorage privilege(http://tizen.org/privilege/mediastorage) should be added if any video/audio files are used to play located in the internal storage. * @remarks The externalstorage privilege(http://tizen.org/privilege/externalstorage) should be added if any video/audio files are used to play located in the external storage. * @remarks You must release @a demuxer using mediademuxer_destroy() function. - * @param[in] demuxer The media demuxer handle + * @param[in] demuxer The media demuxer handle * @param[in] path The content location, such as the file path * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful @@ -140,8 +140,8 @@ int mediademuxer_set_data_source(mediademuxer_h demuxer, const char *path); /** * @brief Prepares the media demuxer for demuxing. * @since_tizen 3.0 - * @remark User should call this before mediademuxer_start() function. - * @param[in] demuxer The media demuxer handle + * @remarks User should call this before mediademuxer_start() function. + * @param[in] demuxer The media demuxer handle * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter @@ -158,8 +158,9 @@ int mediademuxer_prepare(mediademuxer_h demuxer); /** * @brief Gets the total track count present in the container stream. * @since_tizen 3.0 - * @param[in] demuxer The media demuxer handle - * @param[out] count The number of tracks present + * @param[in] demuxer The media demuxer handle + * @param[out] count The number of tracks present + * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state @@ -173,8 +174,8 @@ int mediademuxer_get_track_count(mediademuxer_h demuxer, int *count); /** * @brief Selects the track to be performed. * @since_tizen 3.0 - * @param[in] demuxer The media demuxer handle - * @param[in] track_index The track index on which is selected for read + * @param[in] demuxer The media demuxer handle + * @param[in] track_index The track index on which is selected for read * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter @@ -189,8 +190,8 @@ int mediademuxer_select_track(mediademuxer_h demuxer, int track_index); /** * @brief Starts the media demuxer. * @since_tizen 3.0 - * @remark User should call this before mediademuxer_read_sample() function. - * @param[in] demuxer The media demuxer handle + * @remarks User should call this before mediademuxer_read_sample() function. + * @param[in] demuxer The media demuxer handle * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter @@ -209,9 +210,9 @@ int mediademuxer_start(mediademuxer_h demuxer); * @brief Retrieves the track format of the read sample. * @since_tizen 3.0 * @remarks The @a format should be released using media_format_unref() function. - * @param[in] demuxer The media demuxer handle - * @param[in] track_index The index of the track - * @param[out] format The media format handle + * @param[in] demuxer The media demuxer handle + * @param[in] track_index The index of the track + * @param[out] format The media format handle * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter @@ -229,11 +230,11 @@ int mediademuxer_get_track_info(mediademuxer_h demuxer, int track_index, media_f /** * @brief Reads a frame(sample) of one single track. * @since_tizen 3.0 - * @remark The @a outbuf should be released using media_packet_destroy() function. - * @remark Once this API is called, user app can call the mediatool APIs to extract + * @remarks The @a outbuf should be released using media_packet_destroy() function. + * @remarks Once this function is called, user app can call the mediatool APIs to extract * side information such as pts, size, duration, flags etc. - * @param[in] demuxer The media demuxer handle - * @param[in] track_index The index of track of which data is needed + * @param[in] demuxer The media demuxer handle + * @param[in] track_index The index of track of which data is needed * @param[out] outbuf The media packet handle * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful @@ -254,9 +255,9 @@ int mediademuxer_read_sample(mediademuxer_h demuxer, int track_index, media_pack /** * @brief Seeks to a particular instance of time (in milli seconds). * @since_tizen 3.0 - * @remark If mediademuxer_seek() is followed by mediademuxer_read_sample(), outbuf will be the key frame right before the seek position. - * @param[in] demuxer The media demuxer handle - * @param[in] pos The value of the new start position + * @remarks If mediademuxer_seek() is followed by mediademuxer_read_sample(), outbuf will be the key frame right before the seek position. + * @param[in] demuxer The media demuxer handle + * @param[in] pos The value of the new start position * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter @@ -271,8 +272,8 @@ int mediademuxer_seek(mediademuxer_h demuxer, int64_t pos); /** * @brief Unselects the selected track. * @since_tizen 3.0 - * @param[in] demuxer The media demuxer handle - * @param[in] track_index The track index to be unselected + * @param[in] demuxer The media demuxer handle + * @param[in] track_index The track index to be unselected * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter @@ -288,8 +289,8 @@ int mediademuxer_unselect_track(mediademuxer_h demuxer, int track_index); /** * @brief Stops the media demuxer. * @since_tizen 3.0 - * @remark User can call this if need to stop demuxing if needed. - * @param[in] demuxer The media demuxer handle + * @remarks User can call this if need to stop demuxing if needed. + * @param[in] demuxer The media demuxer handle * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter @@ -306,7 +307,7 @@ int mediademuxer_stop(mediademuxer_h demuxer); * @brief Resets the media demuxer. * @since_tizen 3.0 * @remarks User should call this before mediademuxer_destroy() function. - * @param[in] demuxer The media demuxer handle + * @param[in] demuxer The media demuxer handle * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter @@ -321,7 +322,7 @@ int mediademuxer_unprepare(mediademuxer_h demuxer); /** * @brief Removes the instance of media demuxer and clear all its context memory. * @since_tizen 3.0 - * @param[in] demuxer The media demuxer handle + * @param[in] demuxer The media demuxer handle * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter @@ -336,7 +337,7 @@ int mediademuxer_destroy(mediademuxer_h demuxer); /** * @brief Gets media demuxer state. * @since_tizen 3.0 - * @param[in] demuxer The media demuxer handle + * @param[in] demuxer The media demuxer handle * @param[out] state The media demuxer sate * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful @@ -348,13 +349,13 @@ int mediademuxer_destroy(mediademuxer_h demuxer); int mediademuxer_get_state(mediademuxer_h demuxer, mediademuxer_state *state); /** - * @brief Registers an error callback function to be invoked when an error occurs. + * @brief Sets an error callback function to be invoked when an error occurs. * @since_tizen 3.0 * @param[in] demuxer The media demuxer handle * @param[in] callback Callback function pointer - * @param[in] user_data The user data passed from the code where - * mediademuxer_set_error_cb() was invoked - * This data will be accessible from mediademuxer_error_cb() + * @param[in] user_data The user data passed from the code where + * mediademuxer_set_error_cb() was invoked + * This data will be accessible from mediademuxer_error_cb() * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter @@ -367,9 +368,9 @@ int mediademuxer_get_state(mediademuxer_h demuxer, mediademuxer_state *state); int mediademuxer_set_error_cb(mediademuxer_h demuxer, mediademuxer_error_cb callback, void *user_data); /** - * @brief Unregisters the error callback function. + * @brief Unsets the error callback function. * @since_tizen 3.0 - * @param[in] demuxer The media demuxer handle + * @param[in] demuxer The media demuxer handle * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter @@ -379,13 +380,13 @@ int mediademuxer_set_error_cb(mediademuxer_h demuxer, mediademuxer_error_cb call int mediademuxer_unset_error_cb(mediademuxer_h demuxer); /** - * @brief Registers an eos callback function to be invoked when an eos occurs. + * @brief Sets an eos callback function to be invoked when an eos occurs. * @since_tizen 3.0 * @param[in] demuxer The media demuxer handle * @param[in] callback Callback function pointer - * @param[in] user_data The user data passed from the code where - * mediademuxer_set_eos_cb() was invoked - * This data will be accessible from mediademuxer_eos_cb() + * @param[in] user_data The user data passed from the code where + * mediademuxer_set_eos_cb() was invoked + * This data will be accessible from mediademuxer_eos_cb() * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter @@ -398,9 +399,9 @@ int mediademuxer_unset_error_cb(mediademuxer_h demuxer); int mediademuxer_set_eos_cb(mediademuxer_h demuxer, mediademuxer_eos_cb callback, void *user_data); /** - * @brief Unregisters the eos callback function. + * @brief Unsets the eos callback function. * @since_tizen 3.0 - * @param[in] demuxer The media demuxer handle + * @param[in] demuxer The media demuxer handle * @return @c 0 on success, otherwise a negative error value * @retval #MEDIADEMUXER_ERROR_NONE Successful * @retval #MEDIADEMUXER_ERROR_INVALID_PARAMETER Invalid parameter @@ -416,4 +417,4 @@ int mediademuxer_unset_eos_cb(mediademuxer_h demuxer); #ifdef __cplusplus } #endif -#endif /* __TIZEN_MEDIADEMUXER_H__ */ +#endif /* __TIZEN_MULTIMEDIA_MEDIADEMUXER_H__ */ diff --git a/packaging/capi-mediademuxer.spec b/packaging/capi-mediademuxer.spec index d9fbcf1..f15f084 100755 --- a/packaging/capi-mediademuxer.spec +++ b/packaging/capi-mediademuxer.spec @@ -1,6 +1,6 @@ Name: capi-mediademuxer Summary: A Media Demuxer library in Tizen Native API -Version: 0.1.25 +Version: 0.1.26 Release: 1 Group: Multimedia/API License: Apache-2.0 -- 2.7.4 From 5d67e341c3eb02717167c18b9184d30df21054ea Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Wed, 7 Mar 2018 15:32:43 +0900 Subject: [PATCH 07/16] Fix typo error in mediademuxer doc [Version] 0.1.27 [Profile] Mobile, Wearable, TV [Issue Type] Fix type error Change-Id: Id311178ff61ea73323f1b72dc6cbb8fc55297d87 --- doc/mediademuxer_doc.h | 4 ++-- packaging/capi-mediademuxer.spec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/mediademuxer_doc.h b/doc/mediademuxer_doc.h index 6f2f63f..52feea3 100644 --- a/doc/mediademuxer_doc.h +++ b/doc/mediademuxer_doc.h @@ -40,8 +40,8 @@ * 4) To create single or multiple instances of media demuxer. One instance can demux only one
* input stream
* 5) To demux all the popular media formats such as MP4, AAC-NB, AAC-WB, MP3 etc.
- * 6) To extract elementarty media sample information, such as timestamp, sample size, key-frame(I-frame) etc.
- * 7) To identify encripted format
+ * 6) To extract elementary media sample information, such as timestamp, sample size, key-frame(I-frame) etc.
+ * 7) To identify encrypted format
* 8) To seek to a different position-forward or backward- while extracting
*
* Typical Call Flow of mediamuxer APIs is:
diff --git a/packaging/capi-mediademuxer.spec b/packaging/capi-mediademuxer.spec index f15f084..21ed98b 100755 --- a/packaging/capi-mediademuxer.spec +++ b/packaging/capi-mediademuxer.spec @@ -1,6 +1,6 @@ Name: capi-mediademuxer Summary: A Media Demuxer library in Tizen Native API -Version: 0.1.26 +Version: 0.1.27 Release: 1 Group: Multimedia/API License: Apache-2.0 -- 2.7.4 From 161e0c7e4526d8c55fd602af2a507abdd21ab5c5 Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Mon, 26 Mar 2018 11:38:47 +0900 Subject: [PATCH 08/16] Fix Svace issue (MEMORY_LEAK) [Version] 0.1.28 [Profile] Mobile, Wearable [Issue Type] Fix bugs Change-Id: I5a885c900ba1fd9b313932c724cf4e87f3e6f36e --- packaging/capi-mediademuxer.spec | 2 +- src/mediademuxer_ini.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packaging/capi-mediademuxer.spec b/packaging/capi-mediademuxer.spec index 21ed98b..783b06b 100755 --- a/packaging/capi-mediademuxer.spec +++ b/packaging/capi-mediademuxer.spec @@ -1,6 +1,6 @@ Name: capi-mediademuxer Summary: A Media Demuxer library in Tizen Native API -Version: 0.1.27 +Version: 0.1.28 Release: 1 Group: Multimedia/API License: Apache-2.0 diff --git a/src/mediademuxer_ini.c b/src/mediademuxer_ini.c index e0178fe..4892be7 100755 --- a/src/mediademuxer_ini.c +++ b/src/mediademuxer_ini.c @@ -157,7 +157,8 @@ int md_ini_load(md_ini_t *ini) else { MD_E("Invalid port is set to [%s] [%d]\n", ini->port_name, ini->port_type); - goto ERROR; + iniparser_freedict(dict); + return MD_COURRPTED_INI;; } MD_L("The port is set to [%s] [%d]\n", ini->port_name, ini->port_type); @@ -172,9 +173,6 @@ int md_ini_load(md_ini_t *ini) MD_L("port_type : %d\n", ini->port_type); return MD_ERROR_NONE; -ERROR: - return MD_COURRPTED_INI; - } static void _md_ini_check_ini_status(void) -- 2.7.4 From db548a9303231d52c4769c63a2e74e3a4a85a4ec Mon Sep 17 00:00:00 2001 From: SeokHoon Lee Date: Mon, 17 Sep 2018 16:00:20 +0900 Subject: [PATCH 09/16] Add gcov environment Signed-off-by: SeokHoon Lee Change-Id: I4ffa27fc3e42b90e640ae721781a49254fee74bf --- packaging/capi-mediademuxer.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packaging/capi-mediademuxer.spec b/packaging/capi-mediademuxer.spec index 783b06b..a700115 100755 --- a/packaging/capi-mediademuxer.spec +++ b/packaging/capi-mediademuxer.spec @@ -42,6 +42,13 @@ export CFLAGS="$CFLAGS -DENABLE_FFMPEG_CODEC" %endif export CFLAGS="$CFLAGS -DSYSCONFDIR=\\\"%{_sysconfdir}\\\" -DTIZEN_FEATURE_GST_UPSTREAM" +%if 0%{?gcov:1} +export CFLAGS+=" -fprofile-arcs -ftest-coverage" +export CXXFLAGS+=" -fprofile-arcs -ftest-coverage" +export FFLAGS+=" -fprofile-arcs -ftest-coverage" +export LDFLAGS+=" -lgcov" +%endif + MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -- 2.7.4 From 4e3695033c6f62f0659344662f423a46b980234d Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Fri, 7 Dec 2018 16:34:36 +0900 Subject: [PATCH 10/16] Fix dlog format error [Version] 0.1.29 [Profile] Common [Issue Type] Fix bugs Change-Id: I855b3268fb8476e93e76d7899d506b0f1bed5b80 --- packaging/capi-mediademuxer.spec | 2 +- src/port_gst/mediademuxer_port_gst.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packaging/capi-mediademuxer.spec b/packaging/capi-mediademuxer.spec index a700115..aa54962 100755 --- a/packaging/capi-mediademuxer.spec +++ b/packaging/capi-mediademuxer.spec @@ -1,6 +1,6 @@ Name: capi-mediademuxer Summary: A Media Demuxer library in Tizen Native API -Version: 0.1.28 +Version: 0.1.29 Release: 1 Group: Multimedia/API License: Apache-2.0 diff --git a/src/port_gst/mediademuxer_port_gst.c b/src/port_gst/mediademuxer_port_gst.c index fb745d1..24747e0 100755 --- a/src/port_gst/mediademuxer_port_gst.c +++ b/src/port_gst/mediademuxer_port_gst.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -1459,13 +1460,13 @@ static int _gst_copy_buf_to_media_packet(media_packet_h out_pkt, } /* copy data */ media_packet_get_buffer_size(out_pkt, &size); - MD_I("Media packet Buffer capacity: %llu GST Buffer size = %d\n", size, map.size); + MD_I("Media packet Buffer capacity: %"PRIu64" GST Buffer size = %"G_GSIZE_FORMAT"\n", size, map.size); if (size < (uint64_t)map.size) { - MD_W("Media packet Buffer capacity[%llu] is \ - less than the GST Buffer size[%d]. Resizing...\n", size, map.size); + MD_W("Media packet Buffer capacity[%"PRIu64"] is \ + less than the GST Buffer size[%"G_GSIZE_FORMAT"]. Resizing...\n", size, map.size); ret = media_packet_set_buffer_size(out_pkt, (uint64_t)map.size); media_packet_get_buffer_size(out_pkt, &size); - MD_I("Media packet Buffer NEW capacity: %llu \n", size); + MD_I("Media packet Buffer NEW capacity: %"PRIu64"\n", size); } if (media_packet_get_buffer_data_ptr(out_pkt, &pkt_data)) { MD_E("unable to get the buffer pointer from media_packet_get_buffer_data_ptr\n"); -- 2.7.4 From 5e0880bf4a6190862ea2ccb89820a7012700b669 Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Thu, 17 Jan 2019 14:50:45 +0900 Subject: [PATCH 11/16] Fix typo error [Version] 0.1.29 [Profile] Common [Issue Type] Fix type error Change-Id: I6d3e557c66862fc1ac8c6f161bec957b766cdfe2 --- include/mediademuxer.h | 2 +- include/port_gst/mediademuxer_port_gst.h | 12 ++++++------ src/port_gst/mediademuxer_port_gst.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/mediademuxer.h b/include/mediademuxer.h index 2cbe965..427df62 100755 --- a/include/mediademuxer.h +++ b/include/mediademuxer.h @@ -94,7 +94,7 @@ typedef void (*mediademuxer_error_cb) (mediademuxer_error_e error, void *user_da /** * @brief Called when end of stream occurs in media demuxer. * @since_tizen 3.0 - * @param[in] track_num The track_num which indicate eos for which track number occured + * @param[in] track_num The track_num which indicate eos for which track number occurred * @param[in] user_data The user data passed from the code where * mediademuxer_set_eos_cb() was invoked * This data will be accessible from mediademuxer_eos_cb() diff --git a/include/port_gst/mediademuxer_port_gst.h b/include/port_gst/mediademuxer_port_gst.h index c784b81..0442ba7 100755 --- a/include/port_gst/mediademuxer_port_gst.h +++ b/include/port_gst/mediademuxer_port_gst.h @@ -112,24 +112,24 @@ typedef struct _mdgst_handle_t { } mdgst_handle_t; /** - * @brief Called when the error has occured. + * @brief Called when the error has occurred. * @since_tizen 3.0 - * @details It will be invoked when the error has occured. + * @details It will be invoked when the error has occurred. * @param[in] error_code The error code * @param[in] user_data The user data passed from the callback registration function - * @pre It will be invoked when the error has occured if user register this callback using mediademuxer_set_error_cb(). + * @pre It will be invoked when the error has occurred if user register this callback using mediademuxer_set_error_cb(). * @see mediademuxer_set_error_cb() * @see mediademuxer_unset_error_cb() */ typedef void (*gst_error_cb)(mediademuxer_error_e error, void *user_data); /** - * @brief Called when the eos has occured. + * @brief Called when the eos has occurred. * @since_tizen 3.0 - * @details It will be invoked when the eos has occured. + * @details It will be invoked when the eos has occurred. * @param[in] track_num track number to indicate eos * @param[in] user_data The user data passed from the callback registration function - * @pre It will be invoked when the eos has occured if user register this callback using mediademuxer_set_eos_cb(). + * @pre It will be invoked when the eos has occurred if user register this callback using mediademuxer_set_eos_cb(). * @see mediademuxer_set_eos_cb() * @see mediademuxer_unset_eos_cb() */ diff --git a/src/port_gst/mediademuxer_port_gst.c b/src/port_gst/mediademuxer_port_gst.c index 24747e0..6c1cb1c 100755 --- a/src/port_gst/mediademuxer_port_gst.c +++ b/src/port_gst/mediademuxer_port_gst.c @@ -309,7 +309,7 @@ gboolean __gst_bus_call(GstBus *bus, GstMessage *msg, gpointer data) else if (error->domain == GST_CORE_ERROR) ret = __gst_handle_core_error(gst_handle, error->code); else - MD_W("Unexpected error has occured"); + MD_W("Unexpected error has occurred"); if (gst_handle->user_cb[_GST_EVENT_TYPE_ERROR]) { ((mediademuxer_error_cb)gst_handle->user_cb[_GST_EVENT_TYPE_ERROR]) -- 2.7.4 From 85b1dcf58bd012a4abdee1c161eb1e1dfb6b767d Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Mon, 10 Jun 2019 16:38:17 +0900 Subject: [PATCH 12/16] Fix Native API Reference doc error Change file permission 755 to 644 [Version] 0.1.29 [Issue Type] Fix typo error Change-Id: I11c82bf8c40dc1a09d9d884bc6082f4670692236 --- AUTHORS | 0 CMakeLists.txt | 0 LICENSE.Apache-2.0 | 0 NOTICE | 0 capi-mediademuxer.manifest | 0 capi-mediademuxer.pc.in | 0 include/mediademuxer.h | 2 +- include/mediademuxer_error.h | 0 include/mediademuxer_ini.h | 0 include/mediademuxer_port.h | 0 include/mediademuxer_private.h | 0 include/mediademuxer_util.h | 0 include/port_custom/mediademuxer_port_custom.h | 0 include/port_ffmpeg/mediademuxer_port_ffmpeg.h | 0 include/port_gst/mediademuxer_port_gst.h | 0 packaging/capi-mediademuxer.spec | 0 src/CMakeLists.txt | 0 src/mediademuxer.c | 0 src/mediademuxer_ini.c | 0 src/mediademuxer_port.c | 0 src/port_custom/mediademuxer_port_custom.c | 0 src/port_ffmpeg/mediademuxer_port_ffmpeg.c | 0 src/port_gst/mediademuxer_port_gst.c | 0 test/mediademuxer_test.c | 0 24 files changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 AUTHORS mode change 100755 => 100644 CMakeLists.txt mode change 100755 => 100644 LICENSE.Apache-2.0 mode change 100755 => 100644 NOTICE mode change 100755 => 100644 capi-mediademuxer.manifest mode change 100755 => 100644 capi-mediademuxer.pc.in mode change 100755 => 100644 include/mediademuxer.h mode change 100755 => 100644 include/mediademuxer_error.h mode change 100755 => 100644 include/mediademuxer_ini.h mode change 100755 => 100644 include/mediademuxer_port.h mode change 100755 => 100644 include/mediademuxer_private.h mode change 100755 => 100644 include/mediademuxer_util.h mode change 100755 => 100644 include/port_custom/mediademuxer_port_custom.h mode change 100755 => 100644 include/port_ffmpeg/mediademuxer_port_ffmpeg.h mode change 100755 => 100644 include/port_gst/mediademuxer_port_gst.h mode change 100755 => 100644 packaging/capi-mediademuxer.spec mode change 100755 => 100644 src/CMakeLists.txt mode change 100755 => 100644 src/mediademuxer.c mode change 100755 => 100644 src/mediademuxer_ini.c mode change 100755 => 100644 src/mediademuxer_port.c mode change 100755 => 100644 src/port_custom/mediademuxer_port_custom.c mode change 100755 => 100644 src/port_ffmpeg/mediademuxer_port_ffmpeg.c mode change 100755 => 100644 src/port_gst/mediademuxer_port_gst.c mode change 100755 => 100644 test/mediademuxer_test.c diff --git a/AUTHORS b/AUTHORS old mode 100755 new mode 100644 diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/LICENSE.Apache-2.0 b/LICENSE.Apache-2.0 old mode 100755 new mode 100644 diff --git a/NOTICE b/NOTICE old mode 100755 new mode 100644 diff --git a/capi-mediademuxer.manifest b/capi-mediademuxer.manifest old mode 100755 new mode 100644 diff --git a/capi-mediademuxer.pc.in b/capi-mediademuxer.pc.in old mode 100755 new mode 100644 diff --git a/include/mediademuxer.h b/include/mediademuxer.h old mode 100755 new mode 100644 index 427df62..91e69c4 --- a/include/mediademuxer.h +++ b/include/mediademuxer.h @@ -148,7 +148,7 @@ int mediademuxer_set_data_source(mediademuxer_h demuxer, const char *path); * @retval #MEDIADEMUXER_ERROR_INVALID_STATE Invalid state * @retval #MEDIADEMUXER_ERROR_INVALID_OPERATION Invalid Operation * @pre The media demuxer state should be #MEDIADEMUXER_STATE_IDLE. - * @pre mediademuxer_set_error_cb should be called before mediademuxer_prepare(). + * @pre mediademuxer_set_error_cb() should be called before mediademuxer_prepare(). * @post The media demuxer state will be #MEDIADEMUXER_STATE_READY. * @see mediademuxer_set_data_source() * @see mediademuxer_unprepare() diff --git a/include/mediademuxer_error.h b/include/mediademuxer_error.h old mode 100755 new mode 100644 diff --git a/include/mediademuxer_ini.h b/include/mediademuxer_ini.h old mode 100755 new mode 100644 diff --git a/include/mediademuxer_port.h b/include/mediademuxer_port.h old mode 100755 new mode 100644 diff --git a/include/mediademuxer_private.h b/include/mediademuxer_private.h old mode 100755 new mode 100644 diff --git a/include/mediademuxer_util.h b/include/mediademuxer_util.h old mode 100755 new mode 100644 diff --git a/include/port_custom/mediademuxer_port_custom.h b/include/port_custom/mediademuxer_port_custom.h old mode 100755 new mode 100644 diff --git a/include/port_ffmpeg/mediademuxer_port_ffmpeg.h b/include/port_ffmpeg/mediademuxer_port_ffmpeg.h old mode 100755 new mode 100644 diff --git a/include/port_gst/mediademuxer_port_gst.h b/include/port_gst/mediademuxer_port_gst.h old mode 100755 new mode 100644 diff --git a/packaging/capi-mediademuxer.spec b/packaging/capi-mediademuxer.spec old mode 100755 new mode 100644 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/src/mediademuxer.c b/src/mediademuxer.c old mode 100755 new mode 100644 diff --git a/src/mediademuxer_ini.c b/src/mediademuxer_ini.c old mode 100755 new mode 100644 diff --git a/src/mediademuxer_port.c b/src/mediademuxer_port.c old mode 100755 new mode 100644 diff --git a/src/port_custom/mediademuxer_port_custom.c b/src/port_custom/mediademuxer_port_custom.c old mode 100755 new mode 100644 diff --git a/src/port_ffmpeg/mediademuxer_port_ffmpeg.c b/src/port_ffmpeg/mediademuxer_port_ffmpeg.c old mode 100755 new mode 100644 diff --git a/src/port_gst/mediademuxer_port_gst.c b/src/port_gst/mediademuxer_port_gst.c old mode 100755 new mode 100644 diff --git a/test/mediademuxer_test.c b/test/mediademuxer_test.c old mode 100755 new mode 100644 -- 2.7.4 From 51aa555819fffae4202f26c02e09f9d2a9aa4104 Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Thu, 4 Jul 2019 17:33:54 +0900 Subject: [PATCH 13/16] Make a gcov package - make a gcov package for measuring coverage [Version] 0.1.30 Change-Id: Ifc11de0703b5898271277d213972fa4a73e5b475 --- packaging/capi-mediademuxer.spec | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/packaging/capi-mediademuxer.spec b/packaging/capi-mediademuxer.spec index aa54962..a61f42c 100644 --- a/packaging/capi-mediademuxer.spec +++ b/packaging/capi-mediademuxer.spec @@ -1,6 +1,6 @@ Name: capi-mediademuxer Summary: A Media Demuxer library in Tizen Native API -Version: 0.1.29 +Version: 0.1.30 Release: 1 Group: Multimedia/API License: Apache-2.0 @@ -19,6 +19,7 @@ BuildRequires: pkgconfig(gstreamer-app-1.0) BuildRequires: pkgconfig(iniparser) %description +A Media Demuxer library in Tizen Native API %package devel Summary: Multimedia Framework Demuxer Library (DEV) @@ -26,6 +27,16 @@ Group: Multimedia/API Requires: %{name} = %{version}-%{release} %description devel +A Media Demuxer library in Tizen Native API (Developement) + +%if 0%{?gcov:1} +%package gcov +Summary: Line Coverage of Media Demuxer library in Tizen C API +Group: Development/Multimedia + +%description gcov +Collection of files related to Line Coverage. It is tested as gcov for a media demuxer library in Tizen native API +%endif %prep %setup -q @@ -54,6 +65,10 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` make %{?jobs:-j%jobs} +%if 0%{?gcov:1} +mkdir -p gcov-obj +find . -name '*.gcno' -exec cp '{}' gcov-obj ';' +%endif %install rm -rf %{buildroot} @@ -61,6 +76,10 @@ mkdir -p %{buildroot}%{_bindir} cp test/mediademuxer_test %{buildroot}%{_bindir} %make_install +%if 0%{?gcov:1} +mkdir -p %{buildroot}%{_datadir}/gcov/obj +install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj +%endif %post /sbin/ldconfig @@ -79,4 +98,7 @@ cp test/mediademuxer_test %{buildroot}%{_bindir} %{_libdir}/pkgconfig/*.pc %{_libdir}/libcapi-mediademuxer.so - +%if 0%{?gcov:1} +%files gcov +%{_datadir}/gcov/obj/* +%endif -- 2.7.4 From 4e620de1928a0e166b536403c008e7864839f017 Mon Sep 17 00:00:00 2001 From: Eunhye Choi Date: Thu, 10 Oct 2019 14:47:11 +0900 Subject: [PATCH 14/16] release signal before destroy pipeline - resolve ASAN issue about heap-use-after-free - freed mem is accessed by no-more-pads/pad-added. [Version] 0.1.31 Change-Id: Ie0295bc40b9c0d5e4b0781a4d3b984c4f5285c64 --- packaging/capi-mediademuxer.spec | 2 +- src/port_gst/mediademuxer_port_gst.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packaging/capi-mediademuxer.spec b/packaging/capi-mediademuxer.spec index a61f42c..9d70954 100644 --- a/packaging/capi-mediademuxer.spec +++ b/packaging/capi-mediademuxer.spec @@ -1,6 +1,6 @@ Name: capi-mediademuxer Summary: A Media Demuxer library in Tizen Native API -Version: 0.1.30 +Version: 0.1.31 Release: 1 Group: Multimedia/API License: Apache-2.0 diff --git a/src/port_gst/mediademuxer_port_gst.c b/src/port_gst/mediademuxer_port_gst.c index 6c1cb1c..7812329 100644 --- a/src/port_gst/mediademuxer_port_gst.c +++ b/src/port_gst/mediademuxer_port_gst.c @@ -1836,6 +1836,12 @@ static int gst_demuxer_unprepare(MMHandleType pHandle) MEDIADEMUXER_CHECK_NULL(pHandle); mdgst_handle_t *gst_handle = (mdgst_handle_t *)pHandle; + /* disconnect signal handler */ + if (gst_handle->demux) { + g_signal_handlers_disconnect_by_func(gst_handle->demux, __gst_on_pad_added, gst_handle); + g_signal_handlers_disconnect_by_func(gst_handle->demux, __gst_no_more_pad, gst_handle); + } + /*Modification : Fix pipeline state change was block by appsink When EOS received and appsink also has many datas*/ int indx = 0; track *atrack = gst_handle->info.head; -- 2.7.4 From 372baeebe911ccb632f2a411589db84ed74aadbf Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Fri, 18 Oct 2019 13:09:03 +0900 Subject: [PATCH 15/16] Modify Native API document Change-Id: I63fef36501eb345502b4f3a4b3b1ae614ebf5d16 --- doc/mediademuxer_doc.h | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/doc/mediademuxer_doc.h b/doc/mediademuxer_doc.h index 52feea3..3d1d586 100644 --- a/doc/mediademuxer_doc.h +++ b/doc/mediademuxer_doc.h @@ -44,31 +44,30 @@ * 7) To identify encrypted format
* 8) To seek to a different position-forward or backward- while extracting
*
- * Typical Call Flow of mediamuxer APIs is:
- * mediademuxer_create()
- * mediademuxer_set_data_source()
- * mediademuxer_prepare()
- * mediademuxer_get_track_count()
- * mediademuxer_select_track()
- * mediademuxer_start()
- * mediademuxer_get_track_info()
- *
- * while(EOS) {
- *	if(track1 is set) {
- *		mediademuxer_read_sample();
- *		if(seek_request)
- *			mediademuxer_seek();
- *	}
- *	else if(track2 is set) {
- *		 mediademuxer_read_sample();
- *	}
- *	if(track2_not_needed)
- *		mediademuxer_unselect_track(track2);
- *  }
- * 
- * mediademuxer_stop()
- * mediademuxer_unprepare()
- * mediademuxer_destroy()
+ * Typical Call Flow of mediamuxer APIs is: + * @code +mediademuxer_create() +mediademuxer_set_data_source() +mediademuxer_prepare() +mediademuxer_get_track_count() +mediademuxer_select_track() +mediademuxer_start() +mediademuxer_get_track_info() +while (!EOS) { + if (track1 is set) { + mediademuxer_read_sample(track1); + if (seek is requested) + mediademuxer_seek(); + } else if (track2 is set) { + mediademuxer_read_sample(track2); + } + if (track2 is not needed anymore) + mediademuxer_unselect_track(track2); +} +mediademuxer_stop() +mediademuxer_unprepare() +mediademuxer_destroy() + * @endcode */ #endif /* __TIZEN_MEDIADEMUXER_DOC_H__ */ -- 2.7.4 From 996a83efedf9a5097f97a33eb6bf7b8d4664e953 Mon Sep 17 00:00:00 2001 From: Gilbok Lee Date: Wed, 4 Dec 2019 18:27:01 +0900 Subject: [PATCH 16/16] Add coverage exception macros [Version] 0.1.32 [Issue Type] Line coverage Change-Id: I816ff28dbc7827b1e7e7f4d439a29b4e5e264406 --- include/mediademuxer_util.h | 33 ++++++++++++++---------------- packaging/capi-mediademuxer.spec | 8 ++++---- src/mediademuxer.c | 4 ++-- src/mediademuxer_port.c | 2 +- src/port_custom/mediademuxer_port_custom.c | 2 ++ src/port_ffmpeg/mediademuxer_port_ffmpeg.c | 2 ++ src/port_gst/mediademuxer_port_gst.c | 5 +++-- 7 files changed, 29 insertions(+), 27 deletions(-) diff --git a/include/mediademuxer_util.h b/include/mediademuxer_util.h index 93c7a58..72cdd25 100644 --- a/include/mediademuxer_util.h +++ b/include/mediademuxer_util.h @@ -30,27 +30,24 @@ #include #include +#include +#include + #ifdef __cplusplus extern "C" { #endif -/* #define PRINT_ON_CONSOLE */ -#ifdef PRINT_ON_CONSOLE -#include -#include -#define PRINT_F g_print -#define MD_FENTER(); PRINT_F("function:[%s] ENTER\n", __func__); -#define MD_FLEAVE(); PRINT_F("function [%s] LEAVE\n", __func__); -#define MD_C PRINT_F -#define MD_E PRINT_F -#define MD_W PRINT_F -#define MD_I PRINT_F -#define MD_L PRINT_F -#define MD_V PRINT_F -#define MD_F PRINT_F +#ifdef TIZEN_EXCLUDE_COVERAGE +#define MD_FENTER() +#define MD_FLEAVE() +#define MD_C(fmt, arg...) +#define MD_E(fmt, arg...) +#define MD_W(fmt, arg...) +#define MD_I(fmt, arg...) +#define MD_L(fmt, arg...) +#define MD_V(fmt, arg...) +#define MD_F(fmt, arg...) #else -#include -#include #define MD_FENTER(); LOGI("function:[%s] ENTER\n", __func__); #define MD_FLEAVE(); LOGI("function [%s] LEAVE\n", __func__); #define MD_C LOGE /* MMF_DEBUG_LEVEL_0 */ @@ -69,8 +66,8 @@ extern "C" { x = NULL; #if 1 -#define MEDIADEMUXER_FENTER(); MD_FENTER(); -#define MEDIADEMUXER_FLEAVE(); MD_FLEAVE(); +#define MEDIADEMUXER_FENTER() MD_FENTER() +#define MEDIADEMUXER_FLEAVE() MD_FLEAVE() #else #define MEDIADEMUXER_FENTER(); #define MEDIADEMUXER_FLEAVE(); diff --git a/packaging/capi-mediademuxer.spec b/packaging/capi-mediademuxer.spec index 9d70954..27be563 100644 --- a/packaging/capi-mediademuxer.spec +++ b/packaging/capi-mediademuxer.spec @@ -1,6 +1,6 @@ Name: capi-mediademuxer Summary: A Media Demuxer library in Tizen Native API -Version: 0.1.31 +Version: 0.1.32 Release: 1 Group: Multimedia/API License: Apache-2.0 @@ -54,9 +54,9 @@ export CFLAGS="$CFLAGS -DENABLE_FFMPEG_CODEC" export CFLAGS="$CFLAGS -DSYSCONFDIR=\\\"%{_sysconfdir}\\\" -DTIZEN_FEATURE_GST_UPSTREAM" %if 0%{?gcov:1} -export CFLAGS+=" -fprofile-arcs -ftest-coverage" -export CXXFLAGS+=" -fprofile-arcs -ftest-coverage" -export FFLAGS+=" -fprofile-arcs -ftest-coverage" +export CFLAGS+=" -DTIZEN_EXCLUDE_COVERAGE -fprofile-arcs -ftest-coverage" +export CXXFLAGS+=" -DTIZEN_EXCLUDE_COVERAGE -fprofile-arcs -ftest-coverage" +export FFLAGS+=" -DTIZEN_EXCLUDE_COVERAGE -fprofile-arcs -ftest-coverage" export LDFLAGS+=" -lgcov" %endif diff --git a/src/mediademuxer.c b/src/mediademuxer.c index 35cbc15..03ed360 100644 --- a/src/mediademuxer.c +++ b/src/mediademuxer.c @@ -434,7 +434,7 @@ int mediademuxer_unset_error_cb(mediademuxer_h demuxer) MD_I("mediademuxer_unset_error_cb\n"); return MEDIADEMUXER_ERROR_NONE; } - +//LCOV_EXCL_START static gboolean _mediademuxer_error_cb(mediademuxer_error_e error, void *user_data) { if (user_data == NULL) { @@ -450,7 +450,7 @@ static gboolean _mediademuxer_error_cb(mediademuxer_error_e error, void *user_da MD_I("_mediademuxer_error_cb: ERROR %d to report. But call back is not set\n", error); return 0; } - +//LCOV_EXCL_STOP int mediademuxer_set_eos_cb(mediademuxer_h demuxer, mediademuxer_eos_cb callback, void *user_data) { diff --git a/src/mediademuxer_port.c b/src/mediademuxer_port.c index 0d5dd63..7381ce8 100644 --- a/src/mediademuxer_port.c +++ b/src/mediademuxer_port.c @@ -113,7 +113,7 @@ int __md_util_exist_file_path(const char *file_path) char buf[MAX_ERR_LEN]; int ret_err = 0; ret_err = strerror_r(errno, buf, MAX_ERR_LEN); - if (0 == ret_err) + if (ret_err == 0) MD_E("failed to open file by %s (%d)\n", buf, errno); else MD_E("File not found, strerror_r() failed with errno (%d)\n", errno); diff --git a/src/port_custom/mediademuxer_port_custom.c b/src/port_custom/mediademuxer_port_custom.c index 78a6a7b..ebe5f5b 100644 --- a/src/port_custom/mediademuxer_port_custom.c +++ b/src/port_custom/mediademuxer_port_custom.c @@ -25,6 +25,7 @@ #include #include +//LCOV_EXCL_START static int custom_demuxer_init(MMHandleType *pHandle); static int custom_demuxer_prepare(MMHandleType pHandle, char *uri); static int custom_demuxer_get_data_count(MMHandleType pHandle, int *count); @@ -105,3 +106,4 @@ static int custom_demuxer_get_data(MMHandleType pHandle, char *buffer) MEDIADEMUXER_FLEAVE(); return 0; } +//LCOV_EXCL_STOP \ No newline at end of file diff --git a/src/port_ffmpeg/mediademuxer_port_ffmpeg.c b/src/port_ffmpeg/mediademuxer_port_ffmpeg.c index 4405359..7b2e0bc 100644 --- a/src/port_ffmpeg/mediademuxer_port_ffmpeg.c +++ b/src/port_ffmpeg/mediademuxer_port_ffmpeg.c @@ -25,6 +25,7 @@ #include #include +//LCOV_EXCL_START static int ffmpeg_demuxer_init(MMHandleType *pHandle); static int ffmpeg_demuxer_prepare(MMHandleType pHandle, char *uri); static int ffmpeg_demuxer_get_data_count(MMHandleType pHandle, int *count); @@ -110,3 +111,4 @@ static int ffmpeg_demuxer_get_data(MMHandleType pHandle, char *buffer) MEDIADEMUXER_FLEAVE(); return ret; } +//LCOV_EXCL_STOP \ No newline at end of file diff --git a/src/port_gst/mediademuxer_port_gst.c b/src/port_gst/mediademuxer_port_gst.c index 7812329..764e6b7 100644 --- a/src/port_gst/mediademuxer_port_gst.c +++ b/src/port_gst/mediademuxer_port_gst.c @@ -29,6 +29,7 @@ #include #include +//LCOV_EXCL_START static int gst_demuxer_init(MMHandleType *pHandle); static int gst_demuxer_prepare(MMHandleType pHandle, char *uri); static int gst_demuxer_get_data_count(MMHandleType pHandle, int *count); @@ -356,8 +357,7 @@ static void __gst_no_more_pad(GstElement *element, gpointer data) head = head->next; } gst_handle->is_prepared = true; - MD_I("core->is_prepared: "); - gst_handle->is_prepared ? MD_I("true\n") : MD_I("false\n"); + MD_I("core->is_prepared: true"); MEDIADEMUXER_FLEAVE(); } @@ -1971,3 +1971,4 @@ static int __gst_eos_callback(int track_num, void* user_data) MD_E("EOS received, but callback is not set!!!"); return MD_ERROR_NONE; } +//LCOV_EXCL_STOP \ No newline at end of file -- 2.7.4