rhythmbox r5972 - in trunk: . backends/gstreamer
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r5972 - in trunk: . backends/gstreamer
- Date: Mon, 6 Oct 2008 10:45:48 +0000 (UTC)
Author: jmatthew
Date: Mon Oct 6 10:45:48 2008
New Revision: 5972
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5972&view=rev
Log:
2008-10-06 Jonathan Matthew <jonathan d14n org>
* backends/gstreamer/rb-player-gst-xfade.c:
(stream_new_decoded_pad_cb), (stream_pad_removed_cb),
(create_stream):
When the decoder src pad is removed, allow the next one to be linked
in its place. Makes chained ogg playback work when using decodebin2.
Modified:
trunk/ChangeLog
trunk/backends/gstreamer/rb-player-gst-xfade.c
Modified: trunk/backends/gstreamer/rb-player-gst-xfade.c
==============================================================================
--- trunk/backends/gstreamer/rb-player-gst-xfade.c (original)
+++ trunk/backends/gstreamer/rb-player-gst-xfade.c Mon Oct 6 10:45:48 2008
@@ -299,6 +299,7 @@
gboolean emitted_playing;
gboolean emitted_fake_playing;
+ GstPad *decoder_pad;
GstPad *src_pad;
GstPad *ghost_pad;
GstPad *adder_pad;
@@ -1869,11 +1870,27 @@
gst_pad_link (pad, vpad);
gst_object_unref (vpad);
stream->decoder_linked = TRUE;
+
+ stream->decoder_pad = gst_object_ref (pad);
}
gst_caps_unref (caps);
}
+static void
+stream_pad_removed_cb (GstElement *decoder, GstPad *pad, RBXFadeStream *stream)
+{
+ if (pad == stream->decoder_pad) {
+ rb_debug ("active output pad for stream %s removed", stream->uri);
+ stream->decoder_linked = FALSE;
+
+ gst_object_unref (stream->decoder_pad);
+ stream->decoder_pad = NULL;
+ } else {
+ rb_debug ("non-active output pad for stream %s removed .. what?", stream->uri);
+ }
+}
+
/* handles EOS events on stream bins. since the pipeline as a whole
* never goes EOS, we don't get an EOS bus message, so we have to handle
* it here.
@@ -2022,6 +2039,11 @@
G_CALLBACK (stream_new_decoded_pad_cb),
stream,
0);
+ g_signal_connect_object (stream->decoder,
+ "pad-removed",
+ G_CALLBACK (stream_pad_removed_cb),
+ stream,
+ 0);
stream->audioconvert = gst_element_factory_make ("audioconvert", NULL);
if (stream->audioconvert == NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]