query: new _BANDWIDTH_LIMITED flag

Source elements with limited bandwidth capabilities and supporting
buffering for downstream elements should set this flag when answering
a scheduling query. This is useful for the on-disk buffering scenario
of uridecodebin to avoid checking the URI protocol against a list of
hardcoded protocols.

Bug 693484
This commit is contained in:
Philippe Normand 2013-03-29 14:56:57 +01:00 committed by Sebastian Dröge
parent 4997fd9f94
commit 54c678a21e
3 changed files with 19 additions and 4 deletions

View file

@ -68,7 +68,8 @@ this with the SCHEDULING query.
typedef enum {
GST_SCHEDULING_FLAG_SEEKABLE = (1 << 0),
GST_SCHEDULING_FLAG_SEQUENTIAL = (1 << 1)
GST_SCHEDULING_FLAG_SEQUENTIAL = (1 << 1),
GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED = (1 << 2)
} GstSchedulingFlags;
_SEEKABLE:
@ -80,6 +81,15 @@ this with the SCHEDULING query.
seeks are allowed but should be avoided. This is common for network
streams.
_BANDWIDTH_LIMITED:
- suggest the element supports buffering data for downstream to
cope with bandwidth limitations. If this flag is on the
downstream element might ask for more data than necessary for
normal playback. This use-case is interesting for on-disk
buffering scenarios for instance. Seek operations might be
slow as well so downstream elements should take this into
consideration.
(out) "minsize", G_TYPE_INT (default 1)
- the suggested minimum size of pull requests

View file

@ -442,12 +442,14 @@ gboolean gst_query_find_allocation_meta (GstQuery *query, GType api
* GstSchedulingFlags:
* @GST_SCHEDULING_FLAG_SEEKABLE: if seeking is possible
* @GST_SCHEDULING_FLAG_SEQUENTIAL: if sequential access is recommended
* @GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED: if bandwidth is limited and buffering possible
*
* The different scheduling flags.
*/
typedef enum {
GST_SCHEDULING_FLAG_SEEKABLE = (1 << 0),
GST_SCHEDULING_FLAG_SEQUENTIAL = (1 << 1)
GST_SCHEDULING_FLAG_SEQUENTIAL = (1 << 1),
GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED = (1 << 2)
} GstSchedulingFlags;
GstQuery * gst_query_new_scheduling (void) G_GNUC_MALLOC;

View file

@ -1461,6 +1461,9 @@ gst_scheduling_flags_get_type (void)
"seekable"},
{C_FLAGS (GST_SCHEDULING_FLAG_SEQUENTIAL), "GST_SCHEDULING_FLAG_SEQUENTIAL",
"sequential"},
{C_FLAGS (GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED),
"GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED",
"bandwidth-limited"},
{0, NULL, NULL}
};