Struct ffmpeg::avcodec::DecoderContextBuilder
source · pub struct DecoderContextBuilder {
codec: *const AVCodec,
context: AvCodecContext,
}
Expand description
A builder to create a AvCodecContext
suitable for decoding.
Fields§
§codec: *const AVCodec
§context: AvCodecContext
Implementations§
source§impl DecoderContextBuilder
impl DecoderContextBuilder
sourcepub fn set_get_buffer_2(
&mut self,
get_buffer2: unsafe extern "C" fn(_: *mut AVCodecContext, _: *mut AVFrame, _: i32) -> i32,
opaque: *mut c_void
)
pub fn set_get_buffer_2( &mut self, get_buffer2: unsafe extern "C" fn(_: *mut AVCodecContext, _: *mut AVFrame, _: i32) -> i32, opaque: *mut c_void )
Set a custom callback that provides output buffers.
get_buffer2
is a function that decides which buffer is used to render a frame (see
libavcodec’s documentation for get_buffer2
for more details). If provided, this function
must be thread-safe.
opaque
is a pointer that will be passed as first argument to get_buffer2
when it is
called.
sourcepub fn build(self) -> Result<AvCodecContext, AvCodecOpenError>
pub fn build(self) -> Result<AvCodecContext, AvCodecOpenError>
Build a decoder AvCodecContext from the configured options.
Auto Trait Implementations§
impl RefUnwindSafe for DecoderContextBuilder
impl !Send for DecoderContextBuilder
impl !Sync for DecoderContextBuilder
impl Unpin for DecoderContextBuilder
impl UnwindSafe for DecoderContextBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more