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<'_>
impl RawVideo<'_>
Sourcepub fn submit_video(
&mut self,
frame: VideoFrame,
) -> Result<Option<VideoFrame>, Rejected<VideoFrame>>
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.
Sourcepub fn submit_video_copy(
&mut self,
frame: &(impl VideoSource + ?Sized),
) -> Result<()>
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.
Sourcepub fn reclaim_video(&mut self) -> Option<VideoFrame>
pub fn reclaim_video(&mut self) -> Option<VideoFrame>
Drain and recover the final frame; see Sender::reclaim_video.
Trait Implementations§
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> 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