pub struct PacketInfo {
pub stream_index: usize,
pub pts: Option<i64>,
pub dts: Option<i64>,
pub pts_duration: Option<Duration>,
pub size: usize,
pub is_keyframe: bool,
pub time_base: Rational,
}Expand description
Metadata for a single demuxed packet.
Fields§
§stream_index: usizeThe stream index this packet belongs to.
pts: Option<i64>Presentation timestamp (if available).
dts: Option<i64>Decoding timestamp (if available).
pts_duration: Option<Duration>Presentation timestamp converted to Duration using the stream’s
time base. None if no PTS is present.
size: usizePacket payload size in bytes.
is_keyframe: boolWhether this packet is a keyframe / sync point.
time_base: RationalThe stream’s time base numerator / denominator.
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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more