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.