ac_ffmpeg::codec::video::frame

Struct Plane

Source
pub struct Plane<'a> { /* private fields */ }
Expand description

Picture plane (i.e. a planar array of pixel components).

Implementations§

Source§

impl Plane<'_>

Source

pub fn data(&self) -> &[u8]

Get plane data.

Source

pub fn data_mut(&mut self) -> &mut [u8]

Get mutable plane data.

Source

pub fn line(&self, index: usize) -> Option<&[u8]>

Get a single line.

Source

pub fn line_mut(&mut self, index: usize) -> Option<&mut [u8]>

Get a single mutable line.

Source

pub fn lines(&self) -> LinesIter<'_>

Get an iterator over all lines.

Source

pub fn lines_mut(&mut self) -> LinesIterMut<'_>

Get an iterator over all mutable lines.

Source

pub fn line_size(&self) -> usize

Get line size (note: the line size doesn’t necessarily need to be equal to picture width).

Source

pub fn line_count(&self) -> usize

Get number of lines (note: the number of lines doesn’t necessarily need to be equal to to picture height).

Auto Trait Implementations§

§

impl<'a> Freeze for Plane<'a>

§

impl<'a> RefUnwindSafe for Plane<'a>

§

impl<'a> !Send for Plane<'a>

§

impl<'a> !Sync for Plane<'a>

§

impl<'a> Unpin for Plane<'a>

§

impl<'a> UnwindSafe for Plane<'a>

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.