[rygel] librenderer: Use signal bus watch
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] librenderer: Use signal bus watch
- Date: Tue, 3 Jul 2012 07:58:31 +0000 (UTC)
commit 4b90432c03956626b7756581bd24273cebee60d8
Author: Jens Georg <mail jensge org>
Date: Mon Jul 2 12:05:04 2012 +0200
librenderer: Use signal bus watch
Reason is that you can only have one active bus watch. But signal bus
watch allows multiple listeners to connect to the "message" signal.
src/librygel-renderer/rygel-playbin-player.vala | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/librygel-renderer/rygel-playbin-player.vala b/src/librygel-renderer/rygel-playbin-player.vala
index c6efbf7..1a75056 100644
--- a/src/librygel-renderer/rygel-playbin-player.vala
+++ b/src/librygel-renderer/rygel-playbin-player.vala
@@ -259,7 +259,8 @@ public class Rygel.Playbin.Player : GLib.Object, Rygel.MediaPlayer {
// Bus handler
var bus = this.playbin.get_bus ();
- bus.add_watch (this.bus_handler);
+ bus.add_signal_watch ();
+ bus.message.connect (this.bus_handler);
}
public static Player get_default () {
@@ -299,7 +300,7 @@ public class Rygel.Playbin.Player : GLib.Object, Rygel.MediaPlayer {
structure.get_name () == "image/png";
}
- private bool bus_handler (Gst.Bus bus,
+ private void bus_handler (Gst.Bus bus,
Message message) {
switch (message.type) {
case MessageType.STATE_CHANGED:
@@ -366,8 +367,6 @@ public class Rygel.Playbin.Player : GLib.Object, Rygel.MediaPlayer {
break;
}
-
- return true;
}
private void on_source_setup (Element pipeline, dynamic Element source) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]