Struct ffmpeg::avcodec::AvPixelFormat
source · pub struct AvPixelFormat(c_int);
Expand description
Simple wrapper over AVPixelFormat
that provides helpful methods.
Tuple Fields§
§0: c_int
Implementations§
source§impl AvPixelFormat
impl AvPixelFormat
sourcepub fn pix_fmt(&self) -> c_int
pub fn pix_fmt(&self) -> c_int
Return the avcodec profile id, which can be matched against AV_PIX_FMT_*.
Note that this is not the same as a fourcc.
sourcepub fn fourcc(&self) -> [u8; 4]
pub fn fourcc(&self) -> [u8; 4]
Return the fourcc of the pixel format, or a series of zeros if its fourcc is unknown.
sourcepub fn line_size(&self, width: u32, plane: usize) -> Result<usize, AvError>
pub fn line_size(&self, width: u32, plane: usize) -> Result<usize, AvError>
Given the width and plane index, returns the line size (data pointer increment per row) in bytes.
sourcepub fn plane_sizes<I: IntoIterator<Item = u32>>(
&self,
linesizes: I,
height: u32
) -> Result<Vec<usize>, AvError>
pub fn plane_sizes<I: IntoIterator<Item = u32>>( &self, linesizes: I, height: u32 ) -> Result<Vec<usize>, AvError>
Given an iterator of line sizes and height, return the size required for each plane’s buffer in bytes.
Trait Implementations§
source§impl Clone for AvPixelFormat
impl Clone for AvPixelFormat
source§fn clone(&self) -> AvPixelFormat
fn clone(&self) -> AvPixelFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AvPixelFormat
impl Debug for AvPixelFormat
source§impl Display for AvPixelFormat
impl Display for AvPixelFormat
source§impl TryFrom<i32> for AvPixelFormat
impl TryFrom<i32> for AvPixelFormat
impl Copy for AvPixelFormat
Auto Trait Implementations§
impl RefUnwindSafe for AvPixelFormat
impl Send for AvPixelFormat
impl Sync for AvPixelFormat
impl Unpin for AvPixelFormat
impl UnwindSafe for AvPixelFormat
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