[rhythmbox] xfade: fix playback over sftp with gstreamer 1.2
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] xfade: fix playback over sftp with gstreamer 1.2
- Date: Fri, 8 Nov 2013 13:37:01 +0000 (UTC)
commit f326f8e7055ee8b681a72f000203d071ccc72646
Author: Jonathan Matthew <jonathan d14n org>
Date: Fri Nov 8 23:28:47 2013 +1000
xfade: fix playback over sftp with gstreamer 1.2
uridecodebin now does a scheduling query to figure out whether the
source requires buffering. We need to do the same so our expectation
matches what uridecodebin does. If we expect buffering messages
but don't get any, we never start normal playback.
https://bugzilla.gnome.org/show_bug.cgi?id=711285
backends/gstreamer/rb-player-gst-xfade.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/backends/gstreamer/rb-player-gst-xfade.c b/backends/gstreamer/rb-player-gst-xfade.c
index cc8c4e5..92c45da 100644
--- a/backends/gstreamer/rb-player-gst-xfade.c
+++ b/backends/gstreamer/rb-player-gst-xfade.c
@@ -2498,6 +2498,24 @@ stream_src_blocked_cb (GstPad *pad, GstPadProbeInfo *info, RBXFadeStream *stream
"max-size-buffers", 200, /* back to normal value */
NULL);
+#if GST_CHECK_VERSION(1,2,0)
+ {
+ GstElement *src;
+ GstQuery *query;
+ g_object_get (stream->decoder, "source", &src, NULL);
+ query = gst_query_new_scheduling ();
+ if (gst_element_query (src, query)) {
+ GstSchedulingFlags flags;
+ gst_query_parse_scheduling (query, &flags, NULL, NULL, NULL);
+
+ /* this matches how uridecodebin decides whether to do buffering */
+ stream->use_buffering = (flags & GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED);
+ }
+ gst_query_unref (query);
+ g_object_unref (src);
+ }
+#endif
+
if (stream->use_buffering) {
rb_debug ("stream %s requires buffering", stream->uri);
switch (stream->state) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]