Struct rsmpeg::avcodec::AVCodecParserContext
source · pub struct AVCodecParserContext { /* private fields */ }
Implementations§
source§impl AVCodecParserContext
impl AVCodecParserContext
pub fn as_ptr(&self) -> *const AVCodecParserContext
pub fn as_mut_ptr(&mut self) -> *mut AVCodecParserContext
sourcepub unsafe fn set_ptr(&mut self, ptr: NonNull<AVCodecParserContext>)
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.
sourcepub unsafe fn from_raw(raw: NonNull<AVCodecParserContext>) -> Self
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.
pub fn into_raw(self) -> NonNull<AVCodecParserContext>
source§impl AVCodecParserContext
impl AVCodecParserContext
sourcepub fn init(codec_id: AVCodecID) -> Option<Self>
pub fn init(codec_id: AVCodecID) -> Option<Self>
Allocate a AVCodecParserContext
with given AVCodecID
.
sourcepub fn parse_packet(
&mut self,
codec_context: &mut AVCodecContext,
packet: &mut AVPacket,
data: &[u8],
) -> Result<(bool, usize)>
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
impl Deref for AVCodecParserContext
source§impl Drop for AVCodecParserContext
impl Drop for AVCodecParserContext
impl Send for AVCodecParserContext
Auto Trait Implementations§
impl Freeze for AVCodecParserContext
impl RefUnwindSafe for AVCodecParserContext
impl !Sync for AVCodecParserContext
impl Unpin for AVCodecParserContext
impl UnwindSafe for AVCodecParserContext
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