Struct rsmpeg::avcodec::AVPacket

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

Implementations§

source§

impl AVPacket

source

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

source

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

source

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

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

source§

impl AVPacket

source

pub fn set_pts(&mut self, pts: i64)

source

pub fn set_dts(&mut self, dts: i64)

source

pub fn set_stream_index(&mut self, stream_index: i32)

source

pub fn set_flags(&mut self, flags: i32)

source

pub fn set_duration(&mut self, duration: i64)

source

pub fn set_pos(&mut self, pos: i64)

source§

impl AVPacket

source

pub fn new() -> Self

Create an AVPacket and set its fields to default values.

source

pub fn rescale_ts(&mut self, from: AVRational, to: AVRational)

Convert valid timing fields (timestamps / durations) in a packet from one timebase to another. Timestamps with unknown values (AV_NOPTS_VALUE) will be ignored.

Trait Implementations§

source§

impl Debug for AVPacket

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AVPacket

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Deref for AVPacket

§

type Target = AVPacket

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl Drop for AVPacket

source§

fn drop(&mut self)

Free the packet, if the packet is reference counted, it will be unreferenced first.

source§

impl UnsafeDerefMut for AVPacket

source§

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

Mutably dereferences the value, unsafely. Read more
source§

impl Send for AVPacket

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.