pub struct RtcInboundRtpStreamStats {Show 23 fields
pub received_stream: RtcReceivedRtpStreamStats,
pub media_specific: InboundRtpMediaType,
pub track_identifier: Option<String>,
pub mid: Option<String>,
pub remote_id: Option<String>,
pub bytes_received: Option<u64>,
pub jitter_buffer_emitted_count: Option<u64>,
pub jitter_buffer_delay: Option<Double>,
pub jitter_buffer_target_delay: Option<Double>,
pub jitter_buffer_minimum_delay: Option<Double>,
pub header_bytes_received: Option<u64>,
pub packets_discarded: Option<u64>,
pub last_packet_received_timestamp: Option<HighResTimeStamp>,
pub estimated_playout_timestamp: Option<HighResTimeStamp>,
pub fec_bytes_received: Option<u64>,
pub fec_packets_received: Option<u64>,
pub fec_packets_discarded: Option<u64>,
pub total_processing_delay: Option<Double>,
pub nack_count: Option<u32>,
pub retransmitted_packets_received: Option<u64>,
pub retransmitted_bytes_received: Option<u64>,
pub rtx_ssrc: Option<u32>,
pub fec_ssrc: Option<u32>,
}Expand description
Measurement metrics for an incoming media RTP stream.
The timestamp reported in the statistics object is the time at which the data was sampled.
Fields§
§received_stream: RtcReceivedRtpStreamStatsGeneric ingress RTP stream data.
media_specific: InboundRtpMediaTypeMedia kind specific part of these RtcInboundRtpStreamStats.
track_identifier: Option<String>id attribute value of the MediaStreamTrack.
mid: Option<String>mid value of the RTCRtpTransceiver owning this stream.
If the RTCRtpTransceiver owning this stream has a mid value that
is not null, this is that value, otherwise this member MUST NOT be
present.
remote_id: Option<String>Identifier for looking up the remote RtcRemoteOutboundRtpStreamStats
object for the same SSRC.
bytes_received: Option<u64>Total number of bytes received for this SSRC.
This includes retransmissions.
Calculated as defined in RFC3550 Section 6.4.1.
jitter_buffer_emitted_count: Option<u64>Total number of audio samples or video frames that have come out of the
jitter buffer (increasing the jitter_buffer_delay).
jitter_buffer_delay: Option<Double>Sum of the time, in seconds, each audio sample or a video frame takes from the time the first packet is received by the jitter buffer (ingest timestamp) to the time it exits the jitter buffer (emit timestamp).
The purpose of the jitter buffer is to recombine RTP packets into frames (in the case of video) and have smooth playout. The model described here assumes that the samples or frames are still compressed and have not yet been decoded.
In the case of audio, several samples belong to the same RTP packet, hence they will have the same ingest timestamp but different jitter buffer emit timestamps.
In the case of video, the frame may be received over several RTP packets, hence the ingest timestamp is the earliest packet of the frame that entered the jitter buffer and the emit timestamp is when the whole frame exits the jitter buffer.
This metric increases upon samples or frames exiting, having completed
their time in the buffer (and incrementing the
jitter_buffer_emitted_count).
The average jitter buffer delay can be calculated by dividing the
jitter_buffer_delay with the jitter_buffer_emitted_count.
jitter_buffer_target_delay: Option<Double>Cumulative time of delays, in seconds, at the time that a sample is emitted from the jitter buffer.
This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer.
To get the average target delay, divide by
jitter_buffer_emitted_count.
jitter_buffer_minimum_delay: Option<Double>Minimum jitter buffer delay, in seconds.
There are various reasons why the jitter buffer delay might be increased to a higher value, such as to achieve A/V synchronization or because a jitterBufferTarget was set on an RTCRtpReceiver. When using one of these mechanisms, it can be useful to keep track of the minimal jitter buffer delay that could have been achieved, so clients can track the amount of additional delay that is being added.
This metric works the same way as the jitter_buffer_target_delay,
except that it is not affected by external mechanisms that increase the
jitter buffer target delay, such as jitterBufferTarget, A/V sync,
or any other mechanisms. This metric is purely based on the network
characteristics such as jitter and packet loss, and can be seen as the
minimum obtainable jitter buffer delay if no external factors would
affect it.
This metric is updated every time the jitter_buffer_emitted_count
is updated.
header_bytes_received: Option<u64>Total number of RTP header and padding bytes received for this SSRC.
This includes retransmissions. Does not include transport headers
(IP/UDP). header_bytes_received + bytes_received equals
the total number of bytes received as payload over the transport.
packets_discarded: Option<u64>Cumulative number of RTP packets discarded by the jitter buffer due to late or early-arrival, i.e. these packets are not played out.
RTP packets discarded due to packet duplication are not reported in this metric XRBLOCK-STATS.
Calculated as defined in RFC7002 Section 3.2 and Appendix A.a.
last_packet_received_timestamp: Option<HighResTimeStamp>Timestamp at which the last RTP packet was received for this SSRC.
This differs from the RtcStat::timestamp, which represents the time
at which the statistics were generated or received by the local
endpoint.
estimated_playout_timestamp: Option<HighResTimeStamp>Estimated playout time of this receiver’s track in sender NTP time.
Can be used to estimate A/V sync across tracks from the same source.
fec_bytes_received: Option<u64>Total number of RTP FEC bytes received for this SSRC, only including payload bytes.
This is a subset of the bytes_received.
If FEC uses a different SSRC, packets are still accounted for here.
fec_packets_received: Option<u64>Total number of RTP FEC packets received for this SSRC.
If FEC uses a different SSRC, packets are still accounted for here.
Can also increment when receiving in-band FEC (for example, Opus).
fec_packets_discarded: Option<u64>Total number of RTP FEC packets received for this SSRC where the error correction payload was discarded (for example, sources already recovered or FEC arrived late).
This is a subset of the fec_bytes_received.
total_processing_delay: Option<Double>Sum of the time, in seconds, each audio sample or video frame takes from the time the first RTP packet is received (reception timestamp) and to the time the corresponding sample or frame is decoded (decoded timestamp).
At this point the audio sample or video frame is ready for playout by the MediaStreamTrack. Typically ready for playout here means after the audio sample or video frame is fully decoded by the decoder.
nack_count: Option<u32>Total number of Negative ACKnowledgement (NACK) RTCP feedback packets sent by this receiver for this SSRC, as defined in RFC4585 Section 6.2.1.
retransmitted_packets_received: Option<u64>Total number of retransmitted packets that were received for this SSRC.
This is a subset of the RtcReceivedRtpStreamStats::packets_received.
If RTX is not negotiated, retransmitted packets can not be identified and this member MUST NOT exist.
retransmitted_bytes_received: Option<u64>Total number of retransmitted bytes that were received for this SSRC, only including payload bytes.
This is a subset of the bytes_received.
If RTX is not negotiated, retransmitted packets can not be identified and this member MUST NOT exist.
rtx_ssrc: Option<u32>SSRC of the RTX stream that is associated with this stream’s SSRC.
If RTX is negotiated for retransmissions on a separate RTP stream, this is the SSRC of the RTX stream that is associated with this stream’s SSRC.
If RTX is not negotiated, this value MUST NOT be present.
fec_ssrc: Option<u32>SSRC of the FEC stream that is associated with this stream’s SSRC.
If a FEC mechanism that uses a separate RTP stream is negotiated, this is the SSRC of the FEC stream that is associated with this stream’s SSRC.
If FEC is not negotiated or uses the same RTP stream, this value MUST NOT be present.
Trait Implementations§
Source§impl Clone for RtcInboundRtpStreamStats
impl Clone for RtcInboundRtpStreamStats
Source§fn clone(&self) -> RtcInboundRtpStreamStats
fn clone(&self) -> RtcInboundRtpStreamStats
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RtcInboundRtpStreamStats
impl Debug for RtcInboundRtpStreamStats
Source§impl<'de> Deserialize<'de> for RtcInboundRtpStreamStats
impl<'de> Deserialize<'de> for RtcInboundRtpStreamStats
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>,
Source§impl Hash for RtcInboundRtpStreamStats
impl Hash for RtcInboundRtpStreamStats
Source§impl PartialEq for RtcInboundRtpStreamStats
impl PartialEq for RtcInboundRtpStreamStats
Source§impl Serialize for RtcInboundRtpStreamStats
impl Serialize for RtcInboundRtpStreamStats
impl StructuralPartialEq for RtcInboundRtpStreamStats
Auto Trait Implementations§
impl Freeze for RtcInboundRtpStreamStats
impl RefUnwindSafe for RtcInboundRtpStreamStats
impl Send for RtcInboundRtpStreamStats
impl Sync for RtcInboundRtpStreamStats
impl Unpin for RtcInboundRtpStreamStats
impl UnwindSafe for RtcInboundRtpStreamStats
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)