mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
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:
parent
4997fd9f94
commit
54c678a21e
3 changed files with 19 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue