basesrc: add buffer list support
authorTim-Philipp Müller <tim@centricular.com>
Wed, 30 Aug 2017 12:03:28 +0000 (13:03 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 7 Dec 2017 12:17:09 +0000 (12:17 +0000)
commit18fe36a286d3dd806cfe645d643d9cdd8ea19237
tree4ece26df7086661400d6d5b4f33e41643c418837
parent880c573e8df17185f0773a2bbe412242e870907b
basesrc: add buffer list support

Add a gst_base_src_submit_buffer_list() function that allows subclasses
to produce a bufferlist containing multiple buffers in the ::create()
function. The buffers in the buffer list will then also be pushed out
in one go as a GstBufferList. This can reduce push overhead
significantly for sources with packetised inputs (such as udpsrc)
in high-throughput scenarios.

The _submit_buffer_list() approach was chosen because it is fairly
straight-forward, backwards-compatible, bindings-friendly (as opposed
to e.g. making the create function return a mini object instead),
and it allows the subclass maximum control: the subclass can decide
dynamically at runtime whether to return a list or a single buffer
(which would be messier if we added a create_list virtual method).

https://bugzilla.gnome.org/show_bug.cgi?id=750241
docs/libs/gstreamer-libs-sections.txt
libs/gst/base/gstbasesrc.c
libs/gst/base/gstbasesrc.h
tests/check/libs/basesrc.c
win32/common/libgstbase.def