pub struct VideoChunk {
pub session_id: u64,
pub attachment_id: u64,
pub stream_seq: u64,
pub seq: u64,
pub chunk: u32,
pub num_chunks: u32,
pub hierarchical_layer: u32,
pub fec_metadata: Option<FecMetadata>,
pub timestamp: u64,
pub data: Bytes,
}
Expand description
§051 - Video 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 a
video packet.
Much of the metadata associated with the chunk applies to all chunks of a given packet, but must be repeated on each chunk such that a client receiving the first (potentially out-of-order) chunk has sufficient information to deal with it.
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 a video 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
§hierarchical_layer: u32
If the encoder is using hierarchical coding (sometimes called SVC), this field indicates the layer that the packet belongs to.
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 video packet, or, if an FEC scheme is used, a single symbol from the stream of symbols.
Trait Implementations§
Source§impl Clone for VideoChunk
impl Clone for VideoChunk
Source§fn clone(&self) -> VideoChunk
fn clone(&self) -> VideoChunk
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for VideoChunk
impl Debug for VideoChunk
Source§impl Default for VideoChunk
impl Default for VideoChunk
Source§impl From<VideoChunk> for MessageType
impl From<VideoChunk> for MessageType
Source§fn from(v: VideoChunk) -> Self
fn from(v: VideoChunk) -> Self
Source§impl Message for VideoChunk
impl Message for VideoChunk
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
.