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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:38 +0000 (18:19 -0400)
commita71ed05c1813d1e4ba43b3fa4316c33d9004304e
tree9fe086723f119f14ed9f3e2c31f3f0165e664199
parentc980433a6f50cb9c0c69117e9b2ec3fa345a6a37
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.024827 seconds and 4 git commands to generate.