Skip to content

Commit 28f3f96

Browse files
src: lib: stream: sink: image_sink: Rewrite to GStreamer-native pipeline
Replace the Rust image crate-based thumbnail pipeline with a fully GStreamer-native approach using videoscale, videoconvert, and jpegenc. This eliminates the need to decode to raw RGB, copy frame data out of GStreamer, and re-encode in userspace. Key changes: - Decode -> videoscale -> capsfilter -> videoconvert -> jpegenc -> appsink replaces decode -> appsink -> image::thumbnail -> image::write_to - JPEG quality and target resolution are updated dynamically per request by modifying jpegenc and capsfilter properties at runtime - Software decoders limited to max-threads=1 to reduce CPU usage - Pipeline runs at background priority via try_new_background() - Decode only keyframes (skip-frame=non-key) for efficiency - Harden decoders: disable QoS, reject corrupt output, throttle FKU - Optimize appsink for low-latency single-frame capture - Fix pipeline memory leak: set pipeline to Null after each capture so decoder drops reference frames and buffer pools are released - malloc_trim(0) on Linux ensures glibc returns freed pages to OS
1 parent 3b9a50e commit 28f3f96

File tree

3 files changed

+988
-889
lines changed

3 files changed

+988
-889
lines changed

0 commit comments

Comments
 (0)