pub struct Picture<'a> { /* private fields */ }

Implementations§

source§

impl<'a> Picture<'a>

source

pub unsafe fn wrap( ptr: *mut AVPicture, format: Pixel, width: u32, height: u32 ) -> Self

source

pub unsafe fn as_ptr(&self) -> *const AVPicture

source

pub unsafe fn as_mut_ptr(&mut self) -> *mut AVPicture

source§

impl<'a> Picture<'a>

source

pub fn size(format: Pixel, width: u32, height: u32) -> Result<usize, Error>

source

pub fn new(format: Pixel, width: u32, height: u32) -> Result<Self, Error>

source

pub fn format(&self) -> Pixel

source

pub fn width(&self) -> u32

source

pub fn height(&self) -> u32

source

pub fn layout(&self, out: &mut [u8]) -> Result<usize, Error>

source

pub fn layout_as( &self, format: Pixel, width: u32, height: u32, out: &mut [u8] ) -> Result<usize, Error>

source

pub fn crop( &self, source: &mut Picture<'_>, top: u32, left: u32 ) -> Result<(), Error>

source

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

source

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

source§

impl<'a> Picture<'a>

source

pub fn scaler( &self, width: u32, height: u32, flags: Flags ) -> Result<Context, Error>

source

pub fn converter(&self, format: Pixel) -> Result<Context, Error>

Trait Implementations§

source§

impl<'a> Clone for Picture<'a>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Drop for Picture<'a>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for Picture<'a>

§

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

§

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

§

impl<'a> Unpin for Picture<'a>

§

impl<'a> UnwindSafe for Picture<'a>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.