[rygel] core: Push data directly from gst thread



commit e5cfcf87fc4bf3f2e82b860ec95388e84f8410f7
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Jan 12 17:57:19 2010 +0200

    core: Push data directly from gst thread
    
    Instead of registering an idle func to push data, simply push it directly
    from the gst thread. We only need to be sure that nobody else accesses
    the message from the main thread while we do this.

 src/rygel/rygel-live-response.vala |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)
---
diff --git a/src/rygel/rygel-live-response.vala b/src/rygel/rygel-live-response.vala
index 8c57af8..bd447ee 100644
--- a/src/rygel/rygel-live-response.vala
+++ b/src/rygel/rygel-live-response.vala
@@ -38,7 +38,6 @@ internal class Rygel.LiveResponse : Rygel.HTTPResponse {
 
     private HTTPSeek time_range;
 
-    private uint idle_id;
     private SourceFunc continuation;
 
     public LiveResponse (Soup.Server  server,
@@ -71,11 +70,6 @@ internal class Rygel.LiveResponse : Rygel.HTTPResponse {
     public override void end (bool aborted, uint status) {
         this.pipeline.set_state (State.NULL);
 
-        if (this.idle_id != 0) {
-           Source.remove (this.idle_id);
-           this.idle_id = 0;
-        }
-
         if (!aborted) {
             this.msg.response_body.complete ();
         }
@@ -217,14 +211,7 @@ internal class Rygel.LiveResponse : Rygel.HTTPResponse {
     private void on_new_buffer (Element sink,
                                 Buffer  buffer,
                                 Pad     pad) {
-        this.idle_id = Idle.add_full (Priority.HIGH_IDLE,
-                                      () => {
-            this.push_data (buffer.data, buffer.size);
-
-            this.idle_id = 0;
-
-            return false;
-        });
+        this.push_data (buffer.data, buffer.size);
     }
 
     private bool bus_handler (Gst.Bus     bus,



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