Expand description
Text specifiers that name a video or an audio source, and open it.
A specifier is a kind and an optional id, such as cam:2, screen,
test:gradient or file:clip.mp4:loop. The ids are the ones the device
listings report, such as moq_video::capture::cameras. There is no
backend segment: the platform picks the backend for a device.
Both specifiers implement FromStr and Display, so a
--video or --audio flag parses straight into one, and a specifier
written out reads back the same. With the serde feature they also
deserialize from, and serialize to, the same string.
VideoSourceSpec::open and AudioSourceSpec::open open the source a
specifier names.
MediaSpec pairs a video with the audio that goes with it, which
LocalBroadcast::set_spec in moq-ext-publisher opens and publishes.
§Examples
use moq_ext_sources::spec::{VideoOpenOptions, VideoSourceSpec};
let spec: VideoSourceSpec = "test:gradient".parse()?;
let source = spec.open(&VideoOpenOptions::default()).await?;Structs§
- Media
Spec - A video source and the audio that goes with it, which a broadcast publishes together.
- Parse
Spec Error - An error from parsing a source specifier.
- Video
Open Options - How
VideoSourceSpec::openopens a source.
Enums§
- Audio
Source Spec - A parsed audio source specifier.
- Rpicam
Mode - What
rpicam-vidhands over:rpicamorrpicam:raw. - Test
Pattern - The generated picture
testandtest:<name>publish. - Test
Tone - The generated tone
testandtest:<name>publish. - Video
Source Spec - A parsed video source specifier.
Constants§
- PORTAL
- The id of
screen:portalandwindow:portal.