pub struct RtpContributingSourceStats {
    pub contributor_ssrc: Option<u32>,
    pub inbound_rtp_stream_id: Option<String>,
    pub packets_contributed_to: Option<u64>,
    pub audio_level: Option<Float>,
}
Expand description

Statistics for a contributing source (CSRC) that contributed to an inbound RTP stream.

RtcStatsType::Csrc variant.

Full doc on W3C.

Fields§

§contributor_ssrc: Option<u32>

SSRC identifier of the contributing source represented by the stats object, as defined by RFC 3550. It is a 32-bit unsigned integer that appears in the CSRC list of any packets the relevant source contributed to.

§inbound_rtp_stream_id: Option<String>

ID of the RTCInboundRtpStreamStats object representing the inbound RTP stream that this contributing source is contributing to.

§packets_contributed_to: Option<u64>

Total number of RTP packets that this contributing source contributed to.

This value is incremented each time a packet is counted by RTCInboundRtpStreamStats.packetsReceived, and the packet’s CSRC list (as defined by Section 5.1 in RFC 3550) contains the SSRC identifier of this contributing source, contributorSsrc.

§audio_level: Option<Float>

Present if the last received RTP packet that this source contributed to contained an RFC 6465 mixer-to-client audio level header extension.

The value of audioLevel is between 0..1 (linear), where 1.0 represents 0 dBov, 0 represents silence, and 0.5 represents approximately 6 dBSPL change in the sound pressure level from 0 dBov. The RFC 6465 header extension contains values in the range 0..127, in units of -dBov, where 127 represents silence. To convert these values to the linear 0..1 range of audioLevel, a value of 127 is converted to 0, and all other values are converted using the equation:

f(rfc6465_level) = 10^(-rfc6465_level/20)

Trait Implementations§

source§

impl Clone for RtpContributingSourceStats

source§

fn clone(&self) -> RtpContributingSourceStats

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RtpContributingSourceStats

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RtpContributingSourceStats

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for RtpContributingSourceStats

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<RtpContributingSourceStats> for RtpContributingSourceStats

source§

fn eq(&self, other: &RtpContributingSourceStats) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RtpContributingSourceStats

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for RtpContributingSourceStats

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,