soup: work around frequent deadlocks in GLib type initialisation

.. by registering the types from the plugin init function. This
seems to help, but we'll see if it's enough (might need similar
things elsewhere).

https://bugzilla.gnome.org/show_bug.cgi?id=693911
https://bugzilla.gnome.org/show_bug.cgi?id=674885
This commit is contained in:
Tim-Philipp Müller 2016-06-17 19:59:13 +01:00
parent 5a7217a147
commit 33fb50b308

View file

@ -34,6 +34,20 @@ plugin_init (GstPlugin * plugin)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
/* see https://bugzilla.gnome.org/show_bug.cgi?id=674885 */
g_type_ensure (G_TYPE_SOCKET);
g_type_ensure (G_TYPE_SOCKET_ADDRESS);
g_type_ensure (G_TYPE_SOCKET_SERVICE);
g_type_ensure (G_TYPE_SOCKET_FAMILY);
g_type_ensure (G_TYPE_SOCKET_CLIENT);
g_type_ensure (G_TYPE_RESOLVER);
g_type_ensure (G_TYPE_PROXY_RESOLVER);
g_type_ensure (G_TYPE_PROXY_ADDRESS);
g_type_ensure (G_TYPE_TLS_CERTIFICATE);
g_type_ensure (G_TYPE_TLS_CONNECTION);
g_type_ensure (G_TYPE_TLS_DATABASE);
g_type_ensure (G_TYPE_TLS_INTERACTION);
gst_element_register (plugin, "souphttpsrc", GST_RANK_PRIMARY,
GST_TYPE_SOUP_HTTP_SRC);
gst_element_register (plugin, "souphttpclientsink", GST_RANK_NONE,