pub struct AvFrame(*mut AVFrame);
Expand description
An owned AVFrame, i.e. one decoded frame from libavcodec that can be converted into a destination buffer.
Tuple Fields§
§0: *mut AVFrame
Implementations§
source§impl AvFrame
impl AvFrame
sourcepub fn new() -> Result<Self, AvFrameError>
pub fn new() -> Result<Self, AvFrameError>
Create a new AvFrame. The frame’s parameters and backing memory will be assigned when it is decoded into.
sourcepub fn builder() -> Result<AvFrameBuilder, AvFrameError>
pub fn builder() -> Result<AvFrameBuilder, AvFrameError>
Create a new AvFrame builder that allows setting the frame’s parameters and backing memory through its methods.
sourcepub fn dimensions(&self) -> Dimensions
pub fn dimensions(&self) -> Dimensions
Return the frame’s width and height.
sourcepub fn format(&self) -> AvPixelFormat
pub fn format(&self) -> AvPixelFormat
Return the frame’s pixel format.
sourcepub fn set_pict_type(&mut self, ty: c_uint)
pub fn set_pict_type(&mut self, ty: c_uint)
Set the picture type (I-frame, P-frame etc.) on this frame.
sourcepub fn is_writable(&self) -> bool
pub fn is_writable(&self) -> bool
Query if this AvFrame is writable, i.e. it is refcounted and the refcounts are 1.
sourcepub fn make_writable(&mut self) -> Result<(), AvFrameError>
pub fn make_writable(&mut self) -> Result<(), AvFrameError>
If the frame is not writable already (see is_writable
), make a copy of its buffer to
make it writable.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for AvFrame
impl !Send for AvFrame
impl !Sync for AvFrame
impl Unpin for AvFrame
impl UnwindSafe for AvFrame
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