Expand description
Real video decode via the gst-launch-1.0 and gst-discoverer-1.0 CLIs.
Mirrors the spirit of crate::mock::MockVideoStream but reads bytes
from a real GStreamer pipeline:
filesrc location=<path>
! decodebin
! videoconvert
! video/x-raw,format=BGRA
! fdsink fd=1§Trade-offs
- + Zero compile-time integration with libgstreamer; works against
any system
GStreamerthe user installs (brew install gstreamer,apt install gstreamer1.0-tools, …). No FFI surface. - +
GStreameris LGPL — friendlier thanFFmpeg’s GPL-or-LGPL split, no licensing entanglement for our binary either way. - + Hardware decode picks up automatically when
GStreamer’svah264dec/vtdec/nvh264decplugins are present. - − Per-process fork; for the player loop that’s one fork for the whole stream, not per-frame.
- − Assumes
gst-launch-1.0andgst-discoverer-1.0onPATH. Reported asError::Spawnrather than a panic.
For a proper Rust-bound integration via gstreamer-rs see M-DEC.3+;
the crate::VideoStream trait makes it a swap-in replacement.
Structs§
- Gstreamer
Pipe Stream - Streams BGRA frames from a video file by piping it through
gst-launch-1.0. - Video
Metadata - Per-stream metadata, as reported by
gst-discoverer-1.0.
Enums§
- Error
- Failure modes for the gstreamer-pipe decoder.
Functions§
- file_
uri 🔒 - gstreamer_
available - Whether both
gst-launch-1.0andgst-discoverer-1.0are onPATHand runnable. Useful as a runtime guard for tests + production code that wants to gracefully degrade whenGStreamerisn’t installed. - parse_
clock 🔒 - Parses
gst-discoverer-1.0Duration:clocks like0:00:00.266666666. - parse_
discoverer 🔒 - Parse
gst-discoverer-1.0 -voutput for the first video stream. - parse_
rational 🔒 - Parses
gst-discoverer-1.0rationals like30/1or30000/1001.
Type Aliases§
- Result
- Convenience alias.