Class RTCOutboundRtpStreamStats
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The RTCOutboundRtpStreamStats dictionary of the WebRTC API is used to report metrics and statistics related to an outbound {{Glossary("RTP")}} stream being sent by an RTCRtpSender.
[ToObject]
public class RTCOutboundRtpStreamStats : RTCSentRtpStreamStats
- Inheritance
-
RTCOutboundRtpStreamStats
- Inherited Members
Remarks
The statistics can be obtained by iterating the RTCStatsReport returned by GetStats(MediaStreamTrack?) or GetStats() until you find a report with the type of outbound-rtp.
Constructors
RTCOutboundRtpStreamStats()
public RTCOutboundRtpStreamStats()
Fields
Active
NOTE
Experimentalactive property of the RTCOutboundRtpStreamStats dictionary is a boolean that indicates whether this RTP stream is configured to be sent, or is disabled.
[Value("active")]
public bool Active
Field Value
- bool
trueif the stream is enabled for sending,falseotherwise.
Remarks
For example, this would be false if the track corresponding to the stream had its Enabled property set to false.
Note that an active stream may still not be sending if, for example, the stream is limited by network conditions.
EncoderImplementation
[Value("encoderImplementation")]
public string EncoderImplementation
Field Value
FirCount
[Value("firCount")]
public ulong FirCount
Field Value
FrameHeight
The frameHeight property of the RTCOutboundRtpStreamStats dictionary is a positive integer that indicates the height of the last encoded frame, in pixels.
[Value("frameHeight")]
public ulong FrameHeight
Field Value
- ulong
A positive integer.
Remarks
Note that the resolution of the encoded frame may be lower than that of the media source, which is provided in Height.
NOTE
The property is undefined for audio streams, and before the first frame is encoded.
FrameWidth
The frameWidth property of the RTCOutboundRtpStreamStats dictionary is a positive integer that indicates the width of the last encoded frame, in pixels.
[Value("frameWidth")]
public ulong FrameWidth
Field Value
- ulong
A positive integer.
Remarks
Note that the resolution of the encoded frame may be lower than that of the media source, which is provided in Width.
NOTE
The value does not exist for audio, or before the first frame is encoded.
FramesEncoded
The framesEncoded property of
the RTCOutboundRtpStreamStats dictionary indicates the total number of
frames that have been encoded by this RTCRtpSender for this media
source.
[Value("framesEncoded")]
public ulong FramesEncoded
Field Value
- ulong
An integer value indicating the total number of video frames that this sender has
encoded so far for this stream.NOTE
This property is only valid for video streams.
Remarks
FramesPerSecond
The framesPerSecond property of the RTCOutboundRtpStreamStats dictionary indicates the number of encoded frames sent in the last second.
[Value("framesPerSecond")]
public Number FramesPerSecond
Field Value
- Number
A positive number.
Remarks
Note that this may be lower than the media source frame rate, which is provided in FramesPerSecond.
NOTE
The value does not exist for audio, or before the first second of encoding.
FramesSent
The framesSent property of the RTCOutboundRtpStreamStats dictionary indicates the total number of encoded frames sent on this RTP stream over its lifetime.
[Value("framesSent")]
public ulong FramesSent
Field Value
- ulong
A positive number.
Remarks
Note that this may be lower than the total number of media source frames, which is provided in Frames.
NOTE
The value does not exist for audio.
HeaderBytesSent
The headerBytesSent property of the RTCOutboundRtpStreamStats dictionary indicates the total number of RTP header and padding bytes sent for this synchronization source (SSRC).
[Value("headerBytesSent")]
public ulong HeaderBytesSent
Field Value
- ulong
A positive integer.
Remarks
Note that the total number of bytes sent as payload over the transport is equal to: headerBytesSent + RTCOutboundRtpStreamStats.BytesSent.
HugeFramesSent
[Value("hugeFramesSent")]
public ulong HugeFramesSent
Field Value
KeyFramesEncoded
NOTE
ExperimentalkeyFramesEncoded property of the RTCOutboundRtpStreamStats dictionary represents the total number of key frames successfully encoded in this RTP media stream.This includes, for example, key frames in VP8 ({{rfc("6386")}}) or IDR-frames in H.264 ({{rfc("6184")}}).
[Value("keyFramesEncoded")]
public ulong KeyFramesEncoded
Field Value
- ulong
A positive integer.
Remarks
Note that the number of delta frames is calculated by subtracting this value from the total number of frames (FramesEncoded - keyFramesEncoded).
NOTE
The value does not exist for audio.
MediaSourceId
The mediaSourceId property of the RTCOutboundRtpStreamStats dictionary represents the ID of the statistics object of the track currently attached to the sender of this stream.
[Value("mediaSourceId")]
public string MediaSourceId
Field Value
- string
A string containing the ID of a media source statistics object.
Remarks
This can then be used to obtain the corresponding RTCVideoSourceStats or RTCAudioSourceStats.
Mid
The mid property of the RTCOutboundRtpStreamStats dictionary is a string that contains the media ID negotiated between the local and remote peers.
This uniquely identifies the pairing of source and destination for the transceiver's stream.
[Value("mid")]
public string Mid
Field Value
- string
The value of the corresponding Mid, unless that value is null, in which case this statistic property is not present.
Remarks
NackCount
The nackCount property of the
RTCOutboundRtpStreamStats dictionary is a numeric value indicating the
number of times the RTCRtpSender described by this object received a
NACK packet from the remote receiver.
[Value("nackCount")]
public ulong NackCount
Field Value
- ulong
An integer value indicating how many times the sender received a NACK packet from the
receiver, indicating the loss of one or more packets.
Remarks
A NACK (Negative
ACKnowledgement, also called "Generic NACK") packet is used by the
RTCRtpReceiver to inform the sender that one or more {{Glossary("RTP")}}
packets it sent were lost in transport.
PliCount
[Value("pliCount")]
public ulong PliCount
Field Value
PowerEfficientEncoder
[Value("powerEfficientEncoder")]
public bool PowerEfficientEncoder
Field Value
QpSum
The qpSum property of the RTCOutboundRtpStreamStats dictionary is a value generated by adding the Quantization Parameter (QP) values for every frame this sender has produced to date on the video track corresponding to this RTCOutboundRtpStreamStats object.
[Value("qpSum")]
public ulong QpSum
Field Value
- ulong
An unsigned 64-bit integer value which indicates the sum of the quantization parameter (QP) value for every frame sent so far on the track described by the RTCOutboundRtpStreamStats object.
Since the value of QP is typically larger to indicate higher compression factors, the larger this sum is, the more heavily compressed the stream generally has been.NOTE
This value is only available for video media.
Remarks
In general, the higher this number is, the more heavily compressed the video data is.
QualityLimitationDurations
NOTE
ExperimentalqualityLimitationDurations property of the RTCOutboundRtpStreamStats dictionary is a map of the reasons that a media stream's quality has been reduced by a codec during encoding, and the time during which the quality was reduced for each reason.
[Value("qualityLimitationDurations")]
public Dictionary<string, Number> QualityLimitationDurations
Field Value
- Dictionary<string, Number>
A Map of quality limitation reasons to a number which represents the time in seconds that the stream has been quality limited for that reason.The allowed quality limitation reason values are the strings:
Remarks
This quality reduction may include changes such as reduced frame rate or resolution, or an increase in compression factor.
The information can be used to diagnose throughput issues and optimize performance.
NOTE
This property only exists for video media.
QualityLimitationReason
NOTE
ExperimentalqualityLimitationReason property of the RTCOutboundRtpStreamStats dictionary is a string indicating the reason why the media quality in the stream is currently being reduced by the codec during encoding, or none if no quality reduction is being performed.
[Value("qualityLimitationReason")]
public RTCQualityLimitationReason QualityLimitationReason
Field Value
- RTCQualityLimitationReason
A string with one of the following values:
Remarks
This quality reduction may include changes such as reduced frame rate or resolution, or an increase in compression factor.
Note that the user agent report the most limiting factor.
If the most limiting factor cannot be determined the result will be reported using the priority order: "bandwidth", "cpu", "other".
The amount of time the encoded media has had its quality reduced in each of the potential ways that can be done can be found in QualityLimitationDurations.
NOTE
The property is undefined for audio streams.
QualityLimitationResolutionChanges
[Value("qualityLimitationResolutionChanges")]
public ulong QualityLimitationResolutionChanges
Field Value
RemoteId
The remoteId property of the RTCOutboundRtpStreamStats dictionary specifies the RTCOutboundRtpStreamStats.Id of the RTCRemoteInboundRtpStreamStats object representing the remote peer's RTCRtpReceiver which is sending the media to the local peer for this SSRC.
[Value("remoteId")]
public string RemoteId
Field Value
- string
A string containing the ID of the RTCRemoteInboundRtpStreamStats object that represents the remote peer's RTCRtpReceiver for the synchronization source represented by this stats object.
Remarks
RetransmittedBytesSent
The retransmittedBytesSent property of the RTCOutboundRtpStreamStats dictionary represents the total number of payload bytes retransmitted for the source associated with this stream.
[Value("retransmittedBytesSent")]
public ulong RetransmittedBytesSent
Field Value
- ulong
A positive integer indicating the number of retransmitted payload bytes for the source.
Remarks
RTX (Retransmission) is one of several mechanisms that WebRTC uses for retransmitting lost payload bytes, and broadly refers to support for the special packets defined in {{rfc("4588")}}.
RTX has to be negotiated between the sender and receiver during initial handshake.
If RTX has not been negotiated the retransmitted bytes will be sent over the same SSRC; otherwise the bytes are sent on a separate SSRC but are still accounted for in this property.
The retransmitted bytes sent are included in the count reported by RTCOutboundRtpStreamStats.BytesSent.
RetransmittedPacketsSent
The retransmittedPacketsSent property of the RTCOutboundRtpStreamStats dictionary represents the total number of packets retransmitted for the source associated with this stream.
[Value("retransmittedPacketsSent")]
public ulong RetransmittedPacketsSent
Field Value
- ulong
A positive integer indicating the number of retransmitted packets for the source.
Remarks
RTX (Retransmission) is one of several mechanisms that WebRTC uses for retransmitting lost payload bytes, and broadly refers to support for the special packets defined in {{rfc("4588")}}.
RTX has to be negotiated between the sender and receiver during initial handshake.
If RTX has not been negotiated the retransmitted packets will be sent over the same SSRC; otherwise the bytes are sent on a separate SSRC but are still accounted for in this property.
The retransmitted packets are included in the count reported by RTCOutboundRtpStreamStats.PacketsSent.
Rid
The rid property of the RTCOutboundRtpStreamStats dictionary is a string that specifies the RTP stream ID, if defined.
[Value("rid")]
public string Rid
Field Value
- string
The value of the
encodings.ridargument passed to SetParameters(RTCRtpSendParameters, RTCSetParameterOptions), if any, when the corresponding transceiver is created.
The property is undefined if the stream ID was not set.NOTE
The property is undefined for audio streams.
Remarks
The property is only defined where the rid has been set for the corresponding RTCRtpSender.
If set, this value will be present regardless of whether the RID RTP header extension has been negotiated.
RtxSsrc
[Value("rtxSsrc")]
public ulong RtxSsrc
Field Value
ScalabilityMode
NOTE
ExperimentalscalabilityMode property of the RTCOutboundRtpStreamStats dictionary represents the scalability mode for the RTP stream, if one has been configured.If not configured, the property is undefined.
[Value("scalabilityMode")]
public string ScalabilityMode
Field Value
- string
A string indicating the configured scalability mode, such as "L1T1".
If no mode has been configured, the property is undefined.The set of allowed modes are defined in Scalable Video Coding (SVC) Extension for WebRTC (w3c.github.io/webrtc-svc).
Remarks
The mode is used in Scalable Video Coding (SVC) to define how define how a video stream may be encoded to allow for adaptation to different network conditions and receiver capabilities.
Different codecs allow for various kinds of scalability, such as providing different resolution, different frame rates, or different quality levels for a particular video.
The mode may be configured, for example, by specifying the scalability mode as a parameter option in Configure(VideoEncoderConfig), SetParameters(RTCRtpSendParameters, RTCSetParameterOptions), or AddTransceiver(Union231, RTCRtpTransceiverInit).
NOTE
The property is undefined for audio streams.
TargetBitrate
The targetBitrate property of the RTCOutboundRtpStreamStats dictionary represents the current target bitrate of the codec in use by the stream.
[Value("targetBitrate")]
public Number TargetBitrate
Field Value
- Number
A number representing the target rate in bits per second.
This is defined in the same way as the {{rfc("3890","Transport Independent Application Specific (TIAS)")}} bitrate.
Remarks
The value is dynamic, reflecting the encoder settings and other factors such as network conditions and available bandwidth.
It should correlate closely to the payload bytes sent per second (excluding retransmissions).
-RTCOutboundRtpStreamStats.BytesSent
-RetransmittedBytesSent
TotalEncodeTime
The totalEncodeTime property of the RTCOutboundRtpStreamStats dictionary represents the total number of seconds spent encoding the RTCOutboundRtpStreamStatsframesEncoded frames for this stream (RTCRtpSender).
[Value("totalEncodeTime")]
public Number TotalEncodeTime
Field Value
- Number
A number representing the total time spent encoding frames, in seconds.
Remarks
The average encode time can be calculated by dividing this value by framesEncoded.
The time it takes to encode one frame is the time between sending the encoder a frame and the encoder returning encoded data for that frame.
It does not include any time spent packetizing the resulting data.
NOTE
The property is undefined for audio streams.
TotalEncodedBytesTarget
NOTE
ExperimentaltotalEncodedBytesTarget property of the RTCOutboundRtpStreamStats dictionary represents the sum of the target frame sizes for all of the frames encoded so far.
[Value("totalEncodedBytesTarget")]
public ulong TotalEncodedBytesTarget
Field Value
- ulong
The sum of the target frame sizes in bytes, represented as a positive integer.
Remarks
The codec has a target maximum size for each frame that it is asked to compress, in bytes.
This property indicates the cumulative total of the target sizes for each frame at the current time.
This will probably differ from the total of the actual frame sizes.
You can compare to RTCOutboundRtpStreamStatsbytesSent in order to estimate how closely the codec is matching its target.
The value increases every time RTCOutboundRtpStreamStatsframesEncoded goes up.
NOTE
The property is undefined for audio streams.
TotalPacketSendDelay
The totalPacketSendDelay property of the RTCOutboundRtpStreamStats dictionary represents the total time in seconds that packets have spent buffered locally before being transmitted.
[Value("totalPacketSendDelay")]
public Number TotalPacketSendDelay
Field Value
- Number
The delay in seconds, represented as a number.
Remarks
The individual packet delay is the time between a packet being emitted from the RTP packetizer and it being handed over to the OS network socket.
The individual delay is added to totalPacketSendDelay when RTCOutboundRtpStreamStatsframesEncoded is incremented.
NOTE
The property is undefined for audio streams.