s6.utils.gst_captureΒΆ

Reusable direct GStreamer appsink capture helpers.

s6.utils.gst_capture.load_gst_module()

Import and initialize Gst lazily.

s6.utils.gst_capture.ensure_named_appsink(pipeline: str, sink_name: str) str

Ensure the provided pipeline string has a named appsink.

s6.utils.gst_capture.frame_from_sample(sample: Any, gst_module: Any) tuple[ndarray, int | None]

Convert one Gst sample into a numpy frame and optional PTS.

class s6.utils.gst_capture.GstCaptureSource(pipeline: str, sink_name: str, startup_timeout_sec: float)

Bases: object

Direct Gst appsink reader for one pipeline.

read_frame() tuple[ndarray, int | None]
release() None