rygel r422 - trunk/src/rygel



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

Log:
GstStream provides means to start and stop the stream.

Modified:
   trunk/src/rygel/rygel-gst-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:29 2009
@@ -56,6 +56,14 @@
         this.prepare_pipeline (src);
     }
 
+    public void start () {
+        this.set_state (State.PLAYING);
+    }
+
+    public void stop () {
+        this.set_state (State.NULL);
+    }
+
     private void prepare_pipeline (Element src) throws Error {
         dynamic Element sink = ElementFactory.make ("fakesink", SINK_NAME);
 

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:29 2009
@@ -77,7 +77,7 @@
                                               src,
                                               seek_event);
 
-        gst_stream.set_state (State.PLAYING);
+        gst_stream.start ();
         stream.eos += on_eos;
 
         this.streams.set (stream, gst_stream);
@@ -88,10 +88,7 @@
         if (gst_stream == null)
             return;
 
-        /* We don't need to wait for state change since downstream state changes
-         * are guaranteed to be synchronous.
-         */
-        gst_stream.set_state (State.NULL);
+        gst_stream.stop ();
 
         /* Remove the associated Gst stream. */
         this.streams.remove (stream);



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