[rygel] core: Use fake sinks for playbin to suppress window popup on video
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel] core: Use fake sinks for playbin to suppress window popup on video
- Date: Thu, 25 Jun 2009 15:45:19 +0000 (UTC)
commit fcabf5265ff0acd342c5fd9a3e99ddf4d1862e70
Author: Jens Georg <mail jensge org>
Date: Sun May 24 16:35:12 2009 +0200
core: Use fake sinks for playbin to suppress window popup on video
src/rygel/rygel-metadata-extractor.vala | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/rygel/rygel-metadata-extractor.vala b/src/rygel/rygel-metadata-extractor.vala
index 84f01ea..72e5ba1 100644
--- a/src/rygel/rygel-metadata-extractor.vala
+++ b/src/rygel/rygel-metadata-extractor.vala
@@ -79,6 +79,7 @@ public class Rygel.MetadataExtractor: GLib.Object {
private TagList tag_list;
private Queue<File> file_queue;
+ private Gst.Element[] fakesinks;
private static void register_custom_tag (string tag, Type type) {
Gst.tag_register (tag,
@@ -90,7 +91,6 @@ public class Rygel.MetadataExtractor: GLib.Object {
}
public MetadataExtractor () {
- this.playbin = ElementFactory.make ("playbin", null);
this.register_custom_tag (TAG_RYGEL_SIZE, typeof (int64));
this.register_custom_tag (TAG_RYGEL_DURATION, typeof (int64));
this.register_custom_tag (TAG_RYGEL_MIME, typeof (string));
@@ -100,10 +100,16 @@ public class Rygel.MetadataExtractor: GLib.Object {
this.register_custom_tag (TAG_RYGEL_HEIGHT, typeof (int));
this.register_custom_tag (TAG_RYGEL_DEPTH, typeof (int));
- var bus = this.playbin.get_bus ();
+ // setup fake sinks
+ this.playbin = ElementFactory.make ("playbin", null);
+ this.fakesinks = new Gst.Element[2];
+ this.fakesinks[0] = ElementFactory.make ("fakesink", null);
+ this.fakesinks[1] = ElementFactory.make ("fakesink", null);
+ this.playbin.video_sink = this.fakesinks[0];
+ this.playbin.audio_sink = this.fakesinks[1];
+ var bus = this.playbin.get_bus ();
bus.add_signal_watch ();
-
bus.message["tag"] += this.tag_cb;
bus.message["state-changed"] += this.state_changed_cb;
bus.message["error"] += this.error_cb;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]