pub struct Node<'core> { /* private fields */ }
Expand description
A reference to a node in the constructed filter graph.
Implementations§
source§impl<'core> Node<'core>
impl<'core> Node<'core>
sourcepub fn video_info(&self) -> Option<VideoInfo>
pub fn video_info(&self) -> Option<VideoInfo>
Returns the video info associated with this Node
.
sourcepub fn audio_info(&self) -> Option<AudioInfo>
pub fn audio_info(&self) -> Option<AudioInfo>
Returns the audio info associated with this Node
.
sourcepub fn get_frame<'error>(
&self,
n: usize
) -> Result<FrameRef<'core>, GetFrameError<'error>>
pub fn get_frame<'error>( &self, n: usize ) -> Result<FrameRef<'core>, GetFrameError<'error>>
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()
.
sourcepub fn get_frame_async<F>(&self, n: usize, callback: F)where
F: FnOnce(Result<FrameRef<'core>, GetFrameError<'_>>, usize, Node<'core>) + Send + 'core,
pub fn get_frame_async<F>(&self, n: usize, callback: F)where F: FnOnce(Result<FrameRef<'core>, GetFrameError<'_>>, usize, Node<'core>) + Send + 'core,
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 media_type(&self) -> MediaType
Trait Implementations§
source§impl<'map, 'elem: 'map> ValueNotArray<'map, 'elem> for Node<'elem>
impl<'map, 'elem: 'map> ValueNotArray<'map, 'elem> for Node<'elem>
impl<'core> Send for Node<'core>
impl<'core> Sync for Node<'core>
Auto Trait Implementations§
impl<'core> RefUnwindSafe for Node<'core>
impl<'core> Unpin for Node<'core>
impl<'core> UnwindSafe for Node<'core>
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