pub trait DynSourceLoop: ElementBound {
Show 21 methods
// Required methods
fn intercept_caps<'a>(&'a mut self) -> BoxFuture<'a, Result<Caps, G2gError>>;
fn configure_pipeline(
&mut self,
absolute_caps: &Caps,
) -> Result<ConfigureOutcome, G2gError>;
fn run<'a>(
&'a mut self,
out: &'a mut dyn OutputSink,
) -> BoxFuture<'a, Result<u64, G2gError>>;
fn reconfigure(&mut self, request: Reconfigure) -> Result<Caps, G2gError>;
fn latency(&self) -> LatencyReport;
fn provide_clock(&self) -> Option<ClockCandidate>;
fn configure_allocation(&mut self, params: &AllocationParams);
// Provided methods
fn produced_caps<'a>(
&'a mut self,
) -> BoxFuture<'a, Result<CapsSet, G2gError>> { ... }
fn caps_preferences(&self) -> Option<CapsPreferences> { ... }
fn output_memory(&self) -> MemoryDomainKind { ... }
fn output_domains(&self) -> DomainSet { ... }
fn query_duration(&self) -> Option<u64> { ... }
fn configured_output_caps(&self) -> Option<Caps> { ... }
fn probe_output_caps(&mut self) -> Option<Caps> { ... }
fn properties(&self) -> &'static [PropertySpec] { ... }
fn metadata(&self) -> ElementMetadata { ... }
fn log_category(&self) -> &'static str { ... }
fn set_instance_name(&mut self, _name: String) { ... }
fn set_log_category(&mut self, _category: String) { ... }
fn set_property(
&mut self,
_name: &str,
_value: PropValue,
) -> Result<(), PropError> { ... }
fn get_property(&self, _name: &str) -> Option<PropValue> { ... }
}Expand description
Dyn-safe mirror of SourceLoop for heterogeneous fan-in branches, the
source-side analog of DynAsyncElement.
Boxes run’s future so a Vec<&mut dyn DynSourceLoop> can hold sources
of different concrete types.
Required Methods§
fn intercept_caps<'a>(&'a mut self) -> BoxFuture<'a, Result<Caps, G2gError>>
fn configure_pipeline( &mut self, absolute_caps: &Caps, ) -> Result<ConfigureOutcome, G2gError>
fn run<'a>( &'a mut self, out: &'a mut dyn OutputSink, ) -> BoxFuture<'a, Result<u64, G2gError>>
fn reconfigure(&mut self, request: Reconfigure) -> Result<Caps, G2gError>
Sourcefn latency(&self) -> LatencyReport
fn latency(&self) -> LatencyReport
Dyn-safe mirror of SourceLoop::latency, so the DAG runner folds a
source’s latency contribution like the linear runner does.
Sourcefn provide_clock(&self) -> Option<ClockCandidate>
fn provide_clock(&self) -> Option<ClockCandidate>
Dyn-safe mirror of SourceLoop::provide_clock, for the runner’s clock
election.
Sourcefn configure_allocation(&mut self, params: &AllocationParams)
fn configure_allocation(&mut self, params: &AllocationParams)
Dyn-safe mirror of SourceLoop::configure_allocation, the upstream end
of the M12 allocation cascade.
Provided Methods§
Sourcefn produced_caps<'a>(&'a mut self) -> BoxFuture<'a, Result<CapsSet, G2gError>>
fn produced_caps<'a>(&'a mut self) -> BoxFuture<'a, Result<CapsSet, G2gError>>
Dyn-safe mirror of the produce set behind
SourceLoop::caps_constraint, so the DAG runner negotiates a source
that offers alternatives (a camera’s pixel formats) instead of only its
preferred one. The default is the single-caps answer; the blanket impl
reads the constraint the source declares.
Sourcefn caps_preferences(&self) -> Option<CapsPreferences>
fn caps_preferences(&self) -> Option<CapsPreferences>
Dyn-safe mirror of SourceLoop::caps_preferences, so an erased
source’s declared per-alternative costs reach the solver. Defaults to
None (cost = alternative index), matching SourceLoop.
Sourcefn output_memory(&self) -> MemoryDomainKind
fn output_memory(&self) -> MemoryDomainKind
Dyn-safe mirror of SourceLoop::output_memory. Default
System.
Sourcefn output_domains(&self) -> DomainSet
fn output_domains(&self) -> DomainSet
Dyn-safe mirror of SourceLoop::output_domains. Default
only(output_memory()).
Sourcefn query_duration(&self) -> Option<u64>
fn query_duration(&self) -> Option<u64>
Dyn-safe mirror of SourceLoop::query_duration (M203), so the DAG
runner can publish an erased source’s duration on the progress handle.
Sourcefn configured_output_caps(&self) -> Option<Caps>
fn configured_output_caps(&self) -> Option<Caps>
Dyn-safe mirror of SourceLoop::configured_output_caps (M195), so the
decodebin parser can read an erased source’s property-driven caps.
Sourcefn probe_output_caps(&mut self) -> Option<Caps>
fn probe_output_caps(&mut self) -> Option<Caps>
Dyn-safe mirror of SourceLoop::probe_output_caps (M480): the parse-time
caps decodebin uses to pick a demuxer, allowed to sniff the header.
Sourcefn properties(&self) -> &'static [PropertySpec]
fn properties(&self) -> &'static [PropertySpec]
Dyn-safe mirror of SourceLoop::properties, for gst-inspect /
gst-launch introspection of an erased source.
Sourcefn metadata(&self) -> ElementMetadata
fn metadata(&self) -> ElementMetadata
Dyn-safe mirror of SourceLoop::metadata, for the gst-inspect
“Factory Details” of an erased source. Defaults to empty.
Sourcefn log_category(&self) -> &'static str
fn log_category(&self) -> &'static str
The log category for this erased source (M179): its short type name by default (the blanket impl fills it), so the runner can name and log it.
Sourcefn set_instance_name(&mut self, _name: String)
fn set_instance_name(&mut self, _name: String)
Dyn-safe mirror of SourceLoop::set_instance_name.
Sourcefn set_log_category(&mut self, _category: String)
fn set_log_category(&mut self, _category: String)
Dyn-safe mirror of SourceLoop::set_log_category.
Sourcefn set_property(
&mut self,
_name: &str,
_value: PropValue,
) -> Result<(), PropError>
fn set_property( &mut self, _name: &str, _value: PropValue, ) -> Result<(), PropError>
Dyn-safe mirror of SourceLoop::set_property. Defaults to “no
properties”; the blanket impl<T: SourceLoop> overrides it to forward.
Sourcefn get_property(&self, _name: &str) -> Option<PropValue>
fn get_property(&self, _name: &str) -> Option<PropValue>
Dyn-safe mirror of SourceLoop::get_property. Defaults to None; the
blanket impl forwards to the source.
Trait Implementations§
Source§impl<'b> DynSourceLoop for &'b mut (dyn DynSourceLoop + 'b)
Forwarding impl so a borrowed &mut dyn DynSourceLoop can be boxed into a
Box<dyn DynSourceLoop + 'a> graph node (the muxer/fan-out wrappers build a
borrowing Graph over their &mut source references). Disjoint from the
SourceLoop blanket above: a &mut dyn DynSourceLoop is not a SourceLoop.
impl<'b> DynSourceLoop for &'b mut (dyn DynSourceLoop + 'b)
Forwarding impl so a borrowed &mut dyn DynSourceLoop can be boxed into a
Box<dyn DynSourceLoop + 'a> graph node (the muxer/fan-out wrappers build a
borrowing Graph over their &mut source references). Disjoint from the
SourceLoop blanket above: a &mut dyn DynSourceLoop is not a SourceLoop.
fn intercept_caps<'a>(&'a mut self) -> BoxFuture<'a, Result<Caps, G2gError>>
Source§fn produced_caps<'a>(&'a mut self) -> BoxFuture<'a, Result<CapsSet, G2gError>>
fn produced_caps<'a>(&'a mut self) -> BoxFuture<'a, Result<CapsSet, G2gError>>
SourceLoop::caps_constraint, so the DAG runner negotiates a source
that offers alternatives (a camera’s pixel formats) instead of only its
preferred one. The default is the single-caps answer; the blanket impl
reads the constraint the source declares.Source§fn caps_preferences(&self) -> Option<CapsPreferences>
fn caps_preferences(&self) -> Option<CapsPreferences>
SourceLoop::caps_preferences, so an erased
source’s declared per-alternative costs reach the solver. Defaults to
None (cost = alternative index), matching SourceLoop.fn configure_pipeline( &mut self, absolute_caps: &Caps, ) -> Result<ConfigureOutcome, G2gError>
fn run<'a>( &'a mut self, out: &'a mut dyn OutputSink, ) -> BoxFuture<'a, Result<u64, G2gError>>
fn reconfigure(&mut self, request: Reconfigure) -> Result<Caps, G2gError>
Source§fn latency(&self) -> LatencyReport
fn latency(&self) -> LatencyReport
SourceLoop::latency, so the DAG runner folds a
source’s latency contribution like the linear runner does.Source§fn output_memory(&self) -> MemoryDomainKind
fn output_memory(&self) -> MemoryDomainKind
SourceLoop::output_memory. Default
System.Source§fn output_domains(&self) -> DomainSet
fn output_domains(&self) -> DomainSet
SourceLoop::output_domains. Default
only(output_memory()).Source§fn query_duration(&self) -> Option<u64>
fn query_duration(&self) -> Option<u64>
SourceLoop::query_duration (M203), so the DAG
runner can publish an erased source’s duration on the progress handle.Source§fn provide_clock(&self) -> Option<ClockCandidate>
fn provide_clock(&self) -> Option<ClockCandidate>
SourceLoop::provide_clock, for the runner’s clock
election.Source§fn configure_allocation(&mut self, params: &AllocationParams)
fn configure_allocation(&mut self, params: &AllocationParams)
SourceLoop::configure_allocation, the upstream end
of the M12 allocation cascade.Source§fn configured_output_caps(&self) -> Option<Caps>
fn configured_output_caps(&self) -> Option<Caps>
SourceLoop::configured_output_caps (M195), so the
decodebin parser can read an erased source’s property-driven caps.Source§fn properties(&self) -> &'static [PropertySpec]
fn properties(&self) -> &'static [PropertySpec]
SourceLoop::properties, for gst-inspect /
gst-launch introspection of an erased source.Source§fn metadata(&self) -> ElementMetadata
fn metadata(&self) -> ElementMetadata
SourceLoop::metadata, for the gst-inspect
“Factory Details” of an erased source. Defaults to empty.Source§fn log_category(&self) -> &'static str
fn log_category(&self) -> &'static str
Source§fn set_instance_name(&mut self, name: String)
fn set_instance_name(&mut self, name: String)
SourceLoop::set_instance_name.Source§fn set_log_category(&mut self, category: String)
fn set_log_category(&mut self, category: String)
SourceLoop::set_log_category.Source§fn set_property(
&mut self,
name: &str,
value: PropValue,
) -> Result<(), PropError>
fn set_property( &mut self, name: &str, value: PropValue, ) -> Result<(), PropError>
SourceLoop::set_property. Defaults to “no
properties”; the blanket impl<T: SourceLoop> overrides it to forward.Source§fn get_property(&self, name: &str) -> Option<PropValue>
fn get_property(&self, name: &str) -> Option<PropValue>
SourceLoop::get_property. Defaults to None; the
blanket impl forwards to the source.Source§fn probe_output_caps(&mut self) -> Option<Caps>
fn probe_output_caps(&mut self) -> Option<Caps>
SourceLoop::probe_output_caps (M480): the parse-time
caps decodebin uses to pick a demuxer, allowed to sniff the header.Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<'b> DynSourceLoop for &'b mut (dyn DynSourceLoop + 'b)
Forwarding impl so a borrowed &mut dyn DynSourceLoop can be boxed into a
Box<dyn DynSourceLoop + 'a> graph node (the muxer/fan-out wrappers build a
borrowing Graph over their &mut source references). Disjoint from the
SourceLoop blanket above: a &mut dyn DynSourceLoop is not a SourceLoop.
impl<T: SourceLoop> DynSourceLoop for T
Blanket adapter: every SourceLoop is usable as a DynSourceLoop
by boxing its run and intercept_caps futures. Calls are
disambiguated to SourceLoop:: because the two traits share method
names.