Replace it with GetSenderReportStats that returns result instead of
filling lots of output parameters
On the way replace pair of uint32_t with dedicated NtpTime type
Bug: None
Change-Id: I5b821b8d000d63ebd8cdc1b9897a86429d97b19b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295560
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39431}
WebRTC doesn't produces such packet and ignores it when receive.
Bug: None
Change-Id: I4af8cb3308cb2422808bdfc420a85fa175085bfb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269181
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37627}
RTCPReceiver::main_ssrc_ and local_media_ssrc() represent the same
value but could get out of sync when `set_media_ssrc()` was called.
Instead of using main_ssrc_, just use the local_media_ssrc() accessor.
Bug: webrtc:11993
Change-Id: I2b034287e6b6025d9b0d2affa391a168896a614b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262663
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36905}
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}
This reverts commit 2c41cbae37.
Reason for revert: The breaking test in Chromium has been temporarily disabled in https://chromium-review.googlesource.com/c/chromium/src/+/3139794/2.
Original change's description:
> Revert "Wire up non-sender RTT for audio, and implement related standardized stats."
>
> This reverts commit fb0dca6c05.
>
> Reason for revert: Speculative revert due to failing stats test in chromium. Possibly because the chromium test expected the metrics to not be supported, and now they are. Reverting just to unblock the webrtc roll into chromium.
>
> Original change's description:
> > Wire up non-sender RTT for audio, and implement related standardized stats.
> >
> > The implemented stats are:
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements
> >
> > Bug: webrtc:12951, webrtc:12714
> > Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
> > Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#34861}
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> TBR=hta,hbos,minyue
>
> Bug: webrtc:12951, webrtc:12714
> Change-Id: If07ad63286eea9cdde88271e61cc28f4b268b290
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231001
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Olga Sharonova <olka@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34897}
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:12951, webrtc:12714
Change-Id: I786b06933d85bdffc5e879bf52436bb3469b7f3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231181
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34930}
This reverts commit fb0dca6c05.
Reason for revert: Speculative revert due to failing stats test in chromium. Possibly because the chromium test expected the metrics to not be supported, and now they are. Reverting just to unblock the webrtc roll into chromium.
Original change's description:
> Wire up non-sender RTT for audio, and implement related standardized stats.
>
> The implemented stats are:
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements
>
> Bug: webrtc:12951, webrtc:12714
> Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
> Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34861}
# Not skipping CQ checks because original CL landed > 1 day ago.
TBR=hta,hbos,minyue
Bug: webrtc:12951, webrtc:12714
Change-Id: If07ad63286eea9cdde88271e61cc28f4b268b290
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231001
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34897}
This will allow us to enable receive-side RTT without having to recreate all AudioReceiveStream objects.
Bug: webrtc:12951
Change-Id: I1227297ec4ebeea9ba15fe2ed904349829b2e669
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225262
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34464}
Webrtc designed to work for point-to-point topology, and thus
each rtcp_receiver handles single remote sender.
While remote sender ssrc may change, it should be ok to assume
the remote endpoint is still the same.
Bug: webrtc:12798
Change-Id: I62aebe7ac802306fc7fa17d7bf3959d6d4cca023
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/224548
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34407}
to NTP.
No-Try because of lack of infra lack of capacity on macs.
No-Try: True
Bug: webrtc:11327
Change-Id: Ie0c9983031a6d37ae54b1d2381c229bee1a89e8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214134
Commit-Queue: Paul Hallak <phallak@google.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34078}
In highly loaded media servers, RTCPReceiver's use of std::map
attributes to ~0.5% CPU. It's mostly ::find and the [] operator, and
they are all keyed by SSRC, which is an unordered data type. This makes
these maps suitable as unordered maps, as they have constant time
complexity for lookups.
Bug: webrtc:12689
Change-Id: I7b305e233fcbed0e452632946ab0de5ee66f8dda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216321
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33850}
These functions are not longer used by the RtpRtcp implementations.
Bug: None
Change-Id: Ibc36433b253b264de4cdcdf380f5ec1df201b17a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207862
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33282}
Currently test code passes pointer to temporary objects, while
RtcpSender passes raw pointers to objects that are then seen as owned,
and will be manually deleted by a overloaded destructor, which is scary
and fragile.
This CL moves all usage to std::unique_ptr<RtcpPacket> instead, which
may create some heap churn in unit tests but that should be fine.
Bug: webrtc:11925
Change-Id: I981bc7ccd6a74115c5a3de64b8427adbf3f16cc7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183920
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32084}
The 'Module' part of the implementation must not be
called via the RtpRtcp interface, but is rather a part of
the contract with ProcessThread. That in turn is an
implementation detail for how timers are currently implemented
in the default implementation.
Along the way I'm deprecating away the factory function which
was inside the interface and tied it to one specific implementation.
Instead, I'm moving that to the implementation itself and down the
line, we don't have to go through it if we just want to create an
instance of the class.
The key change is in rtp_rtcp.h and the new rtp_rtcp_interface.h
header file (things moved from rtp_rtcp.h), the rest falls from that.
Change-Id: I294f13e947b9e3e4e649400ee94a11a81e8071ce
Bug: webrtc:11581
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176419
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31440}
update MOCK_METHODs to use new syntax recommended in go/totw/164
Replace fixture with struct of mocks.
Use main method under test (IncomingPacket) directly rather than through fixture helpers
minor cleanup of the RtcReceiver itself:
make IncomingPacket function more friendly to containers,
mark class as final to verify ability to inherit from it is not used and
thus destructor doesn't need to be virtual.
Bug: None
Change-Id: I346e7dc513b1fbe663ebe5858dec7df0520416a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170226
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30765}
* Removes legacy defines from rtp_rtcp_defines.
* Simplifies the feedback adaptation logic, this is achieved
by using the ability to preserve lost packets information
from the RTCP message.
* Extracts in flight data tracking to a separate helper class.
* Removes legacy fields and constructors from the PacketFeedback
structure.
* Removes the legacy GetTransportFeedbackVector method.
Apart from reducing total LOC, this prepares for moving the adaptation
to run on a TaskQueue.
Bug: webrtc:9883
Change-Id: I5ef4eace0948f119f283cd71dc2b8d0954a1449b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158781
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29674}
The name media_send_ssrc makes less sense when used mostly for the
RtcpReceiver functionality.
The old member is still there and used as a fallback. That will be
cleaned away after downstream code is fixed.
Bug: webrtc:10774
Change-Id: I4ec18db76910f31dfe76bc9b137ffe89220d3fa8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149836
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28923}
Cname callback is used only on receive side, and statistics (soon)
only on the send side.
Bug: webrtc:10679
Change-Id: I122e9cafaea93cd0ba75dc955a652d9d4bddc379
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147867
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28767}
The ReportBlockData contains information about a ReportBlock and
additional data such as RTT. This will be used for the calculation of
RTCRemoteInboundRtpStreamStats, see full picture here:
https://webrtc-review.googlesource.com/c/src/+/134107
ReportBlockData is a class version of the previously internal struct
RTCPReceiver::ReportBlockWithRtt.
- The new name makes sense even if we add more info to it, which will
be needed for future metrics.
- The new location is modules/rtp_rtcp/include/report_block_data.h.
The RTCPReceiver allows obtaining the ReportBlockData in two ways:
1. Using a ReportBlockDataObserver that is notified on receiving a
report block.
2. Using the GetLatestReportBlockData().
Both codepaths will be needed; video stats uses observers and audio
stats uses polling.
Further plumbing will be done in follow-up CLs.
Bug: webrtc:10455, webrtc:10456
Change-Id: Ic9e5b4f451b5f4b203efcd6fa3bbf9736487e1f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136584
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27961}
With this change, both the normal RTP and the transport-wide sequence
numbers are propagated with with AddPacket() call via a new
RtpPacketSendInfo struct, replacing the previous set of parameters.
The intent with this is that SendTimeHistory can hold a mapping from
transport-wide to rtp sequence numbers, and then via callbacks let the
RTP modules know when packets have been received by the remote end.
Bug: webrtc:8975
Change-Id: I6a24fc6282cbb041393752d39593c2867b242192
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133021
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27708}
And delete corresponding dependencies on :webrtc_common. After this
change, common_types.h is included directly only from code in the
following directories:
api/
api/video/
api/video_codecs/
common_video/libyuv/include/
media/base/
modules/remote_bitrate_estimator/
modules/rtp_rtcp/source/
modules/video_coding/codecs/vp9/
There remains plenty of indirect dependencies on the types declared in
common_types.h, but the fewer direct dependencies should make it
easier to find the proper place for each type.
Bug: webrtc:5876
Change-Id: I93e8f214025ecb613c19fdec2015bd3f96c59aae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130501
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27376}
This is a follow up of a comment in
https://webrtc-review.googlesource.com/c/src/+/110105
It was not very useful to split the audio and video report interval since the RTCP module can only either be audio or video.
The recent it was written that way in https://webrtc-review.googlesource.com/c/src/+/43201/ was because that was a straightforward transition from two global constants to two variable.
Bug: webrtc:8789
Change-Id: I2293de14ba5f363351f379a02022ed5dc7b8d458
Reviewed-on: https://webrtc-review.googlesource.com/c/110824
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jiawei Ou <ouj@fb.com>
Cr-Commit-Position: refs/heads/master@{#25741}
Use helper TimeMicrosToNtp() on clock TimeInMicroseconds()
instead of CurrentNtpTime() and CurrentNtpTimeMillis()
Also update TimeMicrosToNtp() to not introduce fractional in
milliseconds offset. Expose that offset in time_utils.h
Add test showing indended behavior.
Bug: webrtc:9919
Change-Id: I8b019e11ae5b79d0b8ba113a84066b0369cd2575
Reviewed-on: https://webrtc-review.googlesource.com/c/107889
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25391}
In order to have public video bitrate allocator factory, the video bitrate allocator has be part of
the api.
Bug: webrtc:9513
Change-Id: Ia2e5ab9eb988c710c1ac492afccc470a92544aa2
Reviewed-on: https://webrtc-review.googlesource.com/88083
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jiawei Ou <ouj@fb.com>
Cr-Commit-Position: refs/heads/master@{#24073}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
Since the webrtc_common build target does not have visibility set, we
cannot easily use BitrateAllocation in other parts of Chromium.
This is currently blocking parts of chromium:794608, and I know of other
usage outside webrtc already, so moving it to api/ should be warranted.
Also, since there's some naming confusion and this class is video
specific rename it VideoBitrateAllocation. This also fits with the
standard interface for producing these: VideoBitrateAllocator.
Bug: chromium:794608
Change-Id: I4c0fae40f9365e860c605a76a4f67ecc9b9cf9fe
Reviewed-on: https://webrtc-review.googlesource.com/70783
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22986}
Using a mock of rtp transport controller send in audio send stream unit
tests. This reduces the dependencies and makes the tests more focused
on testing the functionality of audio send stream itself.
Bug: webrtc:8415
Change-Id: Ia8d9cf47d93decc74b10ca75a6771f39df658dc2
Reviewed-on: https://webrtc-review.googlesource.com/56600
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22161}