6by9 wrote: ↑
Tue Sep 03, 2019 9:29 am
If you have a tunnel into video_render, then I would have expected flushing the tunnel to have worked.
Have you got a simple test app that I can try (much as I hate trying to find my way through the IL framework)?
I have now investigated the issue and created a simple demo program.
It seems like calling flush (after all data was sent into the pipeline) doesn't really clear frames that have been sent into the pipeline but were not yet displayed (eg due to scheduling). This might be intended behavior (since we're just flushing the tunnels, not the components linked by the tunnels), but it seems like it's not documented. And also, I don't think there's any way to also flush the components, is there?
For demonstrating the issue, I've modified the adafruit hello_video loop sample. My modifications are available here: https://github.com/FD-/pi_hello_video
Compiling the code as-is demonstrates that despite flushing the pipeline after all data is fed into it, the last frame is still stuck at the end. The only effect of the flush is a short flicker when all data has been sent into the pipeline (but a few seconds are yet to be displayed).
Adding another getchar() above the flush, you can see that suddenly, the flush seems to clear the last frame. This indicates the problem is linked to timing.
When uncommenting the workaround, you can see that sending an empty buffer (with EOS flag) through the pipeline and waiting until it exits the pipeline seems to also 'fix' the issue.