pub fn stream_media_segments(
rx: Receiver<StreamSubscriber>,
config: Config,
config_rx: Option<Receiver<Config>>,
) -> Result<Infallible>Expand description
Start capturing video.
The optional config_rx parameter can be used to send configuration updates. The
function will send None to all subscribed channels to indicate that the config has
changed and then restart the stream with the new config.
This function may block indefinitely, and should be called in its own thread
or with Tokio’s spawn_blocking function or similar.
§Errors
This function may return an Error::Camera if interacting with the provided camera
device fails, an Error::Other if the device path is invalid UTF-8, or an
Error::Encoding if constructing an encoder fails.