This depenency is not needed and may lead to a circular dependency. The cl removes old unused functionaliy to log BWE related statistics using compile time flags.
Bug: webrtc:42225697
Change-Id: I6cc01b367c0c48ab30f34c12a10afc58d1e7822f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352142
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42386}
This CL does 2 things:
- Change the DCHECK for payload_type_frequency to a CHECK (so that
this error will be a crash not a divide-by-zero)
- Change the replay helper that was used by the fuzzer to set the
frequency of the packets to the video value (90K).
Bug: chromium:1466826
Change-Id: I39941f250b1782b36a3bcddfd347a016591466ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312700
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40468}
StreamDataCounters is used both for send-side and receive side stats,
but last_packet_received_time is only used by receive statistician where
it duplicates another member
Bug: webrtc:13757
Change-Id: Iae6a65aba497e577ee3255e40623362e8c4c8a72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306183
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40119}
RFC 3550 specifies samples to be the unit while https://w3c.github.io/webrtc-stats/#receivedrtpstats-dict* specifies time. This avoids the need to convert to time in code that reads the jitter value from RtpReceiveStats.
Bug: webrtc:13757
Change-Id: I972996971c58b686babd621ff4e0f5790fdf2cb1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279281
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Lundqvist <tomasl@google.com>
Cr-Commit-Position: refs/heads/main@{#38419}
This uses the local NTP clock for RTCP report block stats.
This code exists in the version that Mozilla is shipping, with a review
here https://phabricator.services.mozilla.com/D127709 .
Bug: webrtc:13484
Change-Id: I2f46ec02acab0bbb09040778b05b248c2d815bd1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/240142
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35787}
In highly loaded media servers, ReceiveStatisticsImpl's use of std::map
attributes to ~0.32% CPU. It needs to be able to iterate through the
statisticians in order when reporting, but that is considered to be rare
compared to how often they are looked up. So this commit adds a separate
sorted set for just keeping track of the SSRCs, and letting the map of
SSRC to Statisticians, be unordered.
Bug: webrtc:12689
Change-Id: I69fe41d96bca31b2e8d669b58b5c7afabceaa6a6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216385
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33864}
`RTCInboundRtpStreamStats.lastPacketReceivedTimestamp` must be a time
value in milliseconds with Unix epoch as time origin (see
bugs.webrtc.org/12605#c4).
This change fixes both audio and video `RTCInboundRtpStreamStats` stats.
Tested: verified from chrome://webrtc-internals during an appr.tc call
Bug: webrtc:12605
Change-Id: I68157fcf01a5933f3d4e5d3918b4a9d3fbd64f16
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212865
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33547}
The mutex is removed from the old existing implementation and instead a wrapper is implemented that ensure thread-safety.
Both the thread-safe and unsafe version share the same implementation of the logic.
There are two ways of construction:
webrtc::ReceiveStatistics::Create - thread-safe version.
webrtc::ReceiveStatistics::CreateUnLocked -thread-unsafe
Bug: none
Change-Id: Ica375919fda70180335c8f9ea666497811daf866
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211240
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33419}
Update the |cumulative_lost_| counter per received packet. The rules
follow from RFC 3550 and are fairly simple: Decrement the counter by
one for every received packet. For every in-order packet, i.e., increasing
|received_seq_max_|, add that change to |cumulative_lost_|.
Net change is zero as long as packets are received in proper sequence.
This way, GetStats() always returns an up-to-date value, independent
of the timing of RTCP report blocks.
For RTCP reports, keep a workaround to never report negative cumulative loss.
Bug: webrtc:10679
Change-Id: I47ff3bf266ff2382f405ec9828d34f7fad7068b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150641
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29058}
Number of received FEC bytes is used for the
WebRTC.Video.FecBitrateReceivedInKbps UMA histogram. Before this cl,
that value is based on a FEC packet counter updated by
ReceiveStatistics::FecPacketReceived. This cl deletes that method, and
instead adds a byte count to the FecPacketCounter struct, which is
maintained by the UlpFecReceiver and used for other FEC-related stats.
Bug: webrtc:10917
Change-Id: I24bd494b6909a2fe109d28e2b71ca8f413d05911
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150533
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28976}
And a corresponding struct RtpReceiveStats. This is intended
to hold the information exposed via GetStats, which is quite
different from the stats reported to the peer via RTCP.
This is a preparation for moving ReceiveStatistics out of the
individual receive stream objects, and instead have a shared instance
owned by RtpStreamReceiverController or maybe Call.
Bug: webrtc:10679,chromium:677543
Change-Id: Ibb52ee769516ddc51da109b7f2319405693be5d5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148982
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28943}
Old way to produce this histogram was based on RtcpStatisticsCallback
reporting sent RTCP messages, with some additional processing by the
ReportBlockStats class. After this cl, to grand average fraction loss
is computed by StreamStatistician, queried by VideoReceiveStream when
the stream is closed down, and passed to ReceiveStatisticsProxy which
produces histograms.
This is a preparation for deleting the RtcpStatisticsCallback from
ReceiveStatistics.
Bug: webrtc:10679
Change-Id: Ie37062c1ae590fd92d3bd0f94c510e135ab93e8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147722
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28747}
Use the C++-style stdlib headers, add `std::` prefix, in order to avoid implicit casts to double.
Bug: None
Change-Id: I78d9caaee715be341d2480c6d5e769068966d577
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133625
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27905}
Consider stream restart when two sequential packets arrived far from
previous packets' sequence numbers.
instead of resetting on single one.
For packet loss calculation ignore sequence number gap during reset.
Bug: webrtc:9445, b/38179459
Change-Id: I0c2717ef8f9ec182b280ae757b5582f56d9afcef
Reviewed-on: https://webrtc-review.googlesource.com/c/111962
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25890}
inline InOrder check
remove it from IsRetransmit check as redundant
avoid call to IsRetransmitOfOldPacket when packet arrived in order
take current time once
Remove packet overhead counting as unused
Bug: None
Change-Id: Icd8bf69b5076e4469c349529c9ac79a1b15d9515
Reviewed-on: https://webrtc-review.googlesource.com/c/111746
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25749}
Delete the deprecated IncomingPacket method, and convert implementation
to use RtpPacketReceived rather than RTPHeader.
Part 1 was https://webrtc-review.googlesource.com/c/src/+/100104
Bug: webrtc:7135, webrtc:8016
Change-Id: Ib4840d947870403deea2f9067f847e4b0f182479
Reviewed-on: https://webrtc-review.googlesource.com/c/6762
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25648}
Add new method OnRtpPacket, but leave
ReceiveStatisticsImpl::IncomingPacket and most of the implementation
unchanged. Deleting the old method and converting implementation from
RTPHeader to RtpPacketreceived is planned for a followup, after
downstream code is updated.
Bug: webrtc:7135, webrtc:8016
Change-Id: I697ec12804618859f8d69415622d1b957e1d0847
Reviewed-on: https://webrtc-review.googlesource.com/100104
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24889}
Return value always passed as the |retransmitted| argument to
ReceiveStatistics::IncomingPacket. The implementation of this method,
StreamStatisticianImpl::IncomingPacket, can call its own
IsRetransmitOfOldPacket, which is demoted to a private method.
Bug: webrtc:7135
Change-Id: I904db676738689c7a1db4caa588f70e64e3c357d
Reviewed-on: https://webrtc-review.googlesource.com/95649
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24494}
Also consolidate lock operations to public methods only, moving one
CritScope out of UpdateCounters (private) up to IncomingPacket
(public).
Bug: webrtc:7135
Change-Id: I458857d3cfa49961fa34196ffe02cdefd83cec10
Reviewed-on: https://webrtc-review.googlesource.com/96122
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24443}
This reverts commit 84916937b7.
Reason for revert: breaking downstream projects.
Original change's description:
> Update packetsLost and jitter stats any time a packet is received.
>
> Before this CL, the packetsLost and jitter stats (as returned by
> GetStats, at the API level) were only being updated when an RTCP SR or
> RR is generated. According to the stats spec, "local" stats like this
> should be updated any time a packet is received.
>
> This CL also fixes some minor issues with the calculation of packetsLost
> (and fractionLost):
> * Packets weren't being count as lost if lost over a sequence number
> rollover.
> * Temporary periods of "negative" loss (caused by duplicate or out of
> order packets) weren't being accumulated into the cumulative loss
> counter. Example:
> Period 1: Received packets 1, 2, 4
> Loss over that period: 1 (expected 4 packets, got 3)
> Reported cumulative loss: 1
> Period 2: Received packets 3, 5
> Loss over that period: -1 (expected 1 packet, got 2)
> Reported cumulative loss: 1 (should be 0!)
>
> Landing with NOTRY because Android compile bots are broken for an
> unrelated reason.
> NOTRY=True
>
> Bug: webrtc:8804
> Change-Id: I840ba34de8957b1276f6bdaf93718f805629f5c8
> Reviewed-on: https://webrtc-review.googlesource.com/50020
> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23731}
TBR=danilchap@webrtc.org,deadbeef@webrtc.org,ossu@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Landing with NOTRY because ios64_sim_ios10_dbg bot is broken.
Passing all other bots.
NOTRY=True
Bug: webrtc:8804
Change-Id: I07bd6b1206d5a8d211792ad392842f9ed6c505e9
Reviewed-on: https://webrtc-review.googlesource.com/95280
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24370}