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§
Sourcefn apply_state(&self, state: RString) -> bool
fn apply_state(&self, state: RString) -> bool
Apply the given state, return true if the state has been successfully applied
Sourcefn process_frame(
&self,
frame_context: ProcessFrameContext,
video_frames: RHashMap<VideoInputId, VideoFrameWithId>,
audio_frames: RHashMap<AudioInputId, AudioFrameWithId>,
black_frame: VideoFrameWithId,
silence_frame: AudioFrameWithId,
)
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".