Skip to main content

InboundRtpMediaType

Enum InboundRtpMediaType 

Source
pub enum InboundRtpMediaType {
    Audio {
        total_samples_received: Option<u64>,
        concealed_samples: Option<u64>,
        silent_concealed_samples: Option<u64>,
        concealment_events: Option<u64>,
        inserted_samples_for_deceleration: Option<u64>,
        removed_samples_for_acceleration: Option<u64>,
        audio_level: Option<Double>,
        total_audio_energy: Option<Double>,
        total_samples_duration: Option<Double>,
        playout_id: Option<String>,
    },
    Video {
Show 25 fields frames_decoded: Option<u32>, key_frames_decoded: Option<u32>, frames_rendered: Option<u32>, frames_dropped: Option<u32>, frame_width: Option<u32>, frame_height: Option<u32>, frames_per_second: Option<Double>, qp_sum: Option<u64>, total_decode_time: Option<Double>, total_inter_frame_delay: Option<Double>, total_squared_inter_frame_delay: Option<Double>, pause_count: Option<u32>, total_pauses_duration: Option<Double>, freeze_count: Option<u32>, total_freezes_duration: Option<Double>, fir_count: Option<u32>, pli_count: Option<u32>, frames_received: Option<u32>, decoder_implementation: Option<String>, power_efficient_decoder: Option<bool>, frames_assembled_from_multiple_packets: Option<u32>, total_assembly_time: Option<Double>, total_corruption_probability: Option<Double>, total_squared_corruption_probability: Option<Double>, corruption_measurements: Option<u64>,
}, }
Expand description

RtcStat fields of RtcStatsType::InboundRtp type based on its kind.

Full doc on W3C.

Variants§

§

Audio

Fields when the kind is audio.

Full doc on W3C.

Fields

§total_samples_received: Option<u64>

Total number of samples that have been received on the RTP stream.

This includes InboundRtpMediaType::Audio::concealed_samples.

§concealed_samples: Option<u64>

Total number of samples that are concealed samples.

A concealed sample is a sample that was replaced with synthesized samples generated locally before being played out. Examples of samples that have to be concealed are samples from lost packets (reported in RtcReceivedRtpStreamStats::packets_lost) or samples from packets that arrive too late to be played out (reported in RtcInboundRtpStreamStats::packets_discarded).

§silent_concealed_samples: Option<u64>

Total number of concealed samples inserted that are “silent”.

Playing out silent samples results in silence or comfort noise.

This is a subset of InboundRtpMediaType::Audio::concealed_samples.

§concealment_events: Option<u64>

Number of concealment events.

This counter increases every time a concealed sample is synthesized after a non-concealed sample. That is, multiple consecutive concealed samples will increase the InboundRtpMediaType::Audio::concealed_samples count multiple times, but is a single concealment event.

§inserted_samples_for_deceleration: Option<u64>

Number of inserted deceleration samples.

When playout is slowed down, this counter is increased by the difference between the number of samples received and the number of samples played out. If playout is slowed down by inserting samples, this will be the number of inserted samples.

§removed_samples_for_acceleration: Option<u64>

Number of removed acceleration samples.

When playout is sped up, this counter is increased by the difference between the number of samples received and the number of samples played out. If speedup is achieved by removing samples, this will be the count of samples removed.

§audio_level: Option<Double>

Audio level of the receiving track.

For audio levels of tracks attached locally, see the MediaSourceKind::Audio instead.

The value 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 audio level is averaged over some small interval, using the algorithm described under totalAudioEnergy. The interval used is implementation-defined.

§total_audio_energy: Option<Double>

Audio energy of the receiving track.

For audio energy of tracks attached locally, see the MediaSourceKind::Audio instead.

§total_samples_duration: Option<Double>

Audio duration of the receiving track.

For audio durations of tracks attached locally, see the MediaSourceKind::Audio instead.

§playout_id: Option<String>

Indicator whether audio playout is happening.

This is used to look up the corresponding RtcAudioPlayoutStats.

§

Video

Fields when the kind is video.

Full doc on W3C.

Fields

§frames_decoded: Option<u32>

Total number of frames correctly decoded for the RTP stream, i.e. frames that would be displayed if no frames are dropped.

§key_frames_decoded: Option<u32>

Total number of key frames, such as key frames in VP8 RFC6386 or IDR-frames in H.264 RFC6184, successfully decoded for the media RTP stream.

This is a subset of InboundRtpMediaType::Video::frames_decoded. InboundRtpMediaType::Video::frames_decoded - InboundRtpMediaType::Video::key_frames_decoded gives the number of delta frames decoded.

§frames_rendered: Option<u32>

Total number of frames that have been rendered.

It’s incremented just after a frame has been rendered.

§frames_dropped: Option<u32>

Total number of frames dropped prior to decode or dropped because the frame missed its display deadline for the receiver’s track.

The measurement begins when the receiver is created and is a cumulative metric as defined in Appendix A (g) of RFC7004.

§frame_width: Option<u32>

Width of the last decoded frame.

Before the first frame is decoded this attribute is missing.

§frame_height: Option<u32>

Height of the last decoded frame.

Before the first frame is decoded this attribute is missing.

§frames_per_second: Option<Double>

Number of decoded frames in the last second.

§qp_sum: Option<u64>

Sum of the QP values of frames decoded by the receiver.

The count of frames is in InboundRtpMediaType::Video::frames_decoded.

The definition of QP value depends on the codec; for VP8, the QP value is the value carried in the frame header as the syntax element y_ac_qi, and defined in RFC6386 section 19.2. Its range is 0..127.

