This commit fixes several issues with the
The pause functions used
cancel_task which breaks the Task loop at
points. For some elements, this implies making sure no item is being lost.
Moreover, cancelling the Task also cancels downstream processing, which
makes it difficult to ensure elements can handle all cases.
This commit reimplements
Task::pause which allows completing the running
loop iteration before pausing the loop.
In the Paused state, incoming items were rejected by TsAppSrc and DataQueue.
flush_start / flush_stop
- FlushStart must engage items rejection and cancel the Task.
- FlushStop must purge the internal stream & accept items again.
Segmentevent must be sent before pushing a new
Bufferafter a flush is complete.
If the task was cancelled,
push_prelude could set
true when the events weren't actually pushed yet.
Potential Buffer loss in TsAppSrc
TsAppSrc used to renew its internal channel which could cause Buffer loss when transitionning Playing -> Paused -> Playing.
See #98 (closed)
Fixes #98 (closed)