From d975a70f12d13ea057de1ef760a79108ead43990 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Tue, 16 Apr 2013 20:41:10 +0200 Subject: [PATCH] souphttpsrc: fix SCHEDULING query support Chain the query up to parent before adding _BANDWIDTH_LIMITED flag, so that all the other flags get set, and push mode gets added as supported activation mode. https://bugzilla.gnome.org/show_bug.cgi?id=693484 https://bugzilla.gnome.org/show_bug.cgi?id=698156 --- ext/soup/gstsouphttpsrc.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c index a7bac17ece..543bbeb1fb 100644 --- a/ext/soup/gstsouphttpsrc.c +++ b/ext/soup/gstsouphttpsrc.c @@ -1360,17 +1360,14 @@ gst_soup_http_src_query (GstBaseSrc * bsrc, GstQuery * query) { GstSoupHTTPSrc *src = GST_SOUP_HTTP_SRC (bsrc); gboolean ret; + GstSchedulingFlags flags; + gint minsize, maxsize, align; switch (GST_QUERY_TYPE (query)) { case GST_QUERY_URI: gst_query_set_uri (query, src->location); ret = TRUE; break; - case GST_QUERY_SCHEDULING: - gst_query_set_scheduling (query, GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED, 1, - -1, 0); - ret = TRUE; - break; default: ret = FALSE; break; @@ -1379,6 +1376,16 @@ gst_soup_http_src_query (GstBaseSrc * bsrc, GstQuery * query) if (!ret) ret = GST_BASE_SRC_CLASS (parent_class)->query (bsrc, query); + switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_SCHEDULING: + gst_query_parse_scheduling (query, &flags, &minsize, &maxsize, &align); + flags |= GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED; + gst_query_set_scheduling (query, flags, minsize, maxsize, align); + break; + default: + break; + } + return ret; }