[rygel] core: Use Signal.connect* for connecting dynamic signals



commit 565c72bba0bb5f6ff60fa587a78a02cfed4e5ca9
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Sat Jun 19 04:59:54 2010 +0300

    core: Use Signal.connect* for connecting dynamic signals
    
    For connecting signals that are unknown to compiler, use Signal.connect*
    functions rather than deprecated '+=' syntax.

 src/rygel/rygel-live-response.vala        |    7 ++++++-
 src/rygel/rygel-mp2ts-transcoder-bin.vala |    7 ++++++-
 src/rygel/rygel-wmv-transcoder-bin.vala   |    7 ++++++-
 3 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/src/rygel/rygel-live-response.vala b/src/rygel/rygel-live-response.vala
index 377b05a..316feb0 100644
--- a/src/rygel/rygel-live-response.vala
+++ b/src/rygel/rygel-live-response.vala
@@ -93,7 +93,11 @@ internal class Rygel.LiveResponse : Rygel.HTTPResponse {
         }
 
         sink.signal_handoffs = true;
-        sink.handoff += this.on_new_buffer;
+        Signal.connect_object (sink,
+                               "handoff",
+                               (Callback) this.on_new_buffer,
+                               this,
+                               ConnectFlags.AFTER);
 
         this.pipeline = new Pipeline (name);
         assert (this.pipeline != null);
@@ -153,6 +157,7 @@ internal class Rygel.LiveResponse : Rygel.HTTPResponse {
         }
     }
 
+    [CCode (instance_pos = -1)]
     private void on_new_buffer (Element sink,
                                 Buffer  buffer,
                                 Pad     pad) {
diff --git a/src/rygel/rygel-mp2ts-transcoder-bin.vala b/src/rygel/rygel-mp2ts-transcoder-bin.vala
index e4e4706..963e8a5 100644
--- a/src/rygel/rygel-mp2ts-transcoder-bin.vala
+++ b/src/rygel/rygel-mp2ts-transcoder-bin.vala
@@ -63,9 +63,14 @@ internal class Rygel.MP2TSTranscoderBin : Gst.Bin {
         this.add_pad (ghost);
 
         decodebin.pad_added += this.decodebin_pad_added;
-        decodebin.autoplug_continue += this.autoplug_continue;
+        Signal.connect_object (decodebin,
+                               "autoplug-continue",
+                               (Callback) this.autoplug_continue,
+                               this,
+                               ConnectFlags.AFTER);
     }
 
+    [CCode (instance_pos = -1)]
     private bool autoplug_continue (Element decodebin,
                                     Pad     new_pad,
                                     Caps    caps) {
diff --git a/src/rygel/rygel-wmv-transcoder-bin.vala b/src/rygel/rygel-wmv-transcoder-bin.vala
index 1ee5efe..5ea083f 100644
--- a/src/rygel/rygel-wmv-transcoder-bin.vala
+++ b/src/rygel/rygel-wmv-transcoder-bin.vala
@@ -61,9 +61,14 @@ internal class Rygel.WMVTranscoderBin : Gst.Bin {
         this.add_pad (ghost);
 
         decodebin.pad_added += this.decodebin_pad_added;
-        decodebin.autoplug_continue += this.autoplug_continue;
+        Signal.connect_object (decodebin,
+                               "autoplug-continue",
+                               (Callback) this.autoplug_continue,
+                               this,
+                               ConnectFlags.AFTER);
     }
 
+    [CCode (instance_pos = -1)]
     private bool autoplug_continue (Element decodebin,
                                     Pad     new_pad,
                                     Caps    caps) {



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