[][src]Struct vapoursynth::node::Node

pub struct Node<'core> { /* fields omitted */ }

A reference to a node in the constructed filter graph.

Methods

impl<'core> Node<'core>[src]

pub fn info(&self) -> VideoInfo<'core>[src]

Returns the video info associated with this Node.

pub fn get_frame<'error>(
    &self,
    n: usize
) -> Result<FrameRef<'core>, GetFrameError<'error>>
[src]

Generates a frame directly.

The 'error lifetime is unbounded because this function always returns owned data.

Panics

Panics is n is greater than i32::max_value().

pub fn get_frame_async<F>(&self, n: usize, callback: F) where
    F: FnOnce(Result<FrameRef<'core>, GetFrameError>, usize, Node<'core>) + Send + 'core, 
[src]

Requests the generation of a frame. When the frame is ready, a user-provided function is called.

If multiple frames were requested, they can be returned in any order.

The callback arguments are:

  • the generated frame or an error message if the generation failed,
  • the frame number (equal to n),
  • the node that generated the frame (the same as self).

If the callback panics, the process is aborted.

Panics

Panics is n is greater than i32::max_value().

pub fn request_frame_filter(&self, context: FrameContext, n: usize)[src]

Requests a frame from a node and returns immediately.

This is only used in filters' "get frame" functions.

A filter usually calls this function from get_frame_initial(). The requested frame can then be retrieved using get_frame_filter() from within filter's get_frame() function.

It is safe to request a frame more than once. An unimportant consequence of requesting a frame more than once is that the filter's get_frame() function may be called more than once for the same frame.

It is best to request frames in ascending order, i.e. n, n+1, n+2, etc.

Panics

Panics is n is greater than i32::max_value().

pub fn get_frame_filter(
    &self,
    context: FrameContext,
    n: usize
) -> Option<FrameRef<'core>>
[src]

Retrieves a frame that was previously requested with request_frame_filter().

A filter usually calls this function from get_frame(). It is safe to retrieve a frame more than once.

Panics

Panics is n is greater than i32::max_value().

Trait Implementations

impl<'map, 'elem: 'map> Value<'map, 'elem> for Node<'elem>[src]

impl<'map, 'elem: 'map> FilterArgument<'map, 'elem> for Node<'elem>[src]

impl<'core> Send for Node<'core>[src]

impl<'core> Sync for Node<'core>[src]

impl<'core> Drop for Node<'core>[src]

impl<'core> Clone for Node<'core>[src]

impl<'core> Debug for Node<'core>[src]

Auto Trait Implementations

impl<'core> Unpin for Node<'core>

impl<'core> UnwindSafe for Node<'core>

impl<'core> RefUnwindSafe for Node<'core>

Blanket Implementations

impl<'map, 'elem, T> FilterParameter<'map, 'elem> for T where
    'elem: 'map,
    T: FilterArgument<'map, 'elem>, 
[src]

type Argument = T

The underlying argument type for this parameter type.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]