summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Normand <philn@igalia.com>2013-04-16 20:41:10 +0200
committerTim-Philipp Müller <tim@centricular.net>2013-04-16 19:53:18 +0100
commitd975a70f12d13ea057de1ef760a79108ead43990 (patch)
treecff6a224cfdd8cf7a207a6b71e8848b9fd1b2db8
parentb857cb38ddb63af8ba745c10bece8f1b528af4fe (diff)
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
-rw-r--r--ext/soup/gstsouphttpsrc.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c
index a7bac17ec..543bbeb1f 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;
}