pub struct LaunchFactory { /* private fields */ }Expand description
A named element factory for the gst-launch text parser and the
gst-inspect dump (M105): a parameterless constructor plus the element’s
pad templates. Unlike ElementFactory (the autoplug factory, built from
the chosen output caps), this default-constructs the element so the parser
can then apply key=value properties to it, the
gst_element_factory_make + g_object_set model.
Implementations§
Source§impl LaunchFactory
impl LaunchFactory
Sourcepub fn new(
name: &'static str,
templates: Vec<PadTemplate>,
build: fn() -> Box<dyn DynAsyncElement>,
) -> Self
pub fn new( name: &'static str, templates: Vec<PadTemplate>, build: fn() -> Box<dyn DynAsyncElement>, ) -> Self
Register a transform / sink by name, pad templates, and a
parameterless constructor (|| Box::new(MyElement::new())).
Sourcepub fn of<E: PadTemplates>(
name: &'static str,
build: fn() -> Box<dyn DynAsyncElement>,
) -> Self
pub fn of<E: PadTemplates>( name: &'static str, build: fn() -> Box<dyn DynAsyncElement>, ) -> Self
Build from a PadTemplates type, pulling its templates from the
trait so the registration site names only the type and constructor.
Sourcepub fn with_usable(self, usable: fn() -> bool) -> Self
pub fn with_usable(self, usable: fn() -> bool) -> Self
Declare a check for whether this element can run on this machine right now, beyond having been compiled in: a display sink asking whether there is a display to present on, say.
Only register_alias consults it, so an
autovideosink falls through a sink with nothing to draw on while a
pipeline naming that sink outright still fails and says why.
Sourcepub fn with_experimental(self) -> Self
pub fn with_experimental(self) -> Self
Mark this element 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].