Struct rsmpeg::avutil::AVFrame[][src]

pub struct AVFrame { /* fields omitted */ }

Implementations

impl AVFrame[src]

pub fn as_ptr(&self) -> *const AVFrame[src]

pub fn as_mut_ptr(&mut self) -> *mut AVFrame[src]

pub unsafe fn set_ptr(&mut self, ptr: NonNull<AVFrame>)[src]

Safety

This function should only be called when the pointer is valid and the data it’s pointing to can be dropped.

pub unsafe fn from_raw(raw: NonNull<AVFrame>) -> Self[src]

Safety

This function should only be called when the pointer is valid and the data it’s pointing to can be dropped.

pub fn into_raw(self) -> NonNull<AVFrame>[src]

impl AVFrame[src]

pub fn set_width(&mut self, width: i32)[src]

pub fn set_height(&mut self, height: i32)[src]

pub fn set_pts(&mut self, pts: i64)[src]

pub fn set_pict_type(&mut self, pict_type: AVPictureType)[src]

pub fn set_nb_samples(&mut self, nb_samples: i32)[src]

pub fn set_format(&mut self, format: i32)[src]

pub fn set_channel_layout(&mut self, channel_layout: u64)[src]

pub fn set_sample_rate(&mut self, sample_rate: i32)[src]

impl AVFrame[src]

pub fn new() -> Self[src]

pub fn is_allocated(&self) -> bool[src]

Return true if the data and buffer of current frame is allocated.

pub fn alloc_buffer(&mut self) -> Result<()>[src]

Allocate new buffer(s) for audio or video data. The following fields must be set on frame before calling this function:

  • format (pixel format for video, sample format for audio)
  • width and height for video
  • nb_samples and channel_layout for audio

Return Error when the some of the frame settings are invalid, allocating buffer for an already initialized frame or allocation fails because of no memory.

pub fn data_mut(&mut self) -> &mut [*mut u8; 8][src]

pub fn linesize_mut(&mut self) -> &mut [c_int; 8][src]

pub unsafe fn fill_arrays(
    &mut self,
    src: *const u8,
    pix_fmt: AVPixelFormat,
    width: i32,
    height: i32
) -> Result<()>
[src]

Setup the data pointers and linesizes based on the specified image parameters and the provided array.

Safety

The buffer src points to cannot outlive the AVFrame. Recommend using fill_image_buffer() instead.

impl<'frame> AVFrame[src]

pub fn get_side_data(
    &'frame self,
    side_data_type: AVFrameSideDataType
) -> Option<AVFrameSideDataRef<'frame>>
[src]

pub fn get_motion_vectors(&'frame self) -> Option<&'frame [AVMotionVector]>[src]

Trait Implementations

impl Clone for AVFrame[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for AVFrame[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for AVFrame[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl Deref for AVFrame[src]

type Target = AVFrame

The resulting type after dereferencing.

fn deref(&self) -> &Self::Target[src]

Dereferences the value.

impl Drop for AVFrame[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.