RtcOutboundRtpStreamVideo

Struct RtcOutboundRtpStreamVideo 

Source
pub struct RtcOutboundRtpStreamVideo {
Show 22 fields pub rid: Option<String>, pub encoding_index: Option<u32>, pub total_encoded_bytes_target: Option<u64>, pub frame_width: Option<u32>, pub frame_height: Option<u32>, pub frames_per_second: Option<Double>, pub frames_sent: Option<u32>, pub huge_frames_sent: Option<u32>, pub frames_encoded: Option<u32>, pub key_frames_encoded: Option<u32>, pub qp_sum: Option<u64>, pub psnr_sum: Option<BTreeMap<String, Double>>, pub psnr_measurements: Option<u64>, pub total_encode_time: Option<Double>, pub fir_count: Option<u32>, pub pli_count: Option<u32>, pub encoder_implementation: Option<String>, pub power_efficient_encoder: Option<bool>, pub quality_limitation_reason: Option<RtcQualityLimitationReason>, pub quality_limitation_durations: Option<BTreeMap<RtcQualityLimitationReason, Double>>, pub quality_limitation_resolution_changes: Option<u32>, pub scalability_mode: Option<String>,
}
Expand description

Fields§

§rid: Option<String>

Only exists if a rid has been set for the RTP stream.

If rid is set, this value will be present regardless if the RID RTP header extension has been negotiated.

§encoding_index: Option<u32>

Index of the encoding that represents the [RTP stream] in the RTP sender’s list of encodings.

§total_encoded_bytes_target: Option<u64>

Value, increased by the target frame size in bytes every time a frame has been encoded.

The actual frame size may be bigger or smaller than this number.

This value goes up every time the RtcOutboundRtpStreamVideo::frames_encoded goes up.

§frame_width: Option<u32>

Width of the last encoded frame.

The resolution of the encoded frame may be lower than the media source (see RTCVideoSourceStats.width).

Before the first frame is encoded this attribute is missing.

§frame_height: Option<u32>

Height of the last encoded frame.

The resolution of the encoded frame may be lower than the media source (see RTCVideoSourceStats.height).

Before the first frame is encoded this attribute is missing.

§frames_per_second: Option<Double>

Number of encoded frames during the last second.

This may be lower than the media source frame rate (see RTCVideoSourceStats.framesPerSecond).

§frames_sent: Option<u32>

Total number of frames sent on the RTP stream.

§huge_frames_sent: Option<u32>

Total number of huge frames sent by the RTP stream.

Huge frames, by definition, are frames that have an encoded size at least 2.5 times the average size of the frames. The average size of the frames is defined as the target bitrate per second divided by the target FPS at the time the frame was encoded. These are usually complex to encode frames with a lot of changes in the picture. This can be used to estimate slide changes in the streamed presentation.

The multiplier of 2.5 is chosen from analyzing encoded frame sizes for a sample presentation using WebRTC standalone implementation. 2.5 is a reasonably large multiplier which still caused all slide change events to be identified as a huge frames. It, however, produced 1.4% of false positive slide change detections which is deemed reasonable.

§frames_encoded: Option<u32>

Total number of frames successfully encoded for the media RTP stream.

§key_frames_encoded: Option<u32>

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

This is a subset of RtcOutboundRtpStreamVideo::frames_encoded. RtcOutboundRtpStreamVideo::frames_encoded - RtcOutboundRtpStreamVideo::key_frames_encoded gives the number of delta frames encoded.

§qp_sum: Option<u64>

Sum of the QP values of frames encoded by the sender.

The count of frames is in RtcOutboundRtpStreamVideo::frames_encoded.

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.

§psnr_sum: Option<BTreeMap<String, Double>>

Cumulative sum of the PSNR values of frames encoded by the sender.

The record includes values for the y, u and v components.

The count of measurements is in Self::psnr_measurements.

§psnr_measurements: Option<u64>

Number of times PSNR was measured.

The components of Self::psnr_sum are aggregated with this measurement.

§total_encode_time: Option<Double>

Total number of seconds that has been spent encoding the RtcOutboundRtpStreamVideo::frames_encoded frames of the RTP stream.

The average encode time can be calculated by dividing this value with RtcOutboundRtpStreamVideo::frames_encoded. The time it takes to encode one frame is the time passed between feeding the encoder a frame and the encoder returning encoded data for that frame. This doesn’t include any additional time it may take to packetize the resulting data.

§fir_count: Option<u32>

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

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, received by the sender.

§encoder_implementation: Option<String>

Identification of the used encoder implementation.

This is useful for diagnosing interoperability issues.

§power_efficient_encoder: Option<bool>

Indicator whether the encoder 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.

§quality_limitation_reason: Option<RtcQualityLimitationReason>

Current reason for limiting the resolution and/or framerate.

The implementation reports the most limiting factor. If the implementation is not able to determine the most limiting factor because multiple may exist, the reasons MUST be reported in the following order of priority: bandwidth, cpu, other.

§quality_limitation_durations: Option<BTreeMap<RtcQualityLimitationReason, Double>>

Record of the total time, in seconds, that the RTP stream has spent in each quality limitation state.

The record includes a mapping for all RtcQualityLimitationReason types, including KnownRtcQualityLimitationReason::None.

The sum of all entries minus KnownRtcQualityLimitationReason::None gives the total time that the stream has been limited.

§quality_limitation_resolution_changes: Option<u32>

Number of times that the resolution has changed because of the quality limit (quality_limitation_reason has a value other than KnownRtcQualityLimitationReason::None).

The counter is initially zero and increases when the resolution goes up or down. For example, if a 720p track is sent as 480p for some time and then recovers to 720p, this will have the value 2.

§scalability_mode: Option<String>

Currently configured scalability mode the RTP stream, if any.

Trait Implementations§

Source§

impl Clone for RtcOutboundRtpStreamVideo

Source§

fn clone(&self) -> RtcOutboundRtpStreamVideo

Returns a duplicate of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for RtcOutboundRtpStreamVideo

Source§

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

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

impl<'de> Deserialize<'de> for RtcOutboundRtpStreamVideo

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 RtcOutboundRtpStreamVideo

Source§

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

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

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 RtcOutboundRtpStreamVideo

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for RtcOutboundRtpStreamVideo

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 RtcOutboundRtpStreamVideo

Auto Trait Implementations§

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

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
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

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

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

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Source§

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