Trait vapoursynth::plugins::Filter
source · [−]pub trait Filter<'core>: Send + Sync {
fn video_info(
&self,
api: API,
core: CoreRef<'core>
) -> Vec<VideoInfo<'core>>;
fn get_frame_initial(
&self,
api: API,
core: CoreRef<'core>,
context: FrameContext<'_>,
n: usize
) -> Result<Option<FrameRef<'core>>, Error>;
fn get_frame(
&self,
api: API,
core: CoreRef<'core>,
context: FrameContext<'_>,
n: usize
) -> Result<FrameRef<'core>, Error>;
}Expand description
A filter interface.
Required Methods
Returns the parameters of this filter’s output node.
The returned vector should contain one entry for each node output index.
fn get_frame_initial(
&self,
api: API,
core: CoreRef<'core>,
context: FrameContext<'_>,
n: usize
) -> Result<Option<FrameRef<'core>>, Error>
fn get_frame_initial(
&self,
api: API,
core: CoreRef<'core>,
context: FrameContext<'_>,
n: usize
) -> Result<Option<FrameRef<'core>>, Error>
Requests the necessary frames from downstream nodes.
This is always the first function to get called for a given frame n.
In this function you should call request_frame_filter() on any input nodes that you need
and return None. If you do not need any input frames, you should generate the output
frame and return it here.
Do not call Node::get_frame() from within this function.
Returns the requested frame.
This is always the second function to get called for a given frame n. If the frame was
retrned from get_frame_initial(), this function is not called.
In this function you should call get_frame_filter() on the input nodes to retrieve the
frames you requested in get_frame_initial().
Do not call Node::get_frame() from within this function.