pub struct VideoFrame(/* private fields */);
Expand description
A video frame. Thin wrapper around GenericFrame
. Like a frame but has specific video properties.
Implementations§
Source§impl VideoFrame
impl VideoFrame
Sourcepub fn sample_aspect_ratio(&self) -> Rational
pub fn sample_aspect_ratio(&self) -> Rational
Returns the sample aspect ratio of the frame.
Sourcepub fn set_sample_aspect_ratio(
&mut self,
sample_aspect_ratio: impl Into<Rational>,
)
pub fn set_sample_aspect_ratio( &mut self, sample_aspect_ratio: impl Into<Rational>, )
Sets the sample aspect ratio of the frame.
Sourcepub const fn is_keyframe(&self) -> bool
pub const fn is_keyframe(&self) -> bool
Returns true if the frame is a keyframe.
Sourcepub const fn pict_type(&self) -> AVPictureType
pub const fn pict_type(&self) -> AVPictureType
Returns the picture type of the frame.
Sourcepub const fn set_pict_type(&mut self, pict_type: AVPictureType)
pub const fn set_pict_type(&mut self, pict_type: AVPictureType)
Sets the picture type of the frame.
Sourcepub fn data(&self, index: usize) -> Option<Const<'_, FrameData>>
pub fn data(&self, index: usize) -> Option<Const<'_, FrameData>>
Returns a reference to the data of the frame. By specifying the index of the plane.
Sourcepub fn data_mut(&mut self, index: usize) -> Option<Mut<'_, FrameData>>
pub fn data_mut(&mut self, index: usize) -> Option<Mut<'_, FrameData>>
Returns a mutable reference to the data of the frame. By specifying the index of the plane.
Sourcepub const fn format(&self) -> AVPixelFormat
pub const fn format(&self) -> AVPixelFormat
Get the pixel format of the frame.
Sourcepub fn builder() -> VideoFrameBuilder
pub fn builder() -> VideoFrameBuilder
Creates a new VideoFrame
Methods from Deref<Target = GenericFrame>§
Sourcepub fn pts(&self) -> Option<i64>
pub fn pts(&self) -> Option<i64>
Returns the presentation timestamp of the frame, in time_base
units.
Sourcepub fn set_pts(&mut self, pts: Option<i64>)
pub fn set_pts(&mut self, pts: Option<i64>)
Sets the presentation timestamp of the frame, in time_base
units.
Sourcepub fn set_duration(&mut self, duration: Option<i64>)
pub fn set_duration(&mut self, duration: Option<i64>)
Sets the duration of the frame, in time_base
units.
Sourcepub fn best_effort_timestamp(&self) -> Option<i64>
pub fn best_effort_timestamp(&self) -> Option<i64>
Returns the best effort timestamp of the frame, in time_base
units.
Sourcepub fn dts(&self) -> Option<i64>
pub fn dts(&self) -> Option<i64>
Returns the decoding timestamp of the frame, in time_base
units.
Sourcepub fn set_time_base(&mut self, time_base: impl Into<Rational>)
pub fn set_time_base(&mut self, time_base: impl Into<Rational>)
Sets the time base of the frame.
Trait Implementations§
Source§impl Clone for VideoFrame
impl Clone for VideoFrame
Source§fn clone(&self) -> VideoFrame
fn clone(&self) -> VideoFrame
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more