SDL_kitchensink icon indicating copy to clipboard operation
SDL_kitchensink copied to clipboard

Add support for stream switching

Open katajakasa opened this issue 7 years ago • 2 comments

This is a WIP branch.

Works, but needs some cleanups and API considerations... and documentation. Also, need to decide on how to switch stream immediately instead of waiting for old data to end. Maintain an old packet buffer ? Or switch, clear buffers and seek ?

katajakasa avatar Aug 27 '18 21:08 katajakasa

is there any reason why this has not been merged yet? I see there is now a conflict in src/kitsource.c, is this all that is holding it back?

paulwratt avatar Apr 14 '19 00:04 paulwratt

@paulwratt There are a couple of things keeping this unmerged: a) I'm still considering the API for this -- I'm not sure if I like the curent one. b) Switching stream works, but the switch becomes visible only after the presentation code has cleared the buffers. Something should be done so that stream switch happens immediately. Eg. buffers that are sized according to time, not by fixed size (eg. 500ms).

There are a couple of ways to do that b) that I can think of. If stream is seekable, one could just seek back to "current" position, clear output buffers and fill them again with decoded data from correct streams. OR one could just clear buffers and accept the small jump forwards. Or keep a fixed buffer or decoded packets in memory so that it's easy to jump backwards.

katajakasa avatar Apr 14 '19 15:04 katajakasa