Conversation
RAM-based timeshift as an alternative to disk-based timeshift. When
enabled via config.timeshift.ram_mode, live DVB TS data is buffered
in a fixed-size circular RAM ring buffer instead of written to disk.
After a configurable delay (config.timeshift.ram_delay_seconds,
default 10 s) timeshift activates automatically so the viewer sees
the time-delayed picture. Pause, unpause, and seek all work
identically to disk timeshift.
The ring buffer capacity is derived from the delay setting with
delay_seconds * 4 MB (e.g. 10 s -> 40 MB). Once the buffer wraps,
the oldest data is silently overwritten, so only the most recent
seconds of content are available for rewind -- by design this is an
"instant replay" feature, not a replacement for disk timeshift.
Core components:
eRamRingBuffer -- seekable circular RAM buffer addressed by
monotonically increasing absolute byte offsets.
Handles wrap-around transparently.
eRamTsSource -- iTsSource implementation backed by the ring
buffer. Returns EAGAIN when the read position
has been lapped (ring overwrite) and signals the
service layer to recover. Returns 0 at the
write edge so the push thread retries.
eRamRecorder -- eDVBRecordScrambledThread subclass that writes
into RAM instead of disk and extracts PCR
timestamps for seek support.
eRamServicePlay -- extends eDVBServicePlay with RAM recording,
timer-based auto-activation, PCR-based seeking,
lap-detection watchdog, and CSA descrambling
support for StreamRelay channels.
Seeking and lap-recovery use forcePosition() on eFilePushThread which
directly sets the push thread's m_current_position. This bypasses
both setStartOffset() (which has no effect because the push thread
never calls m_source->offset()) and the cue-sheet path (which relies
on tstools .ap data that does not exist for RAM buffers).
The push thread EOF path is reordered so that timeshift mode
(m_flags == 1) returns to the read loop without sending evtEOF,
avoiding ~70 spurious "End of file!" events per session.
* improve stream recovery for ram timeshift
* master: [RestoreScreen] * improve backup flag file detection * find alternative backup tar files [StartEnigma] * improve backup flag file detection [StartEnigma] * use /etc/autorestoreloop instead of /media/hdd/images/config/autorestore for autorestore loop check add h8se [Scan] Fix services with same SID on different transponders overwriting each other [Navigation] * add recording support for wrapper links Update groupedservices Refactor BaseParser and SubRipParser for consistency and readability; update method names to snake_case [Migration] * finally fix Filecommander settings migration Migration.py fix typo text updates pot update translation update [Menu.py] Fix menu navigation via digit entry Revert "Update groupedservices" [FileCommander] * move convertSettings to Migration [FileCommander] Add missing method spacing
* update
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




RAM-based timeshift as an alternative to disk-based timeshift. When enabled via config.timeshift.ram_mode, live DVB TS data is buffered in a fixed-size circular RAM ring buffer instead of written to disk. After a configurable delay (config.timeshift.ram_delay_seconds, default 10 s) timeshift activates automatically so the viewer sees the time-delayed picture. Pause, unpause, and seek all work identically to disk timeshift.
The ring buffer capacity is derived from the delay setting with delay_seconds * 4 MB (e.g. 10 s -> 40 MB). Once the buffer wraps, the oldest data is silently overwritten, so only the most recent seconds of content are available for rewind -- by design this is an "instant replay" feature, not a replacement for disk timeshift.
Core components:
eRamRingBuffer -- seekable circular RAM buffer addressed by
monotonically increasing absolute byte offsets.
Handles wrap-around transparently.
eRamTsSource -- iTsSource implementation backed by the ring
buffer. Returns EAGAIN when the read position
has been lapped (ring overwrite) and signals the
service layer to recover. Returns 0 at the
write edge so the push thread retries.
eRamRecorder -- eDVBRecordScrambledThread subclass that writes
into RAM instead of disk and extracts PCR
timestamps for seek support.
eRamServicePlay -- extends eDVBServicePlay with RAM recording,
timer-based auto-activation, PCR-based seeking,
lap-detection watchdog, and CSA descrambling
support for StreamRelay channels.
Seeking and lap-recovery use forcePosition() on eFilePushThread which directly sets the push thread's m_current_position. This bypasses both setStartOffset() (which has no effect because the push thread never calls m_source->offset()) and the cue-sheet path (which relies on tstools .ap data that does not exist for RAM buffers).
The push thread EOF path is reordered so that timeshift mode (m_flags == 1) returns to the read loop without sending evtEOF, avoiding ~70 spurious "End of file!" events per session.