flt.utils.muxer: do not release upstream iterators when they're ended
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 1 Mar 2019 21:29:35 +0000 (16:29 -0500)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 2 May 2019 20:50:15 +0000 (20:50 +0000)
commit54bdc1f700f9e771d6307c60852a7fd4f5051c48
tree7b8718c522ea821e12dfc7335ba177faad964270
parente0dade9253bb54762fb6c25e1eed8c4294691ab8
flt.utils.muxer: do not release upstream iterators when they're ended

This patch makes an `flt.utils.muxer` message iterator NOT release (put
the reference of) one of its upstream message iterator when it's ended
(when bt_self_component_port_input_message_iterator_next() returns
`BT_MESSAGE_ITERATOR_STATUS_END`). This is needed to make it possible
for an `flt.utils.muxer` message iterator to seek its beginning without
creating new upstream message iterators.

Instead, when an upstream message iterator ends, its internal wrapper is
moved to an "ended" array of upstream message iterators. Only "active"
upstream message iterators are considered when actually muxing. When
seeking the beginning, we make all upstream iterators seek (active and
ended), and then put back the ended upstream message iterators into the
active upstream message iterator array.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
plugins/utils/muxer/muxer.c
This page took 0.026754 seconds and 4 git commands to generate.