mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
g_thread_init() is deprecated in glib master
It's not needed any longer.
This commit is contained in:
parent
ff96aeee84
commit
fef18639db
6 changed files with 18 additions and 0 deletions
|
@ -360,6 +360,9 @@ gst_init_get_option_group (void)
|
|||
{NULL}
|
||||
};
|
||||
|
||||
/* Since GLib 2.31.0 threading is always enabled and g_thread_init()
|
||||
* is not needed any longer and deprecated */
|
||||
#if !GLIB_CHECK_VERSION (2, 31, 0)
|
||||
/* Since GLib 2.23.2 calling g_thread_init() 'late' is allowed and is
|
||||
* automatically done as part of g_type_init() */
|
||||
if (glib_check_version (2, 23, 3)) {
|
||||
|
@ -381,6 +384,7 @@ gst_init_get_option_group (void)
|
|||
} else {
|
||||
/* GLib >= 2.23.2 */
|
||||
}
|
||||
#endif
|
||||
|
||||
group = g_option_group_new ("gst", _("GStreamer Options"),
|
||||
_("Show GStreamer Options"), NULL, NULL);
|
||||
|
@ -424,8 +428,10 @@ gst_init_check (int *argc, char **argv[], GError ** err)
|
|||
#endif
|
||||
gboolean res;
|
||||
|
||||
#if !GLIB_CHECK_VERSION (2, 31, 0)
|
||||
if (!g_thread_get_initialized ())
|
||||
g_thread_init (NULL);
|
||||
#endif
|
||||
|
||||
if (gst_initialized) {
|
||||
GST_DEBUG ("already initialized gst");
|
||||
|
@ -574,8 +580,10 @@ init_pre (GOptionContext * context, GOptionGroup * group, gpointer data,
|
|||
|
||||
g_type_init ();
|
||||
|
||||
#if !GLIB_CHECK_VERSION (2, 31, 0)
|
||||
/* we need threading to be enabled right here */
|
||||
g_assert (g_thread_get_initialized ());
|
||||
#endif
|
||||
|
||||
_gst_debug_init ();
|
||||
|
||||
|
|
|
@ -41,8 +41,10 @@ main (int argc, char *argv[])
|
|||
if (argc != 2 || strcmp (argv[1], "-l"))
|
||||
return 1;
|
||||
|
||||
#if !GLIB_CHECK_VERSION (2, 31, 0)
|
||||
if (!g_thread_supported ())
|
||||
g_thread_init (NULL);
|
||||
#endif
|
||||
|
||||
my_argc = 2;
|
||||
my_argv = g_malloc (my_argc * sizeof (char *));
|
||||
|
|
|
@ -1561,7 +1561,9 @@ main (int argc, char *argv[])
|
|||
textdomain (GETTEXT_PACKAGE);
|
||||
#endif
|
||||
|
||||
#if !GLIB_CHECK_VERSION (2, 31, 0)
|
||||
g_thread_init (NULL);
|
||||
#endif
|
||||
|
||||
gst_tools_set_prgname ("gst-inspect");
|
||||
|
||||
|
|
|
@ -971,7 +971,9 @@ main (int argc, char *argv[])
|
|||
textdomain (GETTEXT_PACKAGE);
|
||||
#endif
|
||||
|
||||
#if !GLIB_CHECK_VERSION (2, 31, 0)
|
||||
g_thread_init (NULL);
|
||||
#endif
|
||||
|
||||
gst_tools_set_prgname ("gst-launch");
|
||||
|
||||
|
|
|
@ -153,7 +153,9 @@ main (int argc, char *argv[])
|
|||
textdomain (GETTEXT_PACKAGE);
|
||||
#endif
|
||||
|
||||
#if !GLIB_CHECK_VERSION (2, 31, 0)
|
||||
g_thread_init (NULL);
|
||||
#endif
|
||||
|
||||
gst_tools_set_prgname ("gst-typefind");
|
||||
|
||||
|
|
|
@ -641,7 +641,9 @@ main (int argc, char *argv[])
|
|||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
#if !GLIB_CHECK_VERSION (2, 31, 0)
|
||||
g_thread_init (NULL);
|
||||
#endif
|
||||
|
||||
gst_tools_set_prgname ("gst-xmlinspect");
|
||||
|
||||
|
|
Loading…
Reference in a new issue