webrtc_sink: Skip element when auto-plugging if it is in the excluded list 62/251362/7
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 13 Jan 2021 05:13:08 +0000 (14:13 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 21 Jan 2021 07:33:41 +0000 (16:33 +0900)
[Version] 0.1.82
[Issue Type] New feature

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

index 25716f06cfdccb49e62ce40a5836c0a67014a3b2..6017b00105c7dbf70178465bb80199031166d382 100644 (file)
@@ -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
index 26486136889b02c838e0e260eb96690d118a0706..94087c02d5e076f3bce8ea7b7223c25bea355d77 100644 (file)
@@ -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;
                }
        }