OK - so now I can see how it works when Timeshift in Tvheadend backend service is configured to use files and when the Timeshift is active:
There's created folder named buffer, inside appears a subfolder with buffer files (every minute a new file is created until their total size match the Timeshift Maximum size configuration).
This subfolder's name is a number - starting from 0, as soon as I switch the channel, the folder with buffer files is deleted and a new folder with incremented number is created and a new buffer files are generated. Everything looks working fine...
Now what happens - sometimes - usually when I try to move the Timeshift pointer in Kodi (with left - right arrows on RC), usually backwards to see the part of the Live stream again:
- The Timeshift pointer in Kodi does not jump as expected and it's position is lost, then jumps to left border of Timeshift bar (which represents the Timeshift buffer recorded size)
- The Timeshift feature stops - the buffer data files stays there and it's possible to play them again but it looks at some further point are corrupted
- TheTimeshift offset can't be moved to zero anymore with Timeshift running (until the channel is switched to another or stopped / started again). But when I try to move the Timeshift pointer to right Timeshift bar's border (keeping right arrow pressed) until the Seeking offset is >= negative Timeshift offset, it switches to Live stream (but it does not record to Timeshift buffer anymore). In this state any left-right arrow push starts playing the Timeshift buffer from begin.
Don't know if anyone can ever read this and understand what I mean - better try. But it's a real nightmare, how this feature (not)work.
When I tried the same with Timeshift to RAM only, it was even worse because the buffer data were immediately discarded when the Timeshift pointer was lost so there was nothing to analyze.
I don't know how it works together, if Tvheadend backend (4.3) has a bug or if that's Kodi but it looks more likely that Kodi can't work properly with Timeshift / Timeshift buffer data.
Also it looks the critical moment is when the Timeshift buffer gets full (so a circle write must start).