gstreamer/plugins/elements
Edward Hervey 72c31876aa multiqueue: Optimize multiqueue sizes based on interleave
Multiqueue should only be used to cope with:
* decoupling upstream and dowstream threading (i.e. having separate threads
  for elementary streams).
* Ensuring individual queues have enough space to cope with upstream interleave
  (distance in stream time between co-located samples). This is to guarantee
  that we have enough room in each individual queues to provide new data in
  each, without being blocked.
* Limit the queue sizes to that interleave distance (and an extra minimal
  buffering size). This is to ensure we don't consume too much memory.

Based on that, multiqueue now continuously calculates the input interleave
(per incoming streaming thread). Based on that, it calculates a target
interleave (currently 1.5 x real_interleave + 250ms padding).

If the target interleave is greater than the current max_size.time, it will
update it accordingly (to allow enough margin to not block).
If the target interleave goes down by more than 50%, we re-adjust it once
we know we have gone past a safe distance (2 x current max_size.time).

This mode can only be used for incoming streams that are guaranteed to be
properly timestamped.

Furthermore, we ignore sparse streams when calculating interleave and maximum
size of queues.

For the simplest of use-cases (single stream), multiqueue acts as a single
queue with a time limit of 250ms.
If there are multiple inputs, but each come from a different streaming thread,
the maximum time limit will also end up being 250ms.

On regular files (more than one input stream from the same upstream streaming
thread), it can reduce the total memory used as much as 10x, ending up with
max_size.time around 500ms.

Due to the adaptive nature, it can also cope with changing interleave (which
can happen commonly on some files at startup/pre-roll time)
2015-12-02 16:03:20 +01:00
..
.gitignore ignore more 2005-06-17 09:12:33 +00:00
gstcapsfilter.c capsfilter: remove proxying of accept-caps downstream 2015-09-26 07:13:45 -03:00
gstcapsfilter.h doc/capsfilter: Document filtering modes 2015-07-28 16:57:43 -04:00
gstconcat.c concat: dot not reset pad states too early 2015-07-21 00:22:25 -03:00
gstconcat.h concat: Add adjust-base property 2015-06-22 14:11:30 +02:00
gstdownloadbuffer.c downloadbuffer, benchmarks: fix error leaks in failure code paths 2015-09-15 18:21:58 +01:00
gstdownloadbuffer.h sparsefile: keep it private as helper API for downloadbuffer 2014-05-13 20:05:55 +01:00
gstelements.c streamiddemux: Add streamiddemux element 2015-03-12 14:42:18 +00:00
gstelements_private.c gst_writev: define UIO_MAXIOV on iOS/OSX 2015-06-11 23:06:26 +01:00
gstelements_private.h plugins: add helper function for writing buffers out with writev() 2014-11-30 14:40:46 +00:00
gstfakesink.c docs: gst-launch -> gst-launch-1.0 in example pipelines 2015-05-10 11:35:50 +01:00
gstfakesink.h Revert "Potential GstContext regression" 2013-09-24 12:47:52 +02:00
gstfakesrc.c docs: another sweep canonicalizing the plugin docs sections file 2015-07-03 12:39:57 +02:00
gstfakesrc.h fakesrc: removing unused pattern option 2014-10-02 13:45:34 +01:00
gstfdsink.c fdsink: use writev() in ::render() to write out memories without merging them 2014-11-30 14:40:46 +00:00
gstfdsink.h fdsink: implement ::render_list() using writev() 2014-11-30 14:40:46 +00:00
gstfdsrc.c Revert "doc: Workaround gtkdoc issue" 2015-05-18 13:13:55 +01:00
gstfdsrc.h Fix FSF address 2012-11-03 20:44:48 +00:00
gstfilesink.c filesink: continue element cleanup even if fclose fails 2015-11-05 10:17:41 +01:00
gstfilesink.h doc/filesink: Add BufferMode enumeration 2015-07-28 16:57:36 -04:00
gstfilesrc.c docs: gst-launch -> gst-launch-1.0 in example pipelines 2015-05-10 11:35:50 +01:00
gstfilesrc.h Fix FSF address 2012-11-03 20:44:48 +00:00
gstfunnel.c funnel: Fix racy state change 2015-09-24 12:14:57 +02:00
gstfunnel.h funnel: add "forward-sticky-events" property 2015-06-25 10:53:55 +02:00
gstidentity.c identity: add drop-buffer-flags property 2015-11-13 07:37:12 -08:00
gstidentity.h identity: add drop-buffer-flags property 2015-11-13 07:37:12 -08:00
gstinputselector.c inputselector: Fix buffer leak in sync_streams & cache_buffers mode 2015-09-21 10:33:55 +02:00
gstinputselector.h inputselector: Only try to push the first EOS received 2015-04-24 17:19:49 -03:00
gstmultiqueue.c multiqueue: Optimize multiqueue sizes based on interleave 2015-12-02 16:03:20 +01:00
gstmultiqueue.h multiqueue: Optimize multiqueue sizes based on interleave 2015-12-02 16:03:20 +01:00
gstoutputselector.c output-selector: add drain handling 2015-03-24 16:21:23 -03:00
gstoutputselector.h docs: add missing docs, fixing doc errors 2013-12-03 00:11:59 +00:00
gstqueue.c queue/queue2: Use GST_BUFFER_DTS_OR_PTS 2015-10-27 08:49:02 +01:00
gstqueue.h queue: Fix handling of serialized queries 2013-05-27 15:59:07 +02:00
gstqueue2.c queue2: Don't report 0% unless empty 2015-12-02 19:32:12 +11:00
gstqueue2.h queue2: Add the avg-in-rate property. 2015-11-06 12:32:16 -03:00
gstsparsefile.c sparsefile: small cleanup 2015-05-18 11:26:07 +02:00
gstsparsefile.h elements: don't depend on libgio just for g_io_error_from_errno() 2014-05-13 20:06:48 +01:00
gststreamiddemux.c docs: add StreamidDemux to documentation 2015-07-08 17:07:49 +01:00
gststreamiddemux.h docs: add StreamidDemux to documentation 2015-07-08 17:07:49 +01:00
gsttee.c tee: fix typo in allow-not-linked property description 2015-07-14 12:44:31 +01:00
gsttee.h tee: Add allow-not-linked property 2015-03-26 10:46:26 +01:00
gsttypefindelement.c typefindelement: reset segment only once streaming has stopped 2015-06-14 21:25:29 +01:00
gsttypefindelement.h docs: order and canonicalize the -sections.txt file 2015-07-03 11:52:22 +02:00
gstvalve.c valve: Don't drop non-serialized queries when the valve is dropping 2015-03-20 09:32:34 +01:00
gstvalve.h Fix FSF address 2012-11-03 20:44:48 +00:00
Makefile.am Remove obsolete Android build cruft 2015-04-26 17:49:44 +01:00