pub struct Packet(/* private fields */);
Expand description
A packet is a wrapper around an AVPacket
.
Implementations§
Source§impl Packet
impl Packet
Sourcepub fn new() -> Result<Self, FfmpegError>
pub fn new() -> Result<Self, FfmpegError>
Creates a new Packet
.
Sourcepub const fn as_mut_ptr(&mut self) -> *mut AVPacket
pub const fn as_mut_ptr(&mut self) -> *mut AVPacket
Returns a mutable pointer to the packet.
Sourcepub const fn stream_index(&self) -> i32
pub const fn stream_index(&self) -> i32
Returns the stream index of the packet.
Sourcepub const fn set_stream_index(&mut self, stream_index: i32)
pub const fn set_stream_index(&mut self, stream_index: i32)
Sets the stream index of the packet.
Sourcepub const fn set_pts(&mut self, pts: Option<i64>)
pub const fn set_pts(&mut self, pts: Option<i64>)
Sets the presentation timestamp of the packet.
Sourcepub const fn set_duration(&mut self, duration: Option<i64>)
pub const fn set_duration(&mut self, duration: Option<i64>)
Sets the duration of the packet.
Sourcepub fn convert_timebase(
&mut self,
from: impl Into<Rational>,
to: impl Into<Rational>,
)
pub fn convert_timebase( &mut self, from: impl Into<Rational>, to: impl Into<Rational>, )
Converts the timebase of the packet.
Sourcepub fn is_corrupt(&self) -> bool
pub fn is_corrupt(&self) -> bool
Returns whether the packet is corrupt.
Sourcepub fn is_discard(&self) -> bool
pub fn is_discard(&self) -> bool
Returns whether the packet should be discarded.
Sourcepub fn is_trusted(&self) -> bool
pub fn is_trusted(&self) -> bool
Returns whether the packet is trusted.
Sourcepub fn is_disposable(&self) -> bool
pub fn is_disposable(&self) -> bool
Returns whether the packet is disposable.
Sourcepub const fn flags(&self) -> AVPktFlags
pub const fn flags(&self) -> AVPktFlags
Returns the flags of the packet.
Trait Implementations§
impl Send for Packet
Safety: Packet
is safe to send between threads.
Auto Trait Implementations§
impl Freeze for Packet
impl RefUnwindSafe for Packet
impl !Sync for Packet
impl Unpin for Packet
impl UnwindSafe for Packet
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