From: Sangchul Lee Date: Wed, 13 Jan 2021 05:13:08 +0000 (+0900) Subject: webrtc_sink: Skip element when auto-plugging if it is in the excluded list X-Git-Tag: submit/tizen/20210729.023123~159 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f8945b22c344fea0c22e83e5c7fc480d2d541091;p=platform%2Fcore%2Fapi%2Fwebrtc.git webrtc_sink: Skip element when auto-plugging if it is in the excluded list [Version] 0.1.82 [Issue Type] New feature Change-Id: Ia051348d59944b0e7150399c2373678723abf083 Signed-off-by: Sangchul Lee --- diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 25716f06..6017b001 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: 0.1.81 +Version: 0.1.82 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/webrtc_sink.c b/src/webrtc_sink.c index 26486136..94087c02 100644 --- a/src/webrtc_sink.c +++ b/src/webrtc_sink.c @@ -350,18 +350,26 @@ static int __decodebin_autoplug_select_cb(GstElement *decodebin, GstPad *pad, Gs LOG_INFO("factory [name:%s, klass:%s]", factory_name, klass); + str_arr = webrtc->ini.general.gst_excluded_elements; + while (str_arr && *str_arr) { + if (g_strrstr(factory_name, *str_arr++)) { + LOG_WARNING("this element[%s] is an item of excluded element list in ini file, skip it", factory_name); + return GST_AUTOPLUG_SELECT_SKIP; + } + } + if (g_strrstr(klass, "Decoder/Audio/Hardware") || (g_strrstr(klass, "Decoder/Audio") && __is_factory_name_for_hw(factory_name))) { str_arr = webrtc->ini.rendering_sink.a_hw_decoder_elements; if (str_arr == NULL || !g_strv_contains((const gchar * const *)str_arr, factory_name)) { - LOG_DEBUG("this audio hw decoder element[%s] is not specified in ini file, skip it", factory_name); + LOG_WARNING("this audio hw decoder element[%s] is not specified in ini file, skip it", factory_name); return GST_AUTOPLUG_SELECT_SKIP; } } else if (g_strrstr(klass, "Decoder/Video/Hardware") || (g_strrstr(klass, "Decoder/Video") && __is_factory_name_for_hw(factory_name))) { str_arr = webrtc->ini.rendering_sink.v_hw_decoder_elements; if (str_arr == NULL || !g_strv_contains((const gchar * const *)str_arr, factory_name)) { - LOG_DEBUG("this video hw decoder element[%s] is not specified in ini file, skip it", factory_name); + LOG_WARNING("this video hw decoder element[%s] is not specified in ini file, skip it", factory_name); return GST_AUTOPLUG_SELECT_SKIP; } }