pub enum CapsTransform {
RawVideo {
accept: Vec<RawVideoFormat>,
produce: Vec<RawVideoFormat>,
shapes: Vec<RawVideoShape>,
},
Audio {
accept: Vec<AudioFormat>,
produce: Vec<AudioFormat>,
shapes: Vec<AudioShape>,
},
}Expand description
Declarative forward derivation for a transform element, read by the solver
through CapsConstraint::DerivedFields.
shapes are the output alternatives in preference order (first preferred);
duplicates are dropped, so a shape that coincides with the passthrough on a
given input costs nothing. accept gates the input format (empty = every
format of that media kind) and produce gates the derived output format
(empty = unrestricted), which is what keeps an input-only format out of the
derived set. An input the transform doesn’t accept, or no surviving shape,
derives the empty set, which the solver reads as an unsatisfiable link.
Variants§
Implementations§
Source§impl CapsTransform
impl CapsTransform
Sourcepub fn derive(&self, input: &Caps) -> CapsSet
pub fn derive(&self, input: &Caps) -> CapsSet
Forward derivation: the ordered output alternatives for input.
Sourcepub fn passthrough(&self) -> PassthroughFields
pub fn passthrough(&self) -> PassthroughFields
Which fields the solver may couple backward: those every output shape
derives with FieldTransform::Identity. A field one alternative
retargets is not coupled, whichever alternative the solve picks. No
shapes means nothing derives, so nothing couples.
Trait Implementations§
Source§impl Clone for CapsTransform
impl Clone for CapsTransform
Source§fn clone(&self) -> CapsTransform
fn clone(&self) -> CapsTransform
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more