pub struct Packet {
pub stream_index: usize,
pub pts: Option<i64>,
pub dts: Option<i64>,
pub duration: i64,
pub time_base: Rational,
pub data: Vec<u8>,
pub flags: PacketFlags,
}Expand description
A compressed packet belonging to a single stream.
Fields§
§stream_index: usizeIndex of the stream this packet belongs to within its container.
pts: Option<i64>Presentation timestamp, in the stream’s time_base units. None if unset.
dts: Option<i64>Decode timestamp, in the stream’s time_base units. None if unset.
duration: i64Duration of this packet, in time_base units (0 if unknown).
time_base: RationalThe stream time base these timestamps are expressed in.
data: Vec<u8>The compressed payload.
flags: PacketFlagsPacket flags (keyframe, …).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Packet
impl RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl UnsafeUnpin 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