Skip to main content

DynSourceLoop

Trait DynSourceLoop 

Source
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§

Source

fn intercept_caps<'a>(&'a mut self) -> BoxFuture<'a, Result<Caps, G2gError>>

Source

fn configure_pipeline( &mut self, absolute_caps: &Caps, ) -> Result<ConfigureOutcome, G2gError>

Source

fn run<'a>( &'a mut self, out: &'a mut dyn OutputSink, ) -> BoxFuture<'a, Result<u64, G2gError>>

Source

fn reconfigure(&mut self, request: Reconfigure) -> Result<Caps, G2gError>

Source

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.

Source

fn provide_clock(&self) -> Option<ClockCandidate>

Dyn-safe mirror of SourceLoop::provide_clock, for the runner’s clock election.

Source

fn configure_allocation(&mut self, params: &AllocationParams)

Dyn-safe mirror of SourceLoop::configure_allocation, the upstream end of the M12 allocation cascade.

Provided Methods§

Source

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.

Source

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.

Source

fn output_memory(&self) -> MemoryDomainKind

Dyn-safe mirror of SourceLoop::output_memory. Default System.

Source

fn output_domains(&self) -> DomainSet

Dyn-safe mirror of SourceLoop::output_domains. Default only(output_memory()).

Source

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.

Source

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.

Source

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.

Source

fn properties(&self) -> &'static [PropertySpec]

Dyn-safe mirror of SourceLoop::properties, for gst-inspect / gst-launch introspection of an erased source.

Source

fn metadata(&self) -> ElementMetadata

Dyn-safe mirror of SourceLoop::metadata, for the gst-inspect “Factory Details” of an erased source. Defaults to empty.

Source

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.

Source

fn set_instance_name(&mut self, _name: String)

Dyn-safe mirror of SourceLoop::set_instance_name.

Source

fn set_log_category(&mut self, _category: String)

Dyn-safe mirror of SourceLoop::set_log_category.

Source

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.

Source

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.

Source§

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>>

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.
Source§

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.
Source§

fn configure_pipeline( &mut self, absolute_caps: &Caps, ) -> Result<ConfigureOutcome, G2gError>

Source§

fn run<'a>( &'a mut self, out: &'a mut dyn OutputSink, ) -> BoxFuture<'a, Result<u64, G2gError>>

Source§

fn reconfigure(&mut self, request: Reconfigure) -> Result<Caps, G2gError>

Source§

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.
Source§

fn output_memory(&self) -> MemoryDomainKind

Dyn-safe mirror of SourceLoop::output_memory. Default System.
Source§

fn output_domains(&self) -> DomainSet

Dyn-safe mirror of SourceLoop::output_domains. Default only(output_memory()).
Source§

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.
Source§

fn provide_clock(&self) -> Option<ClockCandidate>

Dyn-safe mirror of SourceLoop::provide_clock, for the runner’s clock election.
Source§

fn configure_allocation(&mut self, params: &AllocationParams)

Dyn-safe mirror of SourceLoop::configure_allocation, the upstream end of the M12 allocation cascade.
Source§

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.
Source§

fn properties(&self) -> &'static [PropertySpec]

Dyn-safe mirror of SourceLoop::properties, for gst-inspect / gst-launch introspection of an erased source.
Source§

fn metadata(&self) -> ElementMetadata

Dyn-safe mirror of SourceLoop::metadata, for the gst-inspect “Factory Details” of an erased source. Defaults to empty.
Source§

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.
Source§

fn set_instance_name(&mut self, name: String)

Dyn-safe mirror of SourceLoop::set_instance_name.
Source§

fn set_log_category(&mut self, category: String)

Dyn-safe mirror of SourceLoop::set_log_category.
Source§

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.
Source§

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.
Source§

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

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.

Source§

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.