Skip to main content

RawVideo

Struct RawVideo 

Source
pub struct RawVideo<'a> { /* private fields */ }
Expand description

Asynchronous video operations borrowed from a Sender through Sender::split.

This view is Send, but neither Sync nor Clone. Dropping it leaves pending frames with the sender; its next submission, reclamation or drop synchronizes them.

Implementations§

Source§

impl RawVideo<'_>

Source

pub fn submit_video( &mut self, frame: VideoFrame, ) -> Result<Option<VideoFrame>, Rejected<VideoFrame>>

Submit owned video; see Sender::submit_video for ownership and pacing.

§Errors

Returns the unsent frame with Error::UnsupportedCapability when its pixel format is unavailable. Pending video is unchanged.

Source

pub fn submit_video_copy( &mut self, frame: &(impl VideoSource + ?Sized), ) -> Result<()>

Copy and submit video; see Sender::submit_video_copy for reuse and pacing.

§Errors

Returns Error::UnsupportedCapability when the pixel format is unavailable, before copying or changing pending video.

Source

pub fn reclaim_video(&mut self) -> Option<VideoFrame>

Drain and recover the final frame; see Sender::reclaim_video.

Trait Implementations§

Source§

impl Debug for RawVideo<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !Sync for RawVideo<'a>

§

impl<'a> Freeze for RawVideo<'a>

§

impl<'a> RefUnwindSafe for RawVideo<'a>

§

impl<'a> Send for RawVideo<'a>

§

impl<'a> Unpin for RawVideo<'a>

§

impl<'a> UnsafeUnpin for RawVideo<'a>

§

impl<'a> UnwindSafe for RawVideo<'a>

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.