Skip to main content
Start and stop an MJPEG video stream from a USB camera attached to the box, so a person or a vision tool can watch the DUT while a test runs.

Handle

Methods

Types

Method Reference

start() -> Result<WebcamStream>

Start the MJPEG stream. Idempotent: called while a stream is already up, it reports the existing one with already_running: true rather than starting a second.
This call gets a 30-second budget, because starting the stream subprocess takes a few seconds.

stop() -> Result<bool>

Stop the stream. Returns: false if no stream was running.

status() -> Result<WebcamStatus> and url() -> Result<Option<String>>

Whether a stream is running and where, or just the URL.

Examples

Record the bench while a long test runs

Supported Hardware

Notes

  • The stream URL points at the box as the client reached it. A URL captured on one network may not resolve from another, so do not persist it across environments.
  • This is a video stream, not a frame grab. There is no assert-on-image here — point an MJPEG consumer (a browser, VLC, OpenCV) at the URL.
  • Always stop() in teardown. A running stream holds the camera open and the next test cannot start one.