Struct rsmpeg::swscale::SwsContext[][src]

pub struct SwsContext { /* fields omitted */ }

Implementations

impl SwsContext[src]

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

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

pub unsafe fn set_ptr(&mut self, ptr: NonNull<SwsContext>)[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<SwsContext>) -> 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<SwsContext>[src]

impl SwsContext[src]

pub fn get_context(
    src_w: i32,
    src_h: i32,
    src_format: AVPixelFormat,
    dst_w: i32,
    dst_h: i32,
    dst_format: AVPixelFormat,
    flags: u32
) -> Option<Self>
[src]

Return None when input is invalid. Parameter flags can be rsmpeg::ffi::SWS_FAST_BILINEAR etc.

pub unsafe fn scale(
    &mut self,
    src_slice: *const *const u8,
    src_stride: *const i32,
    src_slice_y: i32,
    src_slice_h: i32,
    dst: *const *mut u8,
    dst_stride: *const i32
) -> Result<()>
[src]

Scale the image slice in src_slice and put the resulting scaled slice in the image in dst. A slice is a sequence of consecutive rows in an image.

Slices have to be provided in sequential order, either in top-bottom or bottom-top order. If slices are provided in non-sequential order the behavior of the function is undefined.

Safety

The src_slice should be valid with the src_stride, src_slice_y and src_slice_h. The dst should be valid with the dst_stride.

pub fn scale_frame(
    &mut self,
    src_frame: &AVFrame,
    src_slice_y: i32,
    src_slice_h: i32,
    dst_frame: &mut AVFrame
) -> Result<()>
[src]

A wrapper of Self::scale, check it’s documentation.

Trait Implementations

impl Deref for SwsContext[src]

type Target = SwsContext

The resulting type after dereferencing.

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

Dereferences the value.

impl Drop for SwsContext[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

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