pub struct SourceFactory { /* private fields */ }Expand description
A registered source element: its declared output caps and a constructor.
Unlike ElementFactory (transforms / sinks, which the search composes),
a source is the root of a graph, so it carries its output caps directly
rather than being matched into a chain. Use declared_source_caps to
derive the caps from a PadTemplates type.
Implementations§
Source§impl SourceFactory
impl SourceFactory
Sourcepub fn new(
name: &'static str,
output: Caps,
build: fn() -> Box<dyn DynSourceLoop>,
) -> Self
pub fn new( name: &'static str, output: Caps, build: fn() -> Box<dyn DynSourceLoop>, ) -> Self
Register a source by name, its declared output caps, and constructor.
Sourcepub fn with_experimental(self) -> Self
pub fn with_experimental(self) -> Self
Mark this source experimental: its runtime path is host- or
device-validated, not a CI promise. g2g-inspect prints it.
Sourcepub fn experimental(&self) -> bool
pub fn experimental(&self) -> bool
Whether this factory declared [with_experimental].
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SourceFactory
impl RefUnwindSafe for SourceFactory
impl Send for SourceFactory
impl Sync for SourceFactory
impl Unpin for SourceFactory
impl UnsafeUnpin for SourceFactory
impl UnwindSafe for SourceFactory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more