mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 15:56:42 +00:00
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
This commit is contained in:
parent
b857cb38dd
commit
d975a70f12
1 changed files with 12 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue