rygel r400 - trunk/src/rygel



Author: zeeshanak
Date: Sun Dec 28 16:48:03 2008
New Revision: 400
URL: http://svn.gnome.org/viewvc/rygel?rev=400&view=rev

Log:
throw an error if elements fail to link.

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

Modified: trunk/src/rygel/rygel-gst-stream.vala
==============================================================================
--- trunk/src/rygel/rygel-gst-stream.vala	(original)
+++ trunk/src/rygel/rygel-gst-stream.vala	Sun Dec 28 16:48:03 2008
@@ -30,7 +30,8 @@
 using Gst;
 
 public errordomain Rygel.GstStreamError {
-    MISSING_PLUGIN
+    MISSING_PLUGIN,
+    LINK
 }
 
 public class Rygel.GstStream : Pipeline {
@@ -61,7 +62,11 @@
         sink.handoff += this.on_new_buffer;
 
         this.add_many (src, sink);
-        src.link (sink);
+        if (!src.link (sink)) {
+            throw new GstStreamError.LINK ("Failed to link %s to %s",
+                                           src.name,
+                                           sink.name);
+        }
 
         // Bus handler
         var bus = this.get_bus ();



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