Note, that the QP value is only an indication of quantizer values used; many formats have ways to vary the quantizer value within the frame.

§total_decode_time: Option<Double>

Total number of seconds that have been spent decoding the InboundRtpMediaType::Video::frames_decoded frames of the RTP stream.

The average decode time can be calculated by dividing this value with the InboundRtpMediaType::Video::frames_decoded. The time it takes to decode one frame is the time passed between feeding the decoder a frame and the decoder returning decoded data for that frame.

§total_inter_frame_delay: Option<Double>

Sum of the interframe delays in seconds between consecutively rendered frames, recorded just after a frame has been rendered.

The interframe delay variance be calculated from InboundRtpMediaType::Video::total_inter_frame_delay, InboundRtpMediaType::Video::total_squared_inter_frame_delay, and InboundRtpMediaType::Video::frames_rendered according to the formula: (total_squared_inter_frame_delay - total_inter_frame_delay^2 / frames_rendered) / frames_rendered.

§total_squared_inter_frame_delay: Option<Double>

Sum of the squared interframe delays in seconds between consecutively rendered frames, recorded just after a frame has been rendered.

See the InboundRtpMediaType::Video::total_inter_frame_delay for details on how to calculate the interframe delay variance.

§pause_count: Option<u32>

Total number of video pauses experienced by the receiver.

Video is considered to be paused if time passed since last rendered frame exceeds 5 seconds. It’s incremented when a frame is rendered after such a pause.

§total_pauses_duration: Option<Double>

Total duration of pauses, in seconds.

For definition of pause see the InboundRtpMediaType::Video::pause_count.

This value is updated when a frame is rendered.

§freeze_count: Option<u32>

Total number of video freezes experienced by the receiver.

It’s a freeze if frame duration, which is time interval between two consecutively rendered frames, is equal or exceeds Max(3 * avg_frame_duration_ms, avg_frame_duration_ms + 150), where avg_frame_duration_ms is linear average of durations of last 30 rendered frames.

§total_freezes_duration: Option<Double>

Total duration of rendered frames which are considered as frozen, in seconds.

For definition of freeze see the InboundRtpMediaType::Video::freeze_count.

This value is updated when a frame is rendered.

§fir_count: Option<u32>

Total number of Full Intra Request (FIR) packets, as defined in RFC5104 section 4.3.1, sent by the receiver.

Doesn’t count the RTCP FIR indicated in RFC2032 which was deprecated by RFC4587.

§pli_count: Option<u32>

Total number of Picture Loss Indication (PLI) packets, as defined in RFC4585 section 6.3.1, sent by the receiver.

§frames_received: Option<u32>

Total number of complete frames received on the RTP stream.

This metric is incremented when the complete frame is received.

§decoder_implementation: Option<String>

Identification of the used the decoder implementation.

This is useful for diagnosing interoperability issues.

§power_efficient_decoder: Option<bool>

Indicator whether the decoder currently used is considered power efficient by the user agent.

This SHOULD reflect if the configuration results in hardware acceleration, but the user agent MAY take other information into account when deciding if the configuration is considered power efficient.

§frames_assembled_from_multiple_packets: Option<u32>

Total number of frames correctly decoded for the RTP stream that consist of more than one RTP packet.

For such frames the total_assembly_time is incremented. The average frame assembly time can be calculated by dividing the total_assembly_time with this value.

§total_assembly_time: Option<Double>

Sum of the time, in seconds, each video frame takes from the time the first RTP packet is received (reception timestamp) and to the time the last RTP packet of a frame is received.

Only incremented for frames consisting of more than one RTP packet.

Given the complexities involved, the time of arrival or the reception timestamp is measured as close to the network layer as possible. This metric is not incremented for frames that are not decoded, i.e., InboundRtpMediaType::Video::frames_dropped or frames that fail decoding for other reasons (if any).

§total_corruption_probability: Option<Double>

Cumulative sum of all corruption probability measurements that have been made for this SSRC.

See the InboundRtpMediaType::Video::corruption_measurements regarding when this attribute SHOULD be present.

Each measurement added to InboundRtpMediaType::Video::total_corruption_probability MUST be in the range [0.0, 1.0], where a value of 0.0 indicates the system has estimated there is no or negligible corruption present in the processed frame. Similarly, a value of 1.0 indicates there is almost certainly a corruption visible in the processed frame. A value in between those two, indicates there is likely some corruption visible, but it could for instance have a low magnitude or be present only in a small portion of the frame.

§total_squared_corruption_probability: Option<Double>

Cumulative sum of all corruption probability measurements squared that have been made for this SSRC.

See the InboundRtpMediaType::Video::corruption_measurements regarding when this attribute SHOULD be present.

§corruption_measurements: Option<u64>

Number of corruption probability measurements.

When the user agent is able to make a corruption probability measurement, this counter is incremented for each such measurement and the total_corruption_probability and the total_squared_corruption_probability are aggregated with this measurement and measurement squared respectively. If the corruption-detection header extension is present in the RTP packets, corruption probability measurements MUST be present.

Trait Implementations§

Source§

impl Clone for InboundRtpMediaType

Source§

fn clone(&self) -> InboundRtpMediaType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for InboundRtpMediaType

Source§

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

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

impl<'de> Deserialize<'de> for InboundRtpMediaType

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 InboundRtpMediaType

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 for InboundRtpMediaType

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for InboundRtpMediaType

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 InboundRtpMediaType

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V