• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * See: https://bugzilla.gnome.org/show_bug.cgi?id=779765
3  */
4 
5 #include "gstrtp-utils.h"
6 
7 static void
gst_rtp_utils_uri_query_foreach(const gchar * key,const gchar * value,GObject * src)8 gst_rtp_utils_uri_query_foreach (const gchar * key, const gchar * value,
9     GObject * src)
10 {
11   if (key == NULL) {
12     GST_WARNING_OBJECT (src, "Refusing to use empty key.");
13     return;
14   }
15 
16   if (value == NULL) {
17     GST_WARNING_OBJECT (src, "Refusing to use NULL for key %s.", key);
18     return;
19   }
20 
21   GST_DEBUG_OBJECT (src, "Setting property '%s' to '%s'", key, value);
22   gst_util_set_object_arg (src, key, value);
23 }
24 
25 void
gst_rtp_utils_set_properties_from_uri_query(GObject * obj,const GstUri * uri)26 gst_rtp_utils_set_properties_from_uri_query (GObject * obj, const GstUri * uri)
27 {
28   GHashTable *hash_table;
29 
30   g_return_if_fail (uri != NULL);
31   hash_table = gst_uri_get_query_table (uri);
32 
33   if (hash_table) {
34     g_hash_table_foreach (hash_table,
35         (GHFunc) gst_rtp_utils_uri_query_foreach, obj);
36 
37     g_hash_table_unref (hash_table);
38   }
39 }
40