pub struct Packet {
pub track: TrackId,
pub pts: i64,
pub dts: i64,
pub duration: i64,
pub keyframe: bool,
pub data: Bytes,
pub discard: (u32, u32),
}Expand description
One compressed frame of one track.
Fields§
§track: TrackIdThe track it belongs to.
pts: i64Presentation time in the track’s timescale, after edits; negative for priming and pre-roll.
dts: i64Decode time in the track’s timescale.
duration: i64Duration in the track’s timescale; 0 when unknown.
keyframe: boolDecodable on its own (a sync sample).
data: BytesThe frame, as the codec stores it (length-prefixed NAL units for avcC/hvcC tracks).
discard: (u32, u32)Decoded samples to drop from the start and end of this packet’s output (Matroska
DiscardPadding, the last AAC frame’s padding), as FFmpeg’s skip-samples side data.
Trait Implementations§
impl StructuralPartialEq for Packet
Auto Trait Implementations§
impl !Freeze for Packet
impl Forget for Packet
impl Move 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