pub struct AudioChunk {
pub session_id: u64,
pub attachment_id: u64,
pub stream_seq: u64,
pub seq: u64,
pub chunk: u32,
pub num_chunks: u32,
pub fec_metadata: Option<FecMetadata>,
pub timestamp: u64,
pub data: Bytes,
}
Expand description
§056 - Audio Chunk
This message, which must originate from the server as a datagram or on the
same stream as the original 030 - Attach
message, contains a part of an
audio packet.
Fields§
§session_id: u64
Required unless sent on the same stream as the original attach message.
attachment_id: u64
§stream_seq: u64
Required. Represents the ordering of packets in a stream and the association of packets to an audio stream.
seq: u64
§chunk: u32
Required unless an FEC scheme is used. Taken together, these represent the placement of a chunk within a packet.
If fec_metadata
is set, both these fields must be unset.
num_chunks: u32
§fec_metadata: Option<FecMetadata>
Contains FEC metadata to locate the chunk within the overall packet.
timestamp: u64
Required. A millisecond timestamp with an arbitrary epoch, used to synchronize audio and video streams.
data: Bytes
Required. The chunk of the audio packet, or, if an FEC scheme is used, a single symbol from the stream of symbols.
Trait Implementations§
Source§impl Clone for AudioChunk
impl Clone for AudioChunk
Source§fn clone(&self) -> AudioChunk
fn clone(&self) -> AudioChunk
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AudioChunk
impl Debug for AudioChunk
Source§impl Default for AudioChunk
impl Default for AudioChunk
Source§impl From<AudioChunk> for MessageType
impl From<AudioChunk> for MessageType
Source§fn from(v: AudioChunk) -> Self
fn from(v: AudioChunk) -> Self
Source§impl Message for AudioChunk
impl Message for AudioChunk
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.