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§
- Editor
Video Stream - A frame-indexed, seekable view over a video file, backed by the
forward-only
GstreamerPipeStreamplus an LRU frame cache. - Frame
Cache 🔒 - 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).