pub struct VideoFrame { /* private fields */ }
Expand description
A video frame with immutable data.
Implementations§
source§impl VideoFrame
impl VideoFrame
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 best_effort_timestamp(&self) -> Timestamp
pub fn best_effort_timestamp(&self) -> Timestamp
Get timestamp estimated using various heuristics.
sourcepub fn picture_type(&self) -> PictureType
pub fn picture_type(&self) -> PictureType
Get picture type
sourcepub fn try_into_mut(self) -> Result<VideoFrameMut, VideoFrame>
pub fn try_into_mut(self) -> Result<VideoFrameMut, VideoFrame>
Try to make this frame mutable. Returns VideoFrameMut if it can be made into mutable without copying the data, otherwise returns VideoFrame.
sourcepub fn into_mut(self) -> VideoFrameMut
pub fn into_mut(self) -> VideoFrameMut
Make this frame mutable. This will copy the data if it is not already mutable.
Trait Implementations§
source§impl Clone for VideoFrame
impl Clone for VideoFrame
source§impl Drop for VideoFrame
impl Drop for VideoFrame
source§impl<'a> From<&'a VideoFrame> for Planes<'a>
impl<'a> From<&'a VideoFrame> for Planes<'a>
source§fn from(frame: &'a VideoFrame) -> Self
fn from(frame: &'a VideoFrame) -> Self
Converts to this type from the input type.