pub struct AudioLevelExtension {
pub level: u8,
pub voice: bool,
}Expand description
AudioLevelExtension is a extension payload format described in https://tools.ietf.org/html/rfc6464
Implementation based on: https://chromium.googlesource.com/external/webrtc/+/e2a017725570ead5946a4ca8235af27470ca0df9/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc#49
One byte format: 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ID | len=0 |V| level | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Two byte format: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ID | len=1 |V| level | 0 (pad) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
§Specifications
Fields§
§level: u8Loudness in −dBov, from 0 (loudest) to 127 (silence).
voice: boolWhether the sender detected voice activity in this packet.
Implementations§
Source§impl AudioLevelExtension
impl AudioLevelExtension
Sourcepub fn voice_activity(&self, vad: bool) -> Option<bool>
pub fn voice_activity(&self, vad: bool) -> Option<bool>
The voice activity flag, for a stream negotiated with this vad (see
parse_vad_attribute): None with vad=off, where the V bit means nothing and a
receiver ignores it (RFC 6464 sections 3 and 4).
Trait Implementations§
Source§impl Clone for AudioLevelExtension
impl Clone for AudioLevelExtension
impl Copy for AudioLevelExtension
Source§impl Debug for AudioLevelExtension
impl Debug for AudioLevelExtension
Source§impl Default for AudioLevelExtension
impl Default for AudioLevelExtension
Source§impl<'de> Deserialize<'de> for AudioLevelExtension
impl<'de> Deserialize<'de> for AudioLevelExtension
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for AudioLevelExtension
Source§impl Marshal for AudioLevelExtension
impl Marshal for AudioLevelExtension
Source§impl MarshalSize for AudioLevelExtension
impl MarshalSize for AudioLevelExtension
Source§fn marshal_size(&self) -> usize
fn marshal_size(&self) -> usize
MarshalSize returns the size of the AudioLevelExtension once marshaled.