pub struct Packetizer { /* private fields */ }Expand description
Builds one stream’s PDUs, counting what each carries on.
Implementations§
Source§impl Packetizer
impl Packetizer
pub fn new(media: Media, stream_id: u64) -> Self
Sourcepub fn write(
&mut self,
presentation: i64,
media_reset: bool,
samples: &[f32],
out: &mut [u8],
)
pub fn write( &mut self, presentation: i64, media_reset: bool, samples: &[f32], out: &mut [u8], )
Writes the next PDU into out, media’s PDU length: samples
interleaved, the first presented at presentation (gPTP
nanoseconds); for a media clock, its timestamps from
presentation on, without samples.
Trait Implementations§
Source§impl Clone for Packetizer
impl Clone for Packetizer
Auto Trait Implementations§
impl Forget for Packetizer
impl Freeze for Packetizer
impl Move for Packetizer
impl RefUnwindSafe for Packetizer
impl Send for Packetizer
impl Sync for Packetizer
impl Unpin for Packetizer
impl UnsafeUnpin for Packetizer
impl UnwindSafe for Packetizer
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