rygel r427 - trunk/src/rygel



Author: zeeshanak
Date: Tue Jan 13 14:32:48 2009
New Revision: 427
URL: http://svn.gnome.org/viewvc/rygel?rev=427&view=rev

Log:
GstStream overrides end() rather than providing stop().

Modified:
   trunk/src/rygel/rygel-gst-stream.vala
   trunk/src/rygel/rygel-stream.vala
   trunk/src/rygel/rygel-streamer.vala

Modified: trunk/src/rygel/rygel-gst-stream.vala
==============================================================================
--- trunk/src/rygel/rygel-gst-stream.vala	(original)
+++ trunk/src/rygel/rygel-gst-stream.vala	Tue Jan 13 14:32:48 2009
@@ -61,8 +61,10 @@
         this.pipeline.set_state (State.PAUSED);
     }
 
-    public void stop () {
+    public override void end (bool aborted) {
         this.pipeline.set_state (State.NULL);
+
+        base.end (aborted);
     }
 
     private void prepare_pipeline (string name,
@@ -113,7 +115,7 @@
                 critical ("Failed to link %s to %s",
                           depay.name,
                           sink.name);
-                this.end ();
+                this.end (false);
                 return;
             }
 
@@ -126,7 +128,7 @@
             critical ("Failed to link pad %s to %s",
                       src_pad.name,
                       sink_pad.name);
-            this.end ();
+            this.end (false);
             return;
         }
 
@@ -251,7 +253,7 @@
         }
 
         if (!ret) {
-            this.end ();
+            this.end (false);
         }
 
         return ret;

Modified: trunk/src/rygel/rygel-stream.vala
==============================================================================
--- trunk/src/rygel/rygel-stream.vala	(original)
+++ trunk/src/rygel/rygel-stream.vala	Tue Jan 13 14:32:48 2009
@@ -51,7 +51,7 @@
                                      Soup.ClientContext client) {
         // Ignore if message isn't ours
         if (msg == this.msg)
-            this.eos ();
+            this.end (true);
     }
 
     public void set_mime_type (string mime_type) {
@@ -66,8 +66,10 @@
         this.server.unpause_message (this.msg);
     }
 
-    public void end () {
-        this.msg.response_body.complete ();
+    public virtual void end (bool aborted) {
+        if (!aborted) {
+            this.msg.response_body.complete ();
+        }
 
         this.eos ();
     }

Modified: trunk/src/rygel/rygel-streamer.vala
==============================================================================
--- trunk/src/rygel/rygel-streamer.vala	(original)
+++ trunk/src/rygel/rygel-streamer.vala	Tue Jan 13 14:32:48 2009
@@ -84,8 +84,6 @@
     }
 
     private void on_eos (GstStream stream) {
-        stream.stop ();
-
         /* Remove the stream from our list. */
         this.streams.remove (stream);
     }



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