pub struct Attached {
pub session_id: u64,
pub attachment_id: u64,
pub video_codec: i32,
pub streaming_resolution: Option<Size>,
pub video_profile: i32,
pub quality_preset: u32,
pub audio_codec: i32,
pub channels: Option<AudioChannels>,
pub sample_rate_hz: u32,
}Expand description
§031 - Attached
This message, which must originate from the server on the same stream as the
original 030 - Attach message, indicates that the
server accepts the client and will begin streaming with the client’s
requested parameters. The parameters must match the parameters sent in the
original 030 - Attach message, or represent the server-chosen default if
they were ommitted.
Fields§
§session_id: u64Required.
attachment_id: u64Required.
video_codec: i32Required.
streaming_resolution: Option<Size>Required.
video_profile: i32Required.
quality_preset: u32Required.
audio_codec: i32Required.
channels: Option<AudioChannels>Required.
sample_rate_hz: u32Required.
Implementations§
Source§impl Attached
impl Attached
Sourcepub fn video_codec(&self) -> VideoCodec
pub fn video_codec(&self) -> VideoCodec
Returns the enum value of video_codec, or the default if the field is set to an invalid enum value.
Sourcepub fn set_video_codec(&mut self, value: VideoCodec)
pub fn set_video_codec(&mut self, value: VideoCodec)
Sets video_codec to the provided enum value.
Sourcepub fn video_profile(&self) -> VideoProfile
pub fn video_profile(&self) -> VideoProfile
Returns the enum value of video_profile, or the default if the field is set to an invalid enum value.
Sourcepub fn set_video_profile(&mut self, value: VideoProfile)
pub fn set_video_profile(&mut self, value: VideoProfile)
Sets video_profile to the provided enum value.
Sourcepub fn audio_codec(&self) -> AudioCodec
pub fn audio_codec(&self) -> AudioCodec
Returns the enum value of audio_codec, or the default if the field is set to an invalid enum value.
Sourcepub fn set_audio_codec(&mut self, value: AudioCodec)
pub fn set_audio_codec(&mut self, value: AudioCodec)
Sets audio_codec to the provided enum value.
Trait Implementations§
Source§impl From<Attached> for MessageType
impl From<Attached> for MessageType
Source§impl Message for Attached
impl Message for Attached
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.