Skip to main content

Module editor_stream

Module editor_stream 

Source
Expand description

Random-access decode for the editor (ED.3 / M-EDIT).

GstreamerPipeStream decodes forward only — fine for the recorder’s playback, useless for an editor that scrubs to arbitrary frames. EditorVideoStream wraps it with frame-indexed seeking plus a bounded decoded-frame cache.

§Seek strategy (CLI-pipe constraint)

gst-launch-1.0 exposes no command-line seek, so a precise jump to a keyframe isn’t available the way gstreamer-rs’s seek_simple would be. The honest v1 therefore forward-decodes: a seek forward keeps pulling from the live pipe; a seek backward (before the pipe’s current position) re-spawns the pipe from frame 0 and decodes up to the target. A bounded LRU of decoded frames makes local scrubbing and repeated access cheap — and export, which walks frames in order, never re-spawns. Swapping in a gstreamer-rs ACCURATE seek later is a one-site change behind this type (see M-DEC.3+); spawn_count exists so tests can assert the cache is doing its job.

Structs§

EditorVideoStream
A frame-indexed, seekable view over a video file, backed by the forward-only GstreamerPipeStream plus an LRU frame cache.
FrameCache 🔒
A small LRU cache of decoded frames keyed by frame index.

Constants§

DEFAULT_CACHE_FRAMES
Default decoded-frame cache capacity (~10 s at 30 fps).