[rhythmbox] use gst_bus_timed_pop instead of gst_bus_poll in metadata code



commit 9334497b4a118c0327f5af2e30f83b837ef7c76c
Author: Jonathan Matthew <jonathan d14n org>
Date:   Fri May 8 15:45:14 2009 +1000

    use gst_bus_timed_pop instead of gst_bus_poll in metadata code
    
    Described as 'pure evil' in the GStreamer API doc, gst_bus_poll runs the
    mainloop to process messages, which allows the metadata helper's
    inactivity timeout to be called during metadata save operations, killing
    metadata save operations that took longer than the timeout.
---
 metadata/rb-metadata-gst.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/metadata/rb-metadata-gst.c b/metadata/rb-metadata-gst.c
index c11b45f..8dd03b6 100644
--- a/metadata/rb-metadata-gst.c
+++ b/metadata/rb-metadata-gst.c
@@ -962,7 +962,7 @@ rb_metadata_event_loop (RBMetaData *md, GstElement *element, gboolean block)
 		GstMessage *message;
 
 		if (block)
-			message = gst_bus_poll (bus, GST_MESSAGE_ANY, -1);
+			message = gst_bus_timed_pop (bus, GST_CLOCK_TIME_NONE);
 		else
 			message = gst_bus_pop (bus);
 
@@ -1093,7 +1093,7 @@ rb_metadata_load (RBMetaData *md,
 	       change_timeout < 5) {
 		GstMessage *msg;
 
-		msg = gst_bus_poll (bus, GST_MESSAGE_ANY, 1 * GST_SECOND);
+		msg = gst_bus_timed_pop (bus, 1 * GST_SECOND);
 		if (msg) {
 			rb_metadata_bus_handler (bus, msg, md);
 			gst_message_unref (msg);



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