pub struct PacketInfo { /* private fields */ }Expand description
Read-only metadata extracted from a single demuxed packet.
PacketInfo contains scalar values copied out of an AVPacket together with
stream-type flags looked up at read time, so it has no lifetime ties to the
scanner. It is cheap to clone and store.
§Defensive fields
stream_index and size are clamped to non-negative values before storage.
FFmpeg’s internal asserts guarantee valid ranges in practice, so the clamping
is purely defensive and not expected to trigger.
Implementations§
Source§impl PacketInfo
impl PacketInfo
Sourcepub fn stream_index(&self) -> usize
pub fn stream_index(&self) -> usize
The index of the stream this packet belongs to.
Sourcepub fn pts(&self) -> Option<i64>
pub fn pts(&self) -> Option<i64>
Presentation timestamp in stream time-base units, if available.
Sourcepub fn dts(&self) -> Option<i64>
pub fn dts(&self) -> Option<i64>
Decompression timestamp in stream time-base units, if available.
Sourcepub fn is_keyframe(&self) -> bool
pub fn is_keyframe(&self) -> bool
Whether this packet contains a keyframe.
Sourcepub fn is_corrupt(&self) -> bool
pub fn is_corrupt(&self) -> bool
Whether this packet is flagged as corrupt.
Trait Implementations§
Source§impl Clone for PacketInfo
impl Clone for PacketInfo
Source§fn clone(&self) -> PacketInfo
fn clone(&self) -> PacketInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PacketInfo
impl RefUnwindSafe for PacketInfo
impl Send for PacketInfo
impl Sync for PacketInfo
impl Unpin for PacketInfo
impl UnwindSafe for PacketInfo
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