pub struct Context {
pub bus: Bus,
pub pipeline_id: Arc<str>,
pub graph: PipelineGraph,
pub clock: Arc<Clock>,
pub playback_clock: Arc<PlaybackClock>,
pub source_id: ElementId,
}Expand description
Everything a crate::pipeline::ChainBuilder/crate::elements::Tee
needs to wire itself into a crate::pipeline::Pipeline — bundled into
one Arc instead of threading bus/pipeline_id/graph/the wall and
playback clocks through separately. Built once per source by
crate::pipeline::PipelineBuilder::add_source (what
crate::pipeline::Pipeline::new itself calls, for its own
single-source case) and handed to that source’s own wire closure; a
crate::elements::Tee keeps its own clone while it is alive, and its
crate::elements::TeeHandle accesses that clone weakly so retaining
the handle cannot keep the pipeline’s Bus open after the Tee itself
is gone.
Fields§
§bus: Bus§pipeline_id: Arc<str>§graph: PipelineGraph§clock: Arc<Clock>§playback_clock: Arc<PlaybackClock>Shared media-position clock used to hand video scheduling from the wall clock to an audio output master without changing pipelines.
source_id: ElementIdGraph identity of the source whose wiring closure owns this context.