[totem] main: Update glib requirements



commit 1a0e860a122a26394016241f7d6b5e8c79beb51d
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Mar 28 14:50:12 2012 +0200

    main: Update glib requirements
    
    Now that 2.32 is released

 browser-plugin/totem-plugin-viewer.c      |    4 ---
 configure.in                              |    2 +-
 src/backend/bacon-video-widget-gst-0.10.c |   33 +----------------------------
 src/backend/bvw-test.c                    |    3 --
 src/test-properties-page.c                |    3 --
 src/totem-audio-preview.c                 |    4 ---
 src/totem-object.c                        |    5 ----
 src/totem-resources.c                     |    4 ---
 src/totem-video-thumbnailer.c             |    4 ---
 src/totem.c                               |    3 --
 10 files changed, 2 insertions(+), 63 deletions(-)
---
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index f0e0d85..424e882 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -2228,10 +2228,6 @@ int main (int argc, char **argv)
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
 
-#if !GLIB_CHECK_VERSION (2, 31, 0)
-	g_thread_init (NULL);
-#endif
-
 	g_set_application_name (_("Movie browser plugin"));
 	gtk_window_set_default_icon_name ("totem");
 
diff --git a/configure.in b/configure.in
index 128f97f..6ff4ea4 100644
--- a/configure.in
+++ b/configure.in
@@ -41,7 +41,7 @@ AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal])
 AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
 
 # Requirements
-GLIB_REQS=2.27.92
+GLIB_REQS=2.31.0
 GIO_REQS=2.27.92
 GTK_REQS=3.3.6
 TOTEM_PLPARSER_REQS=2.32.4
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index 726024b..dafeb65 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -240,11 +240,7 @@ struct BaconVideoWidgetPrivate
 
   /* When seeking, queue up the seeks if they happen before
    * the previous one finished */
-#if GLIB_CHECK_VERSION (2, 31, 0)
   GMutex                       seek_mutex;
-#else
-  GMutex                      *seek_mutex;
-#endif
   GstClock                    *clock;
   GstClockTime                 seek_req_time;
   gint64                       seek_time;
@@ -1166,11 +1162,7 @@ bacon_video_widget_init (BaconVideoWidget * bvw)
   priv->tag_update_queue = g_async_queue_new_full ((GDestroyNotify) update_tags_delayed_data_destroy);
   priv->tag_update_id = 0;
 
-#if GLIB_CHECK_VERSION (2, 31, 0)
   g_mutex_init (&priv->seek_mutex);
-#else
-  priv->seek_mutex = g_mutex_new ();
-#endif
   priv->clock = gst_system_clock_obtain ();
   priv->seek_req_time = GST_CLOCK_TIME_NONE;
   priv->seek_time = -1;
@@ -2023,21 +2015,13 @@ bvw_bus_message_cb (GstBus * bus, GstMessage * message, gpointer data)
     case GST_MESSAGE_ASYNC_DONE: {
 	gint64 _time;
 	/* When a seek has finished, set the playing state again */
-#if GLIB_CHECK_VERSION (2, 31, 0)
 	g_mutex_lock (&bvw->priv->seek_mutex);
-#else
-	g_mutex_lock (bvw->priv->seek_mutex);
-#endif
 
 	bvw->priv->seek_req_time = gst_clock_get_internal_time (bvw->priv->clock);
 	_time = bvw->priv->seek_time;
 	bvw->priv->seek_time = -1;
 
-#if GLIB_CHECK_VERSION (2, 31, 0)
 	g_mutex_unlock (&bvw->priv->seek_mutex);
-#else
-	g_mutex_unlock (bvw->priv->seek_mutex);
-#endif
 
 	if (_time >= 0) {
 	  GST_DEBUG ("Have an old seek to schedule, doing it now");
@@ -2553,11 +2537,7 @@ bacon_video_widget_finalize (GObject * object)
     bvw->priv->mount_cancellable = NULL;
   }
 
-#if GLIB_CHECK_VERSION (2, 31, 0)
   g_mutex_clear (&bvw->priv->seek_mutex);
-#else
-  g_mutex_free (bvw->priv->seek_mutex);
-#endif
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
@@ -3662,11 +3642,8 @@ bacon_video_widget_seek_time (BaconVideoWidget *bvw, gint64 _time, gboolean accu
   got_time_tick (bvw->priv->play, _time * GST_MSECOND, bvw);
 
   /* Is there a pending seek? */
-#if GLIB_CHECK_VERSION (2, 31, 0)
   g_mutex_lock (&bvw->priv->seek_mutex);
-#else
-  g_mutex_lock (bvw->priv->seek_mutex);
-#endif
+
   /* If there's no pending seek, or
    * it's been too long since the seek,
    * or we don't have an accurate seek requested */
@@ -3676,19 +3653,11 @@ bacon_video_widget_seek_time (BaconVideoWidget *bvw, gint64 _time, gboolean accu
       accurate) {
     bvw->priv->seek_time = -1;
     bvw->priv->seek_req_time = cur_time;
-#if GLIB_CHECK_VERSION (2, 31, 0)
     g_mutex_unlock (&bvw->priv->seek_mutex);
-#else
-    g_mutex_unlock (bvw->priv->seek_mutex);
-#endif
   } else {
     GST_LOG ("Not long enough since last seek, queuing it");
     bvw->priv->seek_time = _time;
-#if GLIB_CHECK_VERSION (2, 31, 0)
     g_mutex_unlock (&bvw->priv->seek_mutex);
-#else
-    g_mutex_unlock (bvw->priv->seek_mutex);
-#endif
     return TRUE;
   }
 
diff --git a/src/backend/bvw-test.c b/src/backend/bvw-test.c
index dc9b2f5..fa7aa72 100644
--- a/src/backend/bvw-test.c
+++ b/src/backend/bvw-test.c
@@ -80,9 +80,6 @@ int main
 #ifdef GDK_WINDOWING_X11
 	XInitThreads ();
 #endif
-#if !GLIB_CHECK_VERSION (2, 31, 0)
-	g_thread_init (NULL);
-#endif
 	gdk_threads_init ();
 
 	context = g_option_context_new ("- Play audio and video inside a web browser");
diff --git a/src/test-properties-page.c b/src/test-properties-page.c
index ccc39e4..bfbb6a8 100644
--- a/src/test-properties-page.c
+++ b/src/test-properties-page.c
@@ -62,9 +62,6 @@ int main (int argc, char **argv)
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
 
-#if !GLIB_CHECK_VERSION (2, 31, 0)
-	g_thread_init (NULL);
-#endif
 	gst_init (&argc, &argv);
 	gtk_init (&argc, &argv);
 
diff --git a/src/totem-audio-preview.c b/src/totem-audio-preview.c
index 6d5e98c..2cf1996 100644
--- a/src/totem-audio-preview.c
+++ b/src/totem-audio-preview.c
@@ -161,10 +161,6 @@ int main (int argc, char **argv)
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
 
-#if !GLIB_CHECK_VERSION (2, 31, 0)
-	g_thread_init (NULL);
-#endif
-
 	g_set_application_name (_("Audio Preview"));
 	g_setenv("PULSE_PROP_application.icon_name", "totem", TRUE);
 	g_setenv("PULSE_PROP_media.role", "music", TRUE);
diff --git a/src/totem-object.c b/src/totem-object.c
index dafb1d7..6598161 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -960,12 +960,7 @@ totem_object_action_exit (TotemObject *totem)
 		totem_object_plugins_shutdown (totem);
 
 	/* Exit forcefully if we can't do the shutdown in 10 seconds */
-#if GLIB_CHECK_VERSION (2, 31, 0)
 	g_thread_new ("force-exit", (GThreadFunc) totem_action_wait_force_exit, NULL);
-#else
-	g_thread_create ((GThreadFunc) totem_action_wait_force_exit,
-			 NULL, FALSE, NULL);
-#endif
 
 	if (gtk_main_level () > 0)
 		gtk_main_quit ();
diff --git a/src/totem-resources.c b/src/totem-resources.c
index 1b0cf2b..ceebdeb 100644
--- a/src/totem-resources.c
+++ b/src/totem-resources.c
@@ -112,11 +112,7 @@ totem_resources_monitor_start (const char *input, gint wall_clock_time)
 		sleep_time = wall_clock_time;
 
 	finished = FALSE;
-#if GLIB_CHECK_VERSION (2, 31, 0)
 	g_thread_new ("time-monitor", time_monitor, (gpointer) input);
-#else
-	g_thread_create (time_monitor, (gpointer) input, FALSE, NULL);
-#endif
 }
 
 void
diff --git a/src/totem-video-thumbnailer.c b/src/totem-video-thumbnailer.c
index 3a4b232..cf33774 100644
--- a/src/totem-video-thumbnailer.c
+++ b/src/totem-video-thumbnailer.c
@@ -978,10 +978,6 @@ int main (int argc, char *argv[])
 	const char *input, *output;
 	ThumbApp app;
 
-#if !GLIB_CHECK_VERSION (2, 31, 0)
-	g_thread_init (NULL);
-#endif
-
 	context = g_option_context_new ("Thumbnail movies");
 	options = gst_init_get_option_group ();
 	g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
diff --git a/src/totem.c b/src/totem.c
index c6eeb90..c553d5a 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -265,9 +265,6 @@ main (int argc, char **argv)
 	}
 #endif
 
-#if !GLIB_CHECK_VERSION (2, 31, 0)
-	g_thread_init (NULL);
-#endif
 	g_type_init ();
 	gtk_init (&argc, &argv);
 



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