pub struct Reserved<E: CatalogExt = ()> { /* private fields */ }Expand description
A clonable reservation context handed to importers so they declare their tracks up front.
Made via Producer::reserve. While any Reserved clone is alive the track set may still
grow, so the catalog is withheld from the broadcast. Each track constructor reserves a
rendition by name and counts as outstanding until its returned producer publishes a config or
is dropped. Once every clone is dropped and every reservation resolves, the first catalog
snapshot is published atomically with the complete track list, so a one-shot muxer (fMP4,
MPEG-TS) never sees a half-converged catalog.
It only gates the catalog: the timestamps written through it land verbatim on the catalog’s
clock. A source on a timeline of its own shifts them through a Timebase.
Implementations§
Source§impl<E: CatalogExt> Reserved<E>
impl<E: CatalogExt> Reserved<E>
Sourcepub fn with_interval(self, interval: impl Into<Option<Duration>>) -> Self
pub fn with_interval(self, interval: impl Into<Option<Duration>>) -> Self
Declare the track’s longest group (its GOP), which the catalog’s sync.interval
promises. Without one, a video or audio track measures it over its first second or group,
whichever is longer, before the interval is declared.
Sourcepub fn track_info(&self, priority: i8) -> Info
pub fn track_info(&self, priority: i8) -> Info
Track properties for a media track under this catalog, carrying any max age it declares.
See Producer::track_info.
Sourcepub fn video<C: Container>(
&self,
track: Producer,
container: C,
config: impl Into<Option<VideoConfig>>,
) -> Result<Producer<C, VideoConfig>>
pub fn video<C: Container>( &self, track: Producer, container: C, config: impl Into<Option<VideoConfig>>, ) -> Result<Producer<C, VideoConfig>>
Publish a reserved video track and own its catalog rendition.
Sourcepub fn audio<C: Container>(
&self,
track: Producer,
container: C,
config: impl Into<Option<AudioConfig>>,
) -> Result<Producer<C, AudioConfig>>
pub fn audio<C: Container>( &self, track: Producer, container: C, config: impl Into<Option<AudioConfig>>, ) -> Result<Producer<C, AudioConfig>>
Publish a reserved audio track and own its catalog rendition.
Sourcepub fn text<C: Container>(
&self,
track: Producer,
container: C,
config: impl Into<Option<TextConfig>>,
) -> Result<Producer<C, TextConfig>>
pub fn text<C: Container>( &self, track: Producer, container: C, config: impl Into<Option<TextConfig>>, ) -> Result<Producer<C, TextConfig>>
Publish a reserved text track and own its catalog rendition.
Sourcepub fn track<C, R>(
&self,
track: Producer,
container: C,
config: impl Into<Option<R>>,
) -> Result<Producer<C, R>>
pub fn track<C, R>( &self, track: Producer, container: C, config: impl Into<Option<R>>, ) -> Result<Producer<C, R>>
Publish a reserved track using a custom catalog config.
Sourcepub fn timestamp(&self, hint: Option<Timestamp>) -> Result<Timestamp>
pub fn timestamp(&self, hint: Option<Timestamp>) -> Result<Timestamp>
Resolve a timestamp on the broadcast’s shared clock (see Producer::timestamp).