Skip to main content

Node

Trait Node 

Source
pub trait Node: Send + Sync {
    // Required methods
    fn apply_state(&self, state: RString) -> bool;
    fn process_frame(
        &self,
        frame_context: ProcessFrameContext,
        video_frames: RHashMap<VideoInputId, VideoFrameWithId>,
        audio_frames: RHashMap<AudioInputId, AudioFrameWithId>,
        black_frame: VideoFrameWithId,
        silence_frame: AudioFrameWithId,
    );
}
Expand description

An initialized node.

Required Methods§

Source

fn apply_state(&self, state: RString) -> bool

Apply the given state, return true if the state has been successfully applied

Source

fn process_frame( &self, frame_context: ProcessFrameContext, video_frames: RHashMap<VideoInputId, VideoFrameWithId>, audio_frames: RHashMap<AudioInputId, AudioFrameWithId>, black_frame: VideoFrameWithId, silence_frame: AudioFrameWithId, )

Called when the node should produce a frame.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<'lt, _ErasedPtr> Node for Node_TO<'lt, _ErasedPtr>
where Self: Send + Sync, _ErasedPtr: AsPtr<PtrTarget = ()>,