pub struct SwVideoCompositorHandle { /* private fields */ }Expand description
A cheaply cloneable handle for adding and removing compositor inputs.
It mirrors crate::elements::MixerHandle, but each registration also
returns a SwVideoLayerHandle for changing that input’s placement.
Implementations§
Source§impl SwVideoCompositorHandle
impl SwVideoCompositorHandle
Sourcepub fn add_source(
&self,
name: impl Into<String>,
layer: VideoLayer,
) -> Result<Option<SwVideoCompositorInput>, SwVideoCompositorError>
pub fn add_source( &self, name: impl Into<String>, layer: VideoLayer, ) -> Result<Option<SwVideoCompositorInput>, SwVideoCompositorError>
Registers an input and returns its terminal Sink plus independent
runtime layer control. Reusing name replaces the old registration;
old sinks and layer handles become harmlessly stale.
Sourcepub fn remove_source(&self, name: &str)
pub fn remove_source(&self, name: &str)
Removes name immediately. Existing input sinks and layer handles
become disconnected and cannot affect a later same-name source.
pub fn source_count(&self) -> usize
Trait Implementations§
Source§impl Clone for SwVideoCompositorHandle
impl Clone for SwVideoCompositorHandle
Source§fn clone(&self) -> SwVideoCompositorHandle
fn clone(&self) -> SwVideoCompositorHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SwVideoCompositorHandle
impl RefUnwindSafe for SwVideoCompositorHandle
impl Send for SwVideoCompositorHandle
impl Sync for SwVideoCompositorHandle
impl Unpin for SwVideoCompositorHandle
impl UnsafeUnpin for SwVideoCompositorHandle
impl UnwindSafe for SwVideoCompositorHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more