pub struct D3d11VideoCompositorHandle { /* private fields */ }d3d11 only.Expand description
A cheaply cloneable handle for adding and removing
D3d11VideoCompositor inputs — the GPU sibling of
crate::elements::VideoCompositorHandle, same shape and behavior.
Implementations§
Source§impl D3d11VideoCompositorHandle
impl D3d11VideoCompositorHandle
Sourcepub fn add_source(
&self,
name: impl Into<String>,
layer: VideoLayer,
) -> Result<Option<D3d11VideoCompositorInput>, D3d11VideoCompositorError>
pub fn add_source( &self, name: impl Into<String>, layer: VideoLayer, ) -> Result<Option<D3d11VideoCompositorInput>, D3d11VideoCompositorError>
Registers an input and returns its terminal Sink plus independent
runtime layer control — see
crate::elements::VideoCompositorHandle::add_source’s own docs
(identical contract: reusing name replaces the old registration,
old sinks/layer handles become harmlessly stale).
Sourcepub fn add_layer(
&self,
name: impl Into<String>,
layer: VideoLayer,
) -> Result<Option<D3d11VideoLayerHandle>, D3d11VideoCompositorError>
pub fn add_layer( &self, name: impl Into<String>, layer: VideoLayer, ) -> Result<Option<D3d11VideoLayerHandle>, D3d11VideoCompositorError>
Registers an input and returns only its layer handle — no Sink
at all — for a caller that drives this input’s frames directly via
D3d11VideoLayerHandle::set_frame instead of wiring a Pipeline
branch into it (e.g. crate::elements::TextLayer). Same
replace-on-reuse contract as Self::add_source.
pub fn remove_source(&self, name: &str)
pub fn source_count(&self) -> usize
Sourcepub fn add_text_layer(
&self,
name: impl Into<String>,
text_layer: TextLayer,
) -> Result<Option<D3d11TextLayerHandle>, D3d11TextLayerError>
pub fn add_text_layer( &self, name: impl Into<String>, text_layer: TextLayer, ) -> Result<Option<D3d11TextLayerHandle>, D3d11TextLayerError>
Registers a new text layer and returns a D3d11TextLayerHandle
ready for D3d11TextLayerHandle::set_text — the text-specific
sibling of Self::add_layer (which stays generic, unaware of
text), taking a TextLayer the same way add_source takes a
VideoLayer. Always uses this compositor’s own device
internally, so unlike a hand-assembled add_layer +
separately-supplied device there’s no way to accidentally construct
a D3d11TextLayerHandle against the wrong device — the one class
of bug a caller-supplied device would allow. Returns None if the
compositor has already been dropped, matching Self::add_layer’s
own contract.
Trait Implementations§
Source§impl Clone for D3d11VideoCompositorHandle
impl Clone for D3d11VideoCompositorHandle
Source§fn clone(&self) -> D3d11VideoCompositorHandle
fn clone(&self) -> D3d11VideoCompositorHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more