pub struct ElementDesc {
pub name: &'static str,
pub templates: Vec<PadTemplate>,
pub capabilities: CapabilityDescriptor,
}Expand description
An element type’s autoplug-relevant metadata: a display name and its static
pad templates (typically <E as PadTemplates>::pad_templates()). The search
reads only the first sink and first source template; multi-pad elements
(tees, muxers) are not auto-plug candidates and are simply never matched.
Fields§
§name: &'static strHuman-readable type name, used to report the chosen chain.
templates: Vec<PadTemplate>The element type’s pad templates, in declaration order.
capabilities: CapabilityDescriptorAuto-plug selection signals (output memory, hardware, rank): how the
search picks this among elements satisfying the same caps. See
CapabilityDescriptor.
Implementations§
Source§impl ElementDesc
impl ElementDesc
Sourcepub fn new(name: &'static str, templates: Vec<PadTemplate>) -> Self
pub fn new(name: &'static str, templates: Vec<PadTemplate>) -> Self
Build a descriptor from a name and its pad templates. The capabilities
default (software, System memory, rank 0); tag a GPU / hardware producer
with the builders below.
Sourcepub fn with_output_memory(self, kind: MemoryDomainKind) -> Self
pub fn with_output_memory(self, kind: MemoryDomainKind) -> Self
Tag the memory feature this element’s source pad produces. Builder form.
Sourcepub fn with_acceleration(self, acceleration: Acceleration) -> Self
pub fn with_acceleration(self, acceleration: Acceleration) -> Self
Tag this element’s path as hardware-accelerated. Builder form.
Sourcepub fn with_rank(self, rank: i16) -> Self
pub fn with_rank(self, rank: i16) -> Self
Set the deterministic tiebreaker rank (higher wins among equal scores).
Sourcepub fn output_memory(&self) -> MemoryDomainKind
pub fn output_memory(&self) -> MemoryDomainKind
The memory feature the element’s source pad emits.
Trait Implementations§
Source§impl Clone for ElementDesc
impl Clone for ElementDesc
Source§fn clone(&self) -> ElementDesc
fn clone(&self) -> ElementDesc
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more