ac_ffmpeg::codec::video::frame

Struct VideoFrameMut

Source
pub struct VideoFrameMut { /* private fields */ }
Expand description

A video frame with mutable data.

Implementations§

Source§

impl VideoFrameMut

Source

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.

Source

pub fn pixel_format(&self) -> PixelFormat

Get frame pixel format.

Source

pub fn width(&self) -> usize

Get frame width.

Source

pub fn height(&self) -> usize

Get frame height.

Source

pub fn time_base(&self) -> TimeBase

Get frame time base.

Source

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.)

Source

pub fn pts(&self) -> Timestamp

Get presentation timestamp.

Source

pub fn with_pts(self, pts: Timestamp) -> Self

Set presentation timestamp.

Source

pub fn picture_type(&self) -> PictureType

Get picture type

Source

pub fn with_picture_type(self, picture_type: PictureType) -> Self

Set picture type

Source

pub fn planes(&self) -> Planes<'_>

Get picture planes.

Source

pub fn planes_mut(&mut self) -> PlanesMut<'_>

Get mutable picture planes.

Source

pub fn freeze(self) -> VideoFrame

Make the frame immutable.

Trait Implementations§

Source§

impl Drop for VideoFrameMut

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'a> From<&'a VideoFrameMut> for Planes<'a>

Source§

fn from(frame: &'a VideoFrameMut) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut VideoFrameMut> for PlanesMut<'a>

Source§

fn from(frame: &'a mut VideoFrameMut) -> Self

Converts to this type from the input type.
Source§

impl Send for VideoFrameMut

Source§

impl Sync for VideoFrameMut

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.