pub struct MultiInputNode { /* private fields */ }Expand description
A node with a configurable number of inputs and outputs.
Used for fan-in topologies where multiple upstream outputs are combined.
Implementations§
Source§impl MultiInputNode
impl MultiInputNode
Sourcepub fn new(inputs: u32, outputs: u32, name: impl Into<String>) -> Self
pub fn new(inputs: u32, outputs: u32, name: impl Into<String>) -> Self
Create a new multi-input node.
All ports are typed as Any (video or audio).
Sourcepub fn input_count(&self) -> usize
pub fn input_count(&self) -> usize
Return the number of input ports.
Sourcepub fn output_count(&self) -> usize
pub fn output_count(&self) -> usize
Return the number of output ports.
Trait Implementations§
Source§impl Node for MultiInputNode
impl Node for MultiInputNode
Source§fn outputs(&self) -> &[OutputPort]
fn outputs(&self) -> &[OutputPort]
Get the node’s output ports.
Source§fn process(
&mut self,
input: Option<FilterFrame>,
) -> GraphResult<Option<FilterFrame>>
fn process( &mut self, input: Option<FilterFrame>, ) -> GraphResult<Option<FilterFrame>>
Process available input and produce output. Read more
Source§fn reset(&mut self) -> GraphResult<()>
fn reset(&mut self) -> GraphResult<()>
Reset the node to initial state.
Source§fn initialize(&mut self) -> GraphResult<()>
fn initialize(&mut self) -> GraphResult<()>
Initialize the node before processing starts.
Source§fn flush(&mut self) -> GraphResult<Vec<FilterFrame>>
fn flush(&mut self) -> GraphResult<Vec<FilterFrame>>
Flush any buffered data.
Source§fn output_port(&self, id: PortId) -> Option<&OutputPort>
fn output_port(&self, id: PortId) -> Option<&OutputPort>
Get output port by ID.
Source§fn accepts_input(&self, port_type: PortType) -> bool
fn accepts_input(&self, port_type: PortType) -> bool
Check if node accepts the given port type as input.
Source§fn produces_output(&self, port_type: PortType) -> bool
fn produces_output(&self, port_type: PortType) -> bool
Check if node produces the given port type as output.
Auto Trait Implementations§
impl Freeze for MultiInputNode
impl RefUnwindSafe for MultiInputNode
impl Send for MultiInputNode
impl Sync for MultiInputNode
impl Unpin for MultiInputNode
impl UnsafeUnpin for MultiInputNode
impl UnwindSafe for MultiInputNode
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more