pub struct AVBufferRef { /* private fields */ }Implementations§
Source§impl AVBufferRef
impl AVBufferRef
pub fn as_ptr(&self) -> *const AVBufferRef
pub fn as_mut_ptr(&mut self) -> *mut AVBufferRef
Sourcepub unsafe fn set_ptr(&mut self, ptr: NonNull<AVBufferRef>)
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.
Sourcepub unsafe fn from_raw(raw: NonNull<AVBufferRef>) -> Self
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.
pub fn into_raw(self) -> NonNull<AVBufferRef>
Source§impl AVBufferRef
impl AVBufferRef
Sourcepub fn zeroed(size: usize) -> Self
pub fn zeroed(size: usize) -> Self
Same as Self::new(), except the returned buffer will be initialized
to zero.
Sourcepub fn realloc(&mut self, size: usize)
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.
Sourcepub fn is_writable(&self) -> bool
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.
Sourcepub fn get_ref_count(&self) -> c_int
pub fn get_ref_count(&self) -> c_int
Get ref count of current AVBuffer.
Sourcepub fn make_writable(&mut self)
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.