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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 2 May 2019 04:09:19 +0000 (00:09 -0400)
commit23cecd8bea1ba7af784ba787f245fa456e69e36b
tree7b8718c522ea821e12dfc7335ba177faad964270
parenta218c70d4f5aedeb96f28b92ac03d2d7275f836d
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.027391 seconds and 5 git commands to generate.