pub struct Packet {
pub packet_size: usize,
pub data_size: usize,
pub code: u8,
pub stereo: bool,
pub vbr: bool,
pub config: usize,
pub frame_count: usize,
pub frame_offset: Vec<usize>,
pub frame_size: Vec<usize>,
pub frame_duration: usize,
pub mode: u8,
pub bandwidth: usize,
}Expand description
OpusPacket.
Fields§
§packet_size: usizeBytes in the packet, padding included.
data_size: usizeBytes of frame data, padding excluded.
code: u8The TOC’s frame-count code, 0 to 3 (RFC 6716 §3.2).
stereo: boolWhether the TOC’s stereo bit is set.
vbr: boolWhether a code-3 packet’s frames have their own sizes.
config: usizeThe TOC configuration number, 0 to 31.
frame_count: usizeFrames in the packet.
frame_offset: Vec<usize>Where each frame starts, in bytes from the start of the packet.
frame_size: Vec<usize>Each frame’s size in bytes.
frame_duration: usizeSamples per frame at 48 kHz.
mode: u80 for SILK, 1 for hybrid, 2 for CELT.
bandwidth: usizeAudio bandwidth: 0 narrowband to 4 fullband.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Packet
impl Freeze 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
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