[][src]Struct ac_ffmpeg::packet::PacketMut

pub struct PacketMut { /* fields omitted */ }

Packet with mutable data.

Implementations

impl PacketMut[src]

pub fn new(size: usize) -> Self[src]

Create a new packet of a given size. The time base of the packet will be in microseconds.

pub fn stream_index(&self) -> usize[src]

Get stream index.

pub fn with_stream_index(self, index: usize) -> Self[src]

Set stream index.

pub fn time_base(&self) -> TimeBase[src]

Get packet time base.

pub fn with_time_base(self, time_base: TimeBase) -> Self[src]

Set packet time base. (This will rescale the current timestamps into a given time base.)

pub fn pts(&self) -> Timestamp[src]

Get packet presentation timestamp.

pub fn with_pts(self, pts: Timestamp) -> Self[src]

Set packet presentation timestamp.

pub fn dts(&self) -> Timestamp[src]

Get packet decoding timestamp.

pub fn with_dts(self, dts: Timestamp) -> Self[src]

Set packet decoding timestamp.

pub fn is_key(&self) -> bool[src]

Check if the key flag is set.

pub fn with_key_flag(self, key: bool) -> Self[src]

Set or unset the key flag.

pub fn data(&self) -> &[u8][src]

Get packet data.

pub fn data_mut(&mut self) -> &mut [u8][src]

Get mutable reference to the packet data.

pub fn freeze(self) -> Packet[src]

Make the packet immutable.

Trait Implementations

impl Drop for PacketMut[src]

impl<T> From<T> for PacketMut where
    T: AsRef<[u8]>, 
[src]

impl Send for PacketMut[src]

impl Sync for PacketMut[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.