pub struct VideoFrameMut { /* private fields */ }
Expand description
A video frame with mutable data.
Implementations§
Source§impl VideoFrameMut
impl VideoFrameMut
Sourcepub fn black(pixel_format: PixelFormat, width: usize, height: usize) -> Self
pub fn black(pixel_format: PixelFormat, width: usize, height: usize) -> Self
Create a black video frame. The time base of the frame will be in microseconds.
Sourcepub fn pixel_format(&self) -> PixelFormat
pub fn pixel_format(&self) -> PixelFormat
Get frame pixel format.
Sourcepub fn with_time_base(self, time_base: TimeBase) -> Self
pub fn with_time_base(self, time_base: TimeBase) -> Self
Set frame time base. (This will rescale the current timestamp into a given time base.)
Sourcepub fn picture_type(&self) -> PictureType
pub fn picture_type(&self) -> PictureType
Get picture type
Sourcepub fn with_picture_type(self, picture_type: PictureType) -> Self
pub fn with_picture_type(self, picture_type: PictureType) -> Self
Set picture type
Sourcepub fn planes_mut(&mut self) -> PlanesMut<'_>
pub fn planes_mut(&mut self) -> PlanesMut<'_>
Get mutable picture planes.
Sourcepub fn freeze(self) -> VideoFrame
pub fn freeze(self) -> VideoFrame
Make the frame immutable.
Trait Implementations§
Source§impl Drop for VideoFrameMut
impl Drop for VideoFrameMut
Source§impl<'a> From<&'a VideoFrameMut> for Planes<'a>
impl<'a> From<&'a VideoFrameMut> for Planes<'a>
Source§fn from(frame: &'a VideoFrameMut) -> Self
fn from(frame: &'a VideoFrameMut) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a mut VideoFrameMut> for PlanesMut<'a>
impl<'a> From<&'a mut VideoFrameMut> for PlanesMut<'a>
Source§fn from(frame: &'a mut VideoFrameMut) -> Self
fn from(frame: &'a mut VideoFrameMut) -> Self
Converts to this type from the input type.
impl Send for VideoFrameMut
impl Sync for VideoFrameMut
Auto Trait Implementations§
impl Freeze for VideoFrameMut
impl RefUnwindSafe for VideoFrameMut
impl Unpin for VideoFrameMut
impl UnwindSafe for VideoFrameMut
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