]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/commitdiff
g_thread_init() is deprecated in glib master
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 3 Dec 2011 17:40:53 +0000 (17:40 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 3 Dec 2011 17:40:53 +0000 (17:40 +0000)
It's not needed any longer.

gst/gst.c
libs/gst/helpers/gst-plugin-scanner.c
tools/gst-inspect.c
tools/gst-launch.c
tools/gst-typefind.c
tools/gst-xmlinspect.c

index aa187f64f3d9d0495c152286a49aefbc0b55ef96..ff7f2507ca41a4241ce2a30d3c87ff0d7cc446f5 100644 (file)
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -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 ();
 
index 04057281019eb19aa0dcc60915be7079c912833f..d54c65686cc21b08acba1a853d695deb48bf33c0 100644 (file)
@@ -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 *));
index f42b6edaf53597d87df8ff6a973d8ba975889f1e..d3ce0c8533e9902eebce2dd9ea2042f89f3078c6 100644 (file)
@@ -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");
 
index ea99b8f6dda038e61d33b7d8987041dcf1e824d5..b801d033d456a5f5c13e7c83aad88347e7df3cae 100644 (file)
@@ -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");
 
index 53635d620e6aed65d092957d58a8d6e80a6af0e7..123f395dffeec35ec75b9969278491dab6199aef 100644 (file)
@@ -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");
 
index d1df7e1b6db40dc0c13858eb4ccd22f6abb33083..af3bb7f25f3add917bb2a4c2e6fd067a5a95b753 100644 (file)
@@ -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");