pub struct Depacketizer {
codec: Codec,
au: BytesMut,
au_ts: Option<u32>,
au_ts_ext: u64,
ts_base: Option<u32>,
ts_wraps: u64,
keyframe: bool,
fu: Option<BytesMut>,
last_seq: Option<u16>,
lost: u16,
}Fields§
§codec: Codec§au: BytesMut§au_ts: Option<u32>§au_ts_ext: u64au_ts unwrapped past the 32-bit rollover (~13 h at 90 kHz), relative
to the first packet — the source’s sampling timeline, which the pilot
paces presentation on.
ts_base: Option<u32>§ts_wraps: u64§keyframe: bool§fu: Option<BytesMut>§last_seq: Option<u16>§lost: u16Implementations§
Source§impl Depacketizer
impl Depacketizer
pub fn new(codec: Codec) -> Self
Sourcepub fn push(&mut self, pkt: &[u8]) -> Option<VideoAu>
pub fn push(&mut self, pkt: &[u8]) -> Option<VideoAu>
Feed one RTP packet; returns a complete access unit when one closes.
fn push_nal(&mut self, nal: &[u8])
Sourcefn push_payload_h264(&mut self, payload: &[u8])
fn push_payload_h264(&mut self, payload: &[u8])
RFC 6184: single NAL unit, STAP-A aggregation, FU-A fragmentation.
Sourcefn push_payload_h265(&mut self, payload: &[u8])
fn push_payload_h265(&mut self, payload: &[u8])
RFC 7798: the header is two bytes, and the packet type sits where
H.264 keeps its NAL type — hence 48 (AP) and 49 (FU) rather than 24
and 28. sprop-max-don-diff is assumed 0, so there is no DONL field;
no camera encoder we target sets it.
fn finish(&mut self) -> Option<VideoAu>
Trait Implementations§
Source§impl Default for Depacketizer
impl Default for Depacketizer
Source§fn default() -> Depacketizer
fn default() -> Depacketizer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Depacketizer
impl RefUnwindSafe for Depacketizer
impl Send for Depacketizer
impl Sync for Depacketizer
impl Unpin for Depacketizer
impl UnsafeUnpin for Depacketizer
impl UnwindSafe for Depacketizer
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