[grilo-plugins] plugins: g_thread_init() is deprecated



commit 95c7815c9bb72fa82b3af5d6bf0f58c21c0ea765
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Sat May 26 17:40:12 2012 +0000

    plugins: g_thread_init() is deprecated
    
    For glib >= 2.32.0

 src/media/upnp/grl-upnp.c       |    2 ++
 src/media/vimeo/grl-vimeo.c     |    2 ++
 src/media/youtube/grl-youtube.c |    2 ++
 test/test_local_metadata.c      |    2 ++
 4 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/media/upnp/grl-upnp.c b/src/media/upnp/grl-upnp.c
index f7a9605..4572ec7 100644
--- a/src/media/upnp/grl-upnp.c
+++ b/src/media/upnp/grl-upnp.c
@@ -156,10 +156,12 @@ grl_upnp_plugin_init (GrlPluginRegistry *registry,
 
   GRL_DEBUG ("grl_upnp_plugin_init");
 
+#if !GLIB_CHECK_VERSION(2,32,0)
   /* libsoup needs this */
   if (!g_thread_supported()) {
     g_thread_init (NULL);
   }
+#endif
 
   context_manager = gupnp_context_manager_new (NULL, 0);
   g_signal_connect (context_manager,
diff --git a/src/media/vimeo/grl-vimeo.c b/src/media/vimeo/grl-vimeo.c
index 4a2b2d8..9c69ffd 100644
--- a/src/media/vimeo/grl-vimeo.c
+++ b/src/media/vimeo/grl-vimeo.c
@@ -99,9 +99,11 @@ grl_vimeo_plugin_init (GrlPluginRegistry *registry,
 
   GRL_DEBUG ("vimeo_plugin_init");
 
+#if !GLIB_CHECK_VERSION(2,32,0)
   if (!g_thread_supported ()) {
     g_thread_init (NULL);
   }
+#endif
 
   if (!configs) {
     GRL_INFO ("Configuration not provided! Plugin not loaded");
diff --git a/src/media/youtube/grl-youtube.c b/src/media/youtube/grl-youtube.c
index 3c060bd..bf14388 100644
--- a/src/media/youtube/grl-youtube.c
+++ b/src/media/youtube/grl-youtube.c
@@ -276,10 +276,12 @@ grl_youtube_plugin_init (GrlPluginRegistry *registry,
     return FALSE;
   }
 
+#if !GLIB_CHECK_VERSION(2,32,0)
   /* libgdata needs this */
   if (!g_thread_supported()) {
     g_thread_init (NULL);
   }
+#endif
 
   source = grl_youtube_source_new (api_key, YOUTUBE_CLIENT_ID);
 
diff --git a/test/test_local_metadata.c b/test/test_local_metadata.c
index b940e91..fb6c147 100644
--- a/test/test_local_metadata.c
+++ b/test/test_local_metadata.c
@@ -293,7 +293,9 @@ int
 main(int argc, char **argv)
 {
   grl_init (&argc, &argv);
+#if !GLIB_CHECK_VERSION(2,32,0)
   g_thread_init (NULL);
+#endif
 
   loop = g_main_loop_new (g_main_context_default (), TRUE);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]