pub trait AvBufferSource: Send {
    // Required methods
    fn as_ptr(&self) -> *const u8;
    fn len(&self) -> usize;
    fn is_empty(&self) -> bool;

    // Provided method
    fn as_mut_ptr(&mut self) -> *mut u8 { ... }
}
Expand description

Trait for types that can be used as data provider for a AVBuffer.

AVBuffer is an owned buffer type, so all the type needs to do is being able to provide a stable pointer to its own data as well as its length. Implementors need to be sendable across threads because avcodec is allowed to use threads in its codec implementations.

Required Methods§

source

fn as_ptr(&self) -> *const u8

source

fn len(&self) -> usize

source

fn is_empty(&self) -> bool

Provided Methods§

source

fn as_mut_ptr(&mut self) -> *mut u8

Implementors§