Struct rsmpeg::avcodec::AVCodecParserContext

source ·
pub struct AVCodecParserContext { /* private fields */ }

Implementations§

source§

impl AVCodecParserContext

source

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

source

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

source

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

§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<AVCodecParserContext>) -> 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<AVCodecParserContext>

source§

impl AVCodecParserContext

source

pub fn init(codec_id: AVCodecID) -> Option<Self>

Allocate a AVCodecParserContext with given AVCodecID.

source

pub fn parse_packet( &mut self, codec_context: &mut AVCodecContext, packet: &mut AVPacket, data: &[u8], ) -> Result<(bool, usize)>

Parse a packet.

Return Err(_) On failure, bool field of returned tuple means if packet is ready, usize field of returned tuple means the offset of the data being parsed.

Note: if data.len() exceeds i32::MAX, this function returns RsmpegError::TryFromIntError.

Trait Implementations§

source§

impl Deref for AVCodecParserContext

§

type Target = AVCodecParserContext

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl Drop for AVCodecParserContext

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl UnsafeDerefMut for AVCodecParserContext

source§

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

Mutably dereferences the value, unsafely. Read more
source§

impl Send for AVCodecParserContext

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> 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<T, U> TryFrom<U> for T
where U: Into<T>,

§

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

§

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.