pub struct RuntimeContext {
pub codecs: CodecRegistry,
pub containers: ContainerRegistry,
pub sources: SourceRegistry,
pub filters: FilterRegistry,
}Expand description
Aggregate of every registry the framework consumes.
Every sibling crate that contributes implementations exposes
pub fn register(ctx: &mut RuntimeContext) to install itself.
Construct with RuntimeContext::new for an empty context, then
call each sibling’s register to fill it in.
Fields§
§codecs: CodecRegistry§containers: ContainerRegistry§sources: SourceRegistry§filters: FilterRegistryImplementations§
Source§impl RuntimeContext
impl RuntimeContext
Sourcepub fn with_all_features() -> Self
pub fn with_all_features() -> Self
Build a RuntimeContext populated by every sibling crate
linked into the binary.
Walks REGISTRARS and invokes each entry’s func against a
fresh context. Ordering is link-determined — siblings should
not assume any particular order.
Sourcepub fn with_all_features_traced<F: FnMut(&str)>(trace: F) -> Self
pub fn with_all_features_traced<F: FnMut(&str)>(trace: F) -> Self
Like with_all_features but invokes
trace(name) immediately before each sibling’s register fn.
Useful for diagnosing register-time hangs — the last name passed
to trace names the offending sibling.
Sourcepub fn with_all_features_filtered<F: FnMut(&str) -> bool>(filter: F) -> Self
pub fn with_all_features_filtered<F: FnMut(&str) -> bool>(filter: F) -> Self
Like with_all_features but skips
entries whose name filter returns false for. Used by CLIs to
implement opt-outs like --no-hwaccel (skip videotoolbox /
audiotoolbox).