diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-04-07 08:47:10 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-04-07 08:50:22 +0200 |
commit | fe93936f62e64a43a29337fed713de36f04343a0 (patch) | |
tree | c31f7a9a8a801a8d5c5f534e6d8dbef006f87645 | |
parent | 69dfb1d25ee142998309b5c8b409b4cd69c3253e (diff) |
WIP queue2request-configuration
-rw-r--r-- | plugins/elements/gstqueue2.c | 19 | ||||
-rw-r--r-- | plugins/elements/gstqueue2.h | 2 |
2 files changed, 21 insertions, 0 deletions
diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c index 53896818c..aa07868cc 100644 --- a/plugins/elements/gstqueue2.c +++ b/plugins/elements/gstqueue2.c @@ -2280,6 +2280,25 @@ gst_queue2_handle_sink_event (GstPad * pad, GstObject * parent, } break; } + case GST_EVENT_REQUEST_CONFIGURATION:{ + const GstStructure *s = gst_event_get_structure (event); + + if (gst_structure_has_name (s, "GstEventRequestConfiguration-buffering")) { + GST_QUEUE2_MUTEX_LOCK (queue); + if (queue->use_buffering) { + GstFormat format; + gint64 value; + + if (gst_structure_get_enum (s, "format", GST_TYPE_FORMAT, &format) && + gst_structure_get_int64 (s, "value", G_TYPE_INT64, &value)) { + + } + } + GST_QUEUE2_MUTEX_UNLOCK (queue); + break; + } + /* fall through */ + } default: if (GST_EVENT_IS_SERIALIZED (event)) { /* serialized events go in the queue */ diff --git a/plugins/elements/gstqueue2.h b/plugins/elements/gstqueue2.h index 3fe5fc45d..45f53177c 100644 --- a/plugins/elements/gstqueue2.h +++ b/plugins/elements/gstqueue2.h @@ -108,6 +108,8 @@ struct _GstQueue2 gint low_percent; /* low/high watermarks for buffering */ gint high_percent; + GstQueue2Size buffering_level; /* amount of buffering as requested by upstream */ + /* current buffering state */ gboolean is_buffering; gint buffering_percent; |