Skip to main content

AVBufferRef

Struct AVBufferRef 

Source
pub struct AVBufferRef { /* private fields */ }

Implementations§

Source§

impl AVBufferRef

Source

pub fn as_ptr(&self) -> *const AVBufferRef

Source

pub fn as_mut_ptr(&mut self) -> *mut AVBufferRef

Source

pub unsafe fn set_ptr(&mut self, ptr: NonNull<AVBufferRef>)

§Safety

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

Source

pub unsafe fn from_raw(raw: NonNull<AVBufferRef>) -> Self

§Safety

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

Source

pub fn into_raw(self) -> NonNull<AVBufferRef>

Source§

impl AVBufferRef

Source

pub fn new(size: usize) -> Self

Allocate an AVBuffer of the given size using av_malloc().

Source

pub fn zeroed(size: usize) -> Self

Same as Self::new(), except the returned buffer will be initialized to zero.

Source

pub fn realloc(&mut self, size: usize)

Reallocate a given buffer.

buf will be unreferenced and a new reference with the required size will be written in its place.

Source

pub fn is_writable(&self) -> bool

Return true if the caller may write to the data referred to by buf (which is true if and only if buf is the only reference to the underlying AVBuffer). Return 0 otherwise.

Source

pub fn get_ref_count(&self) -> c_int

Get ref count of current AVBuffer.

Source

pub fn make_writable(&mut self)

Create a writable reference from a given buffer reference, avoiding data copy if possible.

self is either left untouched, or it is unreferenced and turned into new writable AVBufferRef.

Trait Implementations§

Source§

impl Clone for AVBufferRef

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Deref for AVBufferRef

Source§

type Target = AVBufferRef

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Drop for AVBufferRef

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Send for AVBufferRef

Source§

impl UnsafeDerefMut for AVBufferRef

Source§

unsafe fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value, unsafely. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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