Skip to main content

FilteredRawVideoFrameSource

Struct FilteredRawVideoFrameSource 

Source
pub struct FilteredRawVideoFrameSource<S> { /* private fields */ }
Expand description

Raw-frame source wrapper that applies a frame-filter chain on demand.

The wrapper owns only the current input frame and any output frames already produced by the filters but not yet consumed. It does not materialize the whole filtered stream, which keeps long native streams and future WASM capture flows bounded in memory.

Implementations§

Source§

impl<S> FilteredRawVideoFrameSource<S>

Source

pub fn new( source: S, input_info: FrameInfo, output_info: FrameInfo, filters: Vec<Box<dyn Filter>>, ) -> Self

Create a filtered raw-video source from concrete filter objects.

Source

pub const fn input_info(&self) -> FrameInfo

Frame metadata expected by the wrapped source before filters run.

Source

pub const fn output_info(&self) -> FrameInfo

Frame metadata emitted after filters run.

Source

pub fn into_inner(self) -> S

Consume this adapter and return the wrapped raw-frame source.

Trait Implementations§

Source§

impl<S> RawVideoFrameSource for FilteredRawVideoFrameSource<S>

Source§

fn read_frame(&mut self, output: &mut [u8]) -> Result<bool>

Fill frame with exactly one raw frame. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.