[banshee] Reorder audiotee pad allocation (fixes BGO #583384)
- From: Aaron Bockover <abock src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee] Reorder audiotee pad allocation (fixes BGO #583384)
- Date: Wed, 27 May 2009 14:02:19 -0400 (EDT)
commit 4ef2c2f6563a17649fc28358e390d3ac7333cf5f
Author: Chris Howie <cdhowie gmail com>
Date: Wed May 27 11:56:55 2009 -0400
Reorder audiotee pad allocation (fixes BGO #583384)
In GStreamer 0.10.21-0.10.22, the last source pad allocated on a tee is used
for buffer allocations. When the vis pipeline is disabled, this caused a
freeze since it was attached to the last-allocated pad.
This fix simply ensures that the pad linked to the hardware sink is the last
one allocated.
Signed-off-by: Aaron Bockover <abockover novell com>
---
libbanshee/banshee-player-pipeline.c | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/libbanshee/banshee-player-pipeline.c b/libbanshee/banshee-player-pipeline.c
index 99f2b08..349e2ec 100644
--- a/libbanshee/banshee-player-pipeline.c
+++ b/libbanshee/banshee-player-pipeline.c
@@ -249,10 +249,6 @@ _bp_pipeline_construct (BansheePlayer *player)
gst_element_add_pad (player->audiobin, gst_ghost_pad_new ("sink", teepad));
gst_object_unref (teepad);
- // Link the first tee pad to the primary audio sink queue
- gst_pad_link (gst_element_get_request_pad (player->audiotee, "src0"),
- gst_element_get_pad (audiosinkqueue, "sink"));
-
// Link the queue and the actual audio sink
if (player->equalizer != NULL) {
// link in equalizer, preamp and audioconvert.
@@ -276,6 +272,22 @@ _bp_pipeline_construct (BansheePlayer *player)
_bp_cdda_pipeline_setup (player);
_bp_video_pipeline_setup (player, bus);
+ // This call must be the last one in the pipeline setup to work around a
+ // GStreamer 0.10.21-0.10.22 algorithm that causes the last-allocated pad
+ // to be the one used for buffer allocations. If the visualization one
+ // winds up being used for that then the pipeline will freeze when
+ // visualizations are disabled.
+ //
+ // When 0.10.23 is more mainstream we can use the new alloc-pad property to
+ // force selection of this pad for allocation. Until then we just have to
+ // make sure it's the last one allocated.
+ //
+ // -- Chris Howie <cdhowie gmail com>
+
+ // Link the first tee pad to the primary audio sink queue
+ gst_pad_link (gst_element_get_request_pad (player->audiotee, "src0"),
+ gst_element_get_pad (audiosinkqueue, "sink"));
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]