Commit graph

26 commits

Author SHA1 Message Date
Danil Chapovalov
3a08d2a42d Reland "Detach RemoteEstimatorProxy from RemoteBitrateEstimator interface"
This reverts commit 6769e95bbc.

Reason for revert: downstream code adjusted

Original change's description:
> Revert "Detach RemoteEstimatorProxy from RemoteBitrateEstimator interface"
>
> This reverts commit 08c7e75892.
>
> Reason for revert: breaks downstream tests
>
> Original change's description:
> > Detach RemoteEstimatorProxy from RemoteBitrateEstimator interface
> >
> > Bug: None
> > Change-Id: I47b7c83320b0c7327c0d2ee59f7a0a30704cd331
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266540
> > Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37354}
>
> Bug: None
> Change-Id: Ia355be085890856141fc943432f6e2edef1c0900
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267065
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37361}

Bug: None
Change-Id: Ifaf8ff84a37a768b388b1f79c8c7829390d1905e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267104
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37367}
2022-06-29 09:38:16 +00:00
Danil Chapovalov
6769e95bbc Revert "Detach RemoteEstimatorProxy from RemoteBitrateEstimator interface"
This reverts commit 08c7e75892.

Reason for revert: breaks downstream tests

Original change's description:
> Detach RemoteEstimatorProxy from RemoteBitrateEstimator interface
>
> Bug: None
> Change-Id: I47b7c83320b0c7327c0d2ee59f7a0a30704cd331
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266540
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37354}

Bug: None
Change-Id: Ia355be085890856141fc943432f6e2edef1c0900
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267065
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37361}
2022-06-28 17:07:44 +00:00
Danil Chapovalov
08c7e75892 Detach RemoteEstimatorProxy from RemoteBitrateEstimator interface
Bug: None
Change-Id: I47b7c83320b0c7327c0d2ee59f7a0a30704cd331
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266540
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37354}
2022-06-28 11:31:23 +00:00
Danil Chapovalov
1220855430 In RemoteEstimatorProxy use Timestamp type
to assemble rtcp::TransportFeedback

Bug: webrtc:13757
Change-Id: I668d9e61d82b454a6884eff223804afc882d86a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264900
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37192}
2022-06-13 10:07:46 +00:00
Per Kjellander
f6934c3f7d Add method ReceiveSideCongestionController::SetTransportOverhead
The method can be used to ensure packets reported to NetworkStateEstimator include transport overhead.

Change-Id: I30f0271aac82633893660c61ea59e3b7c2cf9f31
Bug: webrtc:10742
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265405
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37179}
2022-06-10 13:52:34 +00:00
Jonas Oreland
e62c2f2c77 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf
rename WebRtcKeyValueConfig to FieldTrialsView

Bug: webrtc:10335
Change-Id: If725bd498c4c3daf144bee638230fa089fdde833
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256965
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36365}
2022-03-29 10:14:00 +00:00
Artem Titov
1fd7af5fb8 Use backticks not vertical bars to denote variables in comments for /modules/remote_bitrate_estimator
Bug: webrtc:12338
Change-Id: Ib8b70186223699360e2323411e0c0ba1673bcb7d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227097
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34677}
2021-08-09 12:27:52 +00:00
Victor Boivie
ae1f8f59ac Use a std::deque in RemoteEstimatorProxy
Before this CL, the RemoteEstimatorProxy used a std::map to track which
arrival time a packet with a certain sequence number was received at.
While this works, it's fairly slow as most manipulations and insertions
are O(log(N)) and there were quite many of them.

By taking advantage that sequence numbers generally are received in
sequence, recording a packet is now amortized O(1). Also other
operations such as creating the periodic feedback reports, are also
much faster as it previously was done by searching quite a few times
in that map.

In highly loaded Media Servers, RemoteEstimatorProxy's usage of
std::map attributes to around 0.52% CPU.

Bug: webrtc:12689
Change-Id: I3dd58105f9fbfb111f176833cd4aa6b040c0e01d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217388
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33979}
2021-05-11 10:19:06 +00:00
Victor Boivie
7b4ee155f1 Refactor RemoteEstimatorProxy
As it will be heavily modified in a follow-up change, it's refactored
as a separate commit to make commits small:

 * Extracted code to separate AddPacket and CullOldPackets methods
 * BuildFeedbackPacket now returns a packet. In the next iteration, it
   might not, so it needs to be able to decide when to increment the
   packet sequence number.
 * Documented some existing fields.

The follow-up is in change I3dd58105f9fbfb111f176833cd4aa6b040c0e01d.

Bug: webrtc:12689
Change-Id: I5ad0aee5a7da008f9e209f7c13bf299c12f9d1f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217581
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33942}
2021-05-07 08:06:12 +00:00
Per Kjellander
898f091eeb Replace interfaces for sending RTCP with std::functions in ReceiveSideCongestionController
Logic for throttling how often REMB messages are sent is added to ReceiveSideCongestionController as well as a new method SetMaxDesiredReceiveBitrate. These are based on the logic in PacketRouter. The logic for throttling REMB and setting the max REMB will be removed from PacketRouter in a follow up cl.
The purpose is to eventually decouple PacketRouter from sending RTCP messages when RtcpTransceiver is used.

Bug: webrtc:12693
Change-Id: I9fb5cbcd14bb17d977e76d329a906fc0a9abc276
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215685
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33801}
2021-04-21 13:10:44 +00:00
Markus Handell
edcb90755a Migrate modules/remote_bitrate_estimator to webrtc::Mutex.
Bug: webrtc:11567
Change-Id: Ib3c8f73459088434a70ee86b044dbbbe14db1777
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178810
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31652}
2020-07-07 18:00:39 +00:00
Danil Chapovalov
5528402ef8 Use newer version of TimeDelta and TimeStamp factories in modules/
This change generated with following commands:
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g"
git cl format

Bug: None
Change-Id: I117d64a54950be040d996035c54bc0043310943a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168340
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30489}
2020-02-10 11:49:57 +00:00
Per Kjellander
52f7ae7c89 Make NetworkStateEstimator injectable in RemoteBitrateEstimator
The NetworkStateEstimator is updated on every incoming RTP packet if available.

A rtcp::RemoteEstimate packet is sent every time a rtcp::TransportFeedback packet is sent.

BUG=webrtc:10742

Change-Id: I4cd8e9d85d35faf76aeefd2e26c2a9fe1a62ca3b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152161
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29143}
2019-09-10 18:47:36 +00:00
Per Kjellander
f7cb16ff51 Check input parameter in RemoteEstimatorProxy::IncomingPacket without lock
Also inlined RemoteEstimatorProxy::OnPacketArrival

BUG=NONE

Change-Id: I61c94eafb41ea269baeeb0ef13add79672a1488d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151909
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29109}
2019-09-09 11:51:12 +00:00
Niels Möller
8169db6df2 Expose target bandwidth fraction for transport feedback for field trial
Bug: None
Change-Id: I5b3db8ff18460ac0bfd5e3db994642a21ba90d9a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140944
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28210}
2019-06-10 12:22:34 +00:00
Niels Möller
decc07679d Expose send parameters for RemoteEstimatorProxy for field trial.
Bug: None
Change-Id: I14c74f55ed534fff19042423dad63641bd0fa047
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133187
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27662}
2019-04-17 12:45:47 +00:00
Johannes Kron
f59666b3b2 Fix potential bug due to malformed input
A reasonable amount of incoming packets could generate feedback
for millions of packets.

Bug: chromium:949020
Change-Id: I7f3e6b75b683af5b2732c472cc92c6788540486b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131333
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27481}
2019-04-08 11:46:47 +00:00
Johannes Kron
3c15f468c6 Use SeqNumUnwapper to handle reordering of first packets
Fixed todo by replacing SequenceNumberUnwrapper with updated class
SeqNumUnwrapper that correctly handles reordering of early packets.

Bug: webrtc:10263
Change-Id: Iffd93db924fee132d35752996b8d29acbb315d24
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130498
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27417}
2019-04-02 16:17:32 +00:00
Johannes Kron
599d59237a Extend RemoteEstimatorProxy to support feedback on sender request.
Bug: webrtc:10263
Change-Id: I85b992eff7d1e7ed66ead4745f346ddad2977e8e
Reviewed-on: https://webrtc-review.googlesource.com/c/120800
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26752}
2019-02-19 13:56:44 +00:00
Johannes Kron
7ff164e6e1 Plumbing of feedback on request setting
Bug: webrtc:10263
Change-Id: I23c09e680d6381598e4172b76025ff84f33aa4de
Reviewed-on: https://webrtc-review.googlesource.com/c/121422
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26606}
2019-02-08 10:54:21 +00:00
Sebastian Jansson
aa01f27667 Removes all const Clock*.
This prepares for making the Clock interface fully mutable.

Calls to the time functions in Clock can have side effects in some
circumstances. It's also questionable if it's a good idea to allow
repeated calls to a const method return different values without
any changed to the class instance.

Bug: webrtc:9883
Change-Id: I96fb9230705f7c80a4c0702132fd9dc73899fc5e
Reviewed-on: https://webrtc-review.googlesource.com/c/120347
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26467}
2019-01-30 13:03:37 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Mirko Bonadei
64f813e71f Enable clang::find_bad_constructs for remote_bitrate_estimator.
This CL removes //build/config/clang:find_bad_constructs from the
suppressed_configs list, which means that clang:find_bad_constructs
is now enabled on these translation units.

Bug: webrtc:9251, webrtc:163
Change-Id: Id377fcd78166e53aad7c663c3ffec5e57fdb1274
Reviewed-on: https://webrtc-review.googlesource.com/89383
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24049}
2018-07-20 10:26:07 +00:00
Danil Chapovalov
599df85233 Resolve cyclic dependency in remote bitrate estimator
Access SendTransportFeedback function through new interface to break rbe -> pacing -> rbe cycle
Depend on rtp_rtcp_format source set to break rbe -> rtp_rtcp -> rbe cycle.

Bug: webrtc:6828
Change-Id: Iae1c463a71871c0055485e2eca9b2235d770afec
Reviewed-on: https://webrtc-review.googlesource.com/1620
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19947}
2017-09-25 15:10:14 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h (Browse further)