Commit graph

410 commits

Author SHA1 Message Date
Elad Alon
fddbe6c632 Improve readability in GoogCcNetworkController::OnSentPacket
Bug: None
Change-Id: Iff8a73611982506d44ac6818300663c3a4ac49b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155177
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29363}
2019-10-01 16:27:00 +00:00
Sebastian Jansson
e00ea5ef11 Refactoring CapBitrateToThresholds in SendSideBandwidthEstimation.
Renaming and splitting it into helper methods. This is to more clearly
separate the things it does and prepares for moving things to GoogCC.

Additionally, replacing calls with current_target_ as input with
ApplyTargetLimits to better reflect the intended behavior.

Bug: webrtc:9883
Change-Id: I2c47ec74a9cbc271aff91645c763373297f26acc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154425
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29346}
2019-09-30 13:30:32 +00:00
Sebastian Jansson
2bc55585f6 Renaming variables in SendSideBandwidthEstimation.
This makes them better reflect their contents and usage. Also replacing
zero with infinity where it's used to reflect the lack of a limit.

Bug: webrtc:9883
Change-Id: Ibc498aa3a41d34c16d363e892a927e482949ab51
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154423
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29313}
2019-09-26 08:30:40 +00:00
Sebastian Jansson
ad10222289 Cleanup of unused field trials and options in SendSideBandwidthEstimation
Bug: webrtc:9883
Change-Id: Icbf4d6cb84da51f800343675f181e41b7cc45a6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154422
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29306}
2019-09-25 15:08:12 +00:00
Sebastian Jansson
461ee8538a Cleanup of target rates in GoogCC/SendSideBandwidthEstimation.
Removing the redundant last_estimated_bitrate_bps_ and renaming some
members to better reflect the contents. Also replacing the CurrentEstimate
method of SendSideBandwidthEstimation with value specific access methods.

Bug: webrtc:9883
Change-Id: I73cb08e09374adddf5991cb3793fa4a4fee20c85
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154351
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29304}
2019-09-25 14:31:39 +00:00
Sebastian Jansson
01dd88505c Moves contents of bitrate_controller to goog_cc
This CL moves send_side_bandwidth_estimation.cc/h and
loss_based_bandwidth_estimation.cc/h from modules/bitrate_controller
to modules/congestion_controller/goog_cc.

Bug: webrtc:9883
Change-Id: Ibb2c2ba3762007e7e5114f39042ee96431b73776
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154346
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29297}
2019-09-25 08:43:24 +00:00
Sebastian Jansson
f34116e356 Replacing bandwidth adaptation trial with stable target in Opus encoder.
This also means that the NetworkEstimate::bandwidth can be deprecated
as it's currently just a copy of the target_rate.

Bug: webrtc:10981
Change-Id: I1bc57b98480bd77ce052736b19d630c775428546
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153669
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29288}
2019-09-24 16:35:02 +00:00
Björn Terelius
489843f1b1 Improve trendline estimator logging.
Bug: None
Change-Id: I7cc6dc7f45ddb7325252516490436bea1ec8d250
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153521
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29231}
2019-09-19 08:33:11 +00:00
Mirko Bonadei
317a1f09ed Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
2019-09-17 15:47:29 +00:00
Per Kjellander
dc7d2c6fd7 Backoff to acked bitrate during first overuse detection
In DelayBasedBwe, in experiment WebRTC-Bwe-AlrLimitedBackoff, back off relative the BWE only after the first detected overuse. The first time overuse is detected, back down to the acked bitrate.

The idea is to faster drop BWE in the beginning of the call when the initial BWE guess may be too high. Withouth this, it may take a too long time to initially back down.

BUG=webrtc:10542

Change-Id: I2a11457d2391ad25658e7c13d9cae02a38973ecb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152541
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29163}
2019-09-12 10:51:45 +00:00
Danil Chapovalov
16cb1f61c0 Stop using rtc_event.h forward header
Bug: webrtc:10206
Change-Id: I16905ec745673178195d6715fda6175c31500163
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151601
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29149}
2019-09-11 08:20:29 +00:00
Florent Castelli
1067d31022 Make the stable target rate always less or equal than the target rate
This behavior seems to conform to expectations from the rate allocators,
using this signal to chose which layers to enable and then distributing
the remaining bandwidth to the activated layers.

Bug: webrtc:10126
Change-Id: If0e1b27dc672ec2fbb30a5f5ac734e5ed4b42e45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151306
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29065}
2019-09-04 13:56:50 +00:00
Bjorn Terelius
602942f14c Filter out small packets from delay-based overuse detection.
The change is behind a field trial. The intention is to use this
to (heuristically) base the bandwidth estimate only on video packets
even if both audio and video packets have transport sequence numbers.

Bug: webrtc:10932
Change-Id: I6cc5bb9ab6f1a3f25b84ee6ac78e4abb4112032e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150787
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29031}
2019-09-01 17:57:01 +00:00
Florent Castelli
4e615d590a Wire the stable target bitrate from GoogCC to the BitrateAllocator
Deprecated the field BitrateAllocationUpdate::link_capacity since it is only
used by the Opus codec in order to smooth the target bitrate, which is
equivalent to the stable_target_bitrate field.

The unused field trial WebRTC-Bwe-StableBandwidthEstimate is also removed.

Bug: webrtc:10126
Change-Id: Ic4a8a9ca4202136d011b91dc23c3a27cfd00d975
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149839
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28941}
2019-08-22 15:25:15 +00:00
Konrad Hofbauer
fdf38802a6 Make "WebRTC-BweAllocProbingOnlyInAlr/Enabled/" default and remove key.
Bug: chromium:951299
Change-Id: Idf612040e21f2962cc63d7de3dcb237bbf868034
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148985
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Konrad Hofbauer <hofbauer@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28902}
2019-08-19 15:39:25 +00:00
Sebastian Jansson
3aa0d76cb0 Use struct parser for AlrDetector config.
Bug: webrtc:9883
Change-Id: Ib58fa5ba87607a268f4960898625b1a5adcab69a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148596
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28862}
2019-08-14 18:23:05 +00:00
Niels Möller
5297cf368d Delete unused class MockTargetTransferRateObserver
Bug: None
Change-Id: I60e9dc05450207dfd572ae17a42cf1adaed4c1b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148525
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28813}
2019-08-09 06:15:06 +00:00
Danil Chapovalov
83bbe91398 Delete deprecated rtc_event_log header
Bug: webrtc:10206
Change-Id: I9ed3148843c647372993729b87c0e74741ab540b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147870
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28791}
2019-08-07 10:58:17 +00:00
Evan Shrubsole
7db19e0b02 Report congestion window updates on GoogCC time updates
In https://webrtc-review.googlesource.com/c/src/+/138275
the congestion window was recalculated during OnProcessInterval, as
to consider the case when downlink is down. However, this update
was not propagated to the congestion window pusback controller,
nor returned in the update.

This patch fixes that issue, as well as adding two tests to ensure
the behaviour works as expected.

Bug: None
Change-Id: Ic126d929dc7a7a3393a2f34a4682eea1ee1f2240
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146704
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28667}
2019-07-24 14:49:59 +00:00
Evan Shrubsole
55c4a42099 Add congestion window values to GoogCcPrinter
Bug: None
Change-Id: I9a31e9783f3ea8482281285c8454e24eb15f0925
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146706
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#28661}
2019-07-24 13:27:16 +00:00
Sebastian Jansson
22ff9fc6bc Removes overuse predictor.
It's not currently used and it complicates receive side estimation.

Bug: webrtc:10742
Change-Id: Iaa3c86807c7b637aea3ff393e728dc91eac23db6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145724
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28623}
2019-07-19 15:22:25 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Sebastian Jansson
49167de0be Adds interface for remote network estimates to NetworkControllerInterface.
Bug: webrtc:10742
Change-Id: I593fc17ce5d42c5dc17fd289f0621230319f9752
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144039
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28405}
2019-06-27 16:57:32 +00:00
Sebastian Jansson
88290ae358 Reland "Cleanup of RTP references in GoogCC implementation."
This is a reland of fa79081dca

It crashed due to inability to handle small timestamps in probe
estimator. This was fixed by moving history window check to avoid
subtracting from the timestamp.

Original change's description:
> Cleanup of RTP references in GoogCC implementation.
>
> As the send time congestion controller now has been removed,
> we don't need the RTP related constructs anymore.
>
> Bug: webrtc:9510
> Change-Id: I02c059ed8ae907ab4672d183c5639ad459b581aa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142221
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28330}

Bug: webrtc:9510
Change-Id: I3bf91222068e4fbb6aa159bfeb7a73e00bb6a0d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143165
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28347}
2019-06-24 09:10:52 +00:00
Sebastian Jansson
7953ad5dab Revert "Cleanup of RTP references in GoogCC implementation."
This reverts commit fa79081dca.

Reason for revert: Breaks downstream project.

Original change's description:
> Cleanup of RTP references in GoogCC implementation.
> 
> As the send time congestion controller now has been removed,
> we don't need the RTP related constructs anymore.
> 
> Bug: webrtc:9510
> Change-Id: I02c059ed8ae907ab4672d183c5639ad459b581aa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142221
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28330}

TBR=terelius@webrtc.org,srte@webrtc.org

Change-Id: I562365fc5d1da68326d603338ccc6371114d7e12
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9510
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143164
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28331}
2019-06-20 10:21:51 +00:00
Sebastian Jansson
fa79081dca Cleanup of RTP references in GoogCC implementation.
As the send time congestion controller now has been removed,
we don't need the RTP related constructs anymore.

Bug: webrtc:9510
Change-Id: I02c059ed8ae907ab4672d183c5639ad459b581aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142221
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28330}
2019-06-20 10:08:29 +00:00
Sebastian Jansson
5740afa0a4 Removes SimulatedTimeClient
Bug: webrtc:9883
Change-Id: Id6e760b37360e7dafc67ded99e06128be20797d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141417
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28269}
2019-06-13 15:37:10 +00:00
Sebastian Jansson
f3f57700a8 Using full scenario test client for loss based control test.
Bug: webrtc:9883
Change-Id: I7c3b2561ddba846e4cdde05e1067679ada14ad80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141405
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28267}
2019-06-13 14:44:09 +00:00
Sebastian Jansson
28aced5c3c Adds debug logs for loss based controller.
Bug: webrtc:9883
Change-Id: I525d88b1eba22f6198da04b1e18c26ec4a15c42d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141406
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28230}
2019-06-11 13:08:55 +00:00
Sebastian Jansson
b13ccc5288 Adds TCP fairness test to GoogCC.
Bug: webrtc:9883
Change-Id: Ie78e51edb08f6c22dbf02168b1d3b067b2c0c55e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140293
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28193}
2019-06-07 11:52:03 +00:00
Jonas Olsson
944dacec25 Make interval budget use ratio instead of percent
All usages compare the budget usage to ratios, so we can skip a few
multiplications.

Bug: webrtc:10719
Change-Id: I0205d74762043d972c087c152915e4fdd9510057
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140289
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28190}
2019-06-07 08:53:57 +00:00
Christoffer Rodbro
b3b3e3f632 Add acked bandwidth estimator config for sample uncertainty in ALR.
Change-Id: Ie01d66d459f704e7fa99b439dd6f917e4e41cead
Bug: webrtc:10698
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139106
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28105}
2019-05-29 13:08:53 +00:00
Sebastian Jansson
0b97e177e1 Cleanup of CongestionWindowDownlinkDelay trial.
Bug: webrtc:9883
Change-Id: If77fdad610149c01d72891d4a9f61b61006b21ce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138827
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28087}
2019-05-28 14:16:44 +00:00
Ying Wang
8b27910cbc Include downlink delay into congestion window size.
Change-Id: I33db0c8134b6b3181a7b3abcf32a622a89ff3ab4

Bug: webrtc:10688
Change-Id: I33db0c8134b6b3181a7b3abcf32a622a89ff3ab4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138275
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28079}
2019-05-27 16:07:19 +00:00
Jonas Olsson
2e8d78ce42 Allow overriding subsets of probing field trials
The probe configuration is currently a single field trial. To allow
multiple experiments with non-overlapping subsets of these keys I've
added a few extra keys that override different subsets of the config.

Bug: webrtc:10394
Change-Id: I54ffd1105129794fcdae4cce314910acaa4074af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138274
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28076}
2019-05-27 13:43:45 +00:00
Sebastian Jansson
acab559c7b Adds overuse predictor to GoogCC.
Bug: webrtc:10498
Change-Id: Ic97c16d28cbc1e30609f6c1daa3a61423d44641c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136924
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28012}
2019-05-21 16:50:39 +00:00
Sebastian Jansson
871ac42597 Refactor of GoogCC debug printer.
Simplifying the code to better fit with how it is used.

Bug: webrtc:9883
Change-Id: I2bd52f26b829413e516dee4f551cf36574275019
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136681
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27994}
2019-05-20 18:40:26 +00:00
Per Kjellander
eb9bf411f3 Fix problem in WebRTC-Bwe-AlrLimitedBackoff experiment
When backing down, the delay based estimator can still use acked bitrate instead of the last set estimate.

Original code was reviewed in:
https://webrtc-review.googlesource.com/c/src/+/113880

BUG=webrtc:10144

Change-Id: Ia6e2d6d7d05f88f7e51d61b6e37c61a89adccf8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135950
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27912}
2019-05-10 13:58:27 +00:00
Per Kjellander
b600de286e Provide AlrDetector with event log in GoogCC.
BUG=webrtc:10596

Change-Id: Ifd02419c6880dd55e18c46ec07976f1dde66bad7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135124
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27844}
2019-05-03 13:24:15 +00:00
Sebastian Jansson
e847481dc8 Adds debug printing of network estimate.
Bug: webrtc:10498
Change-Id: Idce952675ef079b5981f973ca58ca2cd7e5d5332
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134648
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27838}
2019-05-03 10:08:46 +00:00
Sebastian Jansson
2db5fc00c0 Deprecating injection of event log into GoogCC factory.
Bug: webrtc:9883
Change-Id: I6087b4a0a2c934e6a9ab435fffaf2eb1fc2a29e4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134644
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27824}
2019-05-02 11:05:17 +00:00
Per Kjellander
a7caaf07a1 Change AlrDetector to be able to set field trials that only affect AlrDetector
Bug: webrtc:10542
Change-Id: If7cb4086dfcfb313c6ffc0b8f662b8eae5bd4355
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134200
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27804}
2019-04-29 13:46:35 +00:00
Sebastian Jansson
7ccaf8969d Cleanup of network controller handling in Scenario tests.
Removing functionality to choose congestion controller implementation,
using injection instead. Also cleaning up some related functionality
that's no longer needed, such as the injection of event logs into the
factory.

Bug: webrtc:9883
Change-Id: Ia528005625430ae31a15bc88881e2d4ac6ad1d42
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133890
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27768}
2019-04-25 12:40:00 +00:00
Sebastian Jansson
5e3d0f88c8 Moves trendline estimation configuration to trendline_estimator.cc
Bug: webrtc:9883
Change-Id: I5b2139de0c085e1c5ec7c55b5c5ff9a95067e170
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134205
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27767}
2019-04-25 12:27:19 +00:00
Per Kjellander
416d5db75d Add field trial to AimdRateController to only increase while not in ALR
The idea is that when ALR is detected, the encoder can not produce the bitrate
needed for the delay based estimator to detect overuse and thus the delay based
estimator should not be allowed to increase further.
Likewise, if ALR is not detected, the delay based estimator is allowed to
increase the BWE to ensure that there is no region where the BWE can get stuck.

BUG=webrtc:10542

Change-Id: Ic94b708461c9077fd09132ee4ecb6279ffcd5f99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133190
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27661}
2019-04-17 12:05:24 +00:00
Per Kjellander
494947bbcf Remove direct use of FieldTrials from modules/remote_bitrate_estimator
Instead use WebRtcKeyValueConfig and FieldTrialBasedConfig

BUG=webrtc:10335

Change-Id: Ie148cb466f86d8fa1ded5c7f125fbcccf6e7dbe3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132714
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27642}
2019-04-16 13:23:12 +00:00
Sebastian Jansson
df88cc014a Allow injection of network estimator into GoogCC.
Bug: webrtc:10498
Change-Id: Ie9225411db201dfcfa0a37a3c40992acbdc215bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132402
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27624}
2019-04-15 14:12:08 +00:00
Sebastian Jansson
ef86d1413e Refactor of SimulationNode.
This prepares for using network emulation manager in Scenario tests.

Bug: webrtc:9510
Change-Id: I6ae1b21790d0bcd2b01a3b293231d0859afc1ac8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132719
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27623}
2019-04-15 14:11:00 +00:00
Per Kjellander
5b69873cb5 Remove direct use of FieldTrials from AlrDetector
Instead use WebRtcKeyValueConfig and FieldTrialBasedConfig.
The purpose is to allow a user of GoogCC to use different settings on different instances.

BUG=webrtc:10335

Change-Id: I2f837688c9fdd341eecb44484cc784b1c80da1a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132791
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27617}
2019-04-15 12:11:36 +00:00
Evan Shrubsole
ae68ea0008 Reland "Add new field trial for controlling congestion window settings"
This is a reland of dd33d8ec71

Original change's description:
> Add new field trial for controlling congestion window settings
>
> Bug: None
> Change-Id: Idb7425e394db74a9dfb4f3764a58710497adff56
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131127
> Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Commit-Queue: Evan Shrubsole <eshr@google.com>
> Cr-Commit-Position: refs/heads/master@{#27538}

TBR=mflodman@webrtc.org,crodbro@webrtc.org

Bug: None
Change-Id: Icee2efb90e219ef2c3384ad84498fd6938a98e56
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132400
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27550}
2019-04-10 16:49:08 +00:00
Ying Wang
0810a7c25a Add base class NetworkPredictor and NetworkPredictorFactory and wire up.
Add base class NetworkPredictor and NetworkPredictorFactory in /api, make it possible to inject customized NetworkPredictor in PeerConnectionFactory level. The NetworkPredictor object will be pass down to GoogCCNetworkControl and DelayBasedBwe.

Bug: webrtc:10492
Change-Id: Iceeadbe1c9388b11ce4ac01ee56554cb0bf64d04
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130201
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27543}
2019-04-10 12:38:58 +00:00
Evan Shrubsole
bd167cf140 Revert "Add new field trial for controlling congestion window settings"
This reverts commit dd33d8ec71.

Reason for revert: Breaks upstream tests

Original change's description:
> Add new field trial for controlling congestion window settings
>
> Bug: None
> Change-Id: Idb7425e394db74a9dfb4f3764a58710497adff56
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131127
> Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Commit-Queue: Evan Shrubsole <eshr@google.com>
> Cr-Commit-Position: refs/heads/master@{#27538}

TBR=mflodman@webrtc.org,crodbro@webrtc.org,eshr@google.com

Change-Id: I17c6c2ed109f4427657457065abe186ec8b3d10c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132322
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27541}
2019-04-10 12:18:38 +00:00
Konrad Hofbauer
25f35a8fa5 Add FieldTrial to only send probes on OnMaxTotalAllocatedBitrate()
if currently sent bitrate is application-limited.

Bug: chromium:951299
Change-Id: Ibc1ebd74eaa4a019dc290c11b606796c5be21d0f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131126
Commit-Queue: Konrad Hofbauer <hofbauer@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27539}
2019-04-10 11:23:35 +00:00
Evan Shrubsole
dd33d8ec71 Add new field trial for controlling congestion window settings
Bug: None
Change-Id: Idb7425e394db74a9dfb4f3764a58710497adff56
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131127
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#27538}
2019-04-10 10:52:51 +00:00
Mirko Bonadei
6a489f22c7 Fully qualify googletest symbols.
Semi-automatically created with:

git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format

After this, two .cc files failed to compile and I have fixed them
manually.

Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
2019-04-09 17:18:20 +00:00
Sebastian Jansson
ebd94f6df1 Using simulated time for GoogCC tests.
Bug: webrtc:10365
Change-Id: I482e544f1585fdb54dc49740ba81870104dd58a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130509
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27468}
2019-04-05 15:58:29 +00:00
Sebastian Jansson
d98cbd8f91 Moves send side bandwidth estimation bandwidth cap inside class.
Bug: webrtc:9883
Change-Id: I0bcfacccf522de1a7276c5bee07418159c57e514
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130495
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27421}
2019-04-02 18:03:04 +00:00
Sebastian Jansson
5b84f67fba Cleaner reading of field trials in GoogCcNetworkController.
Bug: webrtc:9883
Change-Id: Ib871dfdef6221f2a231f6862edec6ed7db684613
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130515
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27420}
2019-04-02 17:58:09 +00:00
Niels Möller
9d8eaac4ee Delete unneeded direct includes of common_types.h
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}
2019-04-01 07:18:13 +00:00
Christoffer Rodbro
ed2207abee Introduce a configurable "critical low" bandwidth in AIMD rate control.
When a bandwidth decrease to the estimated throughput would lead to
the "critical low" region we allow dropping to the link capacity
estimate instead (if it is higher).
Also moved BweInitialBackOffInterval config to the same field trial
string.

Bug: webrtc:10462
Change-Id: I4d6ee020a9ab8cede035b64253e3b3b1e2fb92b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129920
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27325}
2019-03-27 19:37:05 +00:00
Christoffer Rodbro
53c75cff2e Fix for acknowledged bitrate estimator getting stuck at low bandwidth.
Problem seems to be that once the estimate drops, "sample_uncertainty"
becomes very large, and it therefore takes a long time to recover.
Fix is under config for further downstream verification.

Bug: webrtc:10462
Change-Id: I5c2035f06e8a5088db0f0cb6ca511ef900e07645
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128902
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27320}
2019-03-27 16:16:37 +00:00
Jonas Olsson
01d3618a75 Make the OnMaxTotalAllocation probes configurable.
This CL allows us to control how many probes we send when the bandwidth
allocation is updated, and how big they are.

Bug: webrtc:10394
Change-Id: I19e40740a528f83384b65d7509295034cc9a3031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129904
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27317}
2019-03-27 16:10:17 +00:00
Christoffer Rodbro
4bd3177ae5 Reland "Avoid calling OnRoundTripTimeUpdate with invalid RTTs."
This is a reland of afa61c94e5

Original change's description:
> Avoid calling OnRoundTripTimeUpdate with invalid RTTs.
> 
> Bug: none
> Change-Id: Ic19b87ad7094465da6091d0e99b10a6d1b7d2e58
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128776
> Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27308}

Bug: none
Change-Id: Ic5669a27ea66ab0c207556c54bb595c83850ffd3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129924
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27315}
2019-03-27 15:07:11 +00:00
Jonas Olsson
24923e8cfa Make some constants in the bitrate prober configurable.
This lets us change how many bytes and packets goes into the probes, as
well as some other things.

Bug: webrtc:10394
Change-Id: I26bb26a644e6f00366e9275228760c8744d63735
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128424
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27312}
2019-03-27 13:50:35 +00:00
Christoffer Rodbro
7b6acd68ee Revert "Avoid calling OnRoundTripTimeUpdate with invalid RTTs."
This reverts commit afa61c94e5.

Reason for revert: Breaks a downstream test.

Original change's description:
> Avoid calling OnRoundTripTimeUpdate with invalid RTTs.
> 
> Bug: none
> Change-Id: Ic19b87ad7094465da6091d0e99b10a6d1b7d2e58
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128776
> Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27308}

TBR=srte@webrtc.org,crodbro@webrtc.org

Change-Id: Ic4c516d3325050858ac99731f6d25181fb40b7bd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129922
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27309}
2019-03-27 12:52:48 +00:00
Christoffer Rodbro
afa61c94e5 Avoid calling OnRoundTripTimeUpdate with invalid RTTs.
Bug: none
Change-Id: Ic19b87ad7094465da6091d0e99b10a6d1b7d2e58
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128776
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27308}
2019-03-27 12:13:25 +00:00
Sebastian Jansson
7db3bb95dc Revert "Remove rtc::TimeMillis() call from ALR detector."
This reverts commit 2c7964832e.

NOTE: Build file changes had to be manually reverted to avoid
merge conflict.

Reason for revert: Bad interaction with Chromium issue.

Original change's description:
> Remove rtc::TimeMillis() call from ALR detector.
>
> We want to avoid system clock dependencies in congestion
> controllers as it makes it harder to test them. This CL removes
> a rtc::TimeMillis() call from the AlrDetector class and removes
> dependencies on rtc_base_approved as it exposes time_utils.h.
>
> Bug: None
> Change-Id: Ie50a27399c05a0c50cdc17ad142db884b94ee918
> Reviewed-on: https://webrtc-review.googlesource.com/c/124491
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26879}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:942752
Change-Id: I7fc4391f16779ebb5d3c72a058fc72a3e4c64bce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129440
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27267}
2019-03-25 14:08:53 +00:00
Sebastian Jansson
9debe5aee4 Deleting copy constructors for Scoped* classes.
Bug: webrtc:10365
Change-Id: Ia670b7b1ac72eb19f9e30228fd023601e2fb8a88
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128901
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27259}
2019-03-25 09:05:29 +00:00
Artem Titov
94b57c044e Cleanup BUILD.gn files from imports like foo:foo
Repalce all occurrences of foo:foo in deps with just foo in BUILD.gn
files.

Done with Sublime regex replace.
Find: \b([-a-zA-Z0-9_]+):+\1\b
In: *.gn
Replace with: \1

Bug: None
Change-Id: I40aba1b14face687a595b852ffe443cb20197611
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127899
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27225}
2019-03-21 13:05:28 +00:00
Artem Titov
533a9fec55 Clean BUILD.gn files: remove extra :memory
Use //third_party/abseil-cpp/absl/memory instead of
//third_party/abseil-cpp/absl/memory:memory in BUILD.gn files.

Bug: None
Change-Id: I47c915f0847b102b37c5b38009c91b315cd3a1b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128615
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27222}
2019-03-21 12:09:50 +00:00
Sebastian Jansson
7dbc0eb2ef Makes loss based controller test more robust.
Current implementation of loss based controller has a sensitive filter.
This CL increases the moderate loss rate to ensure robustness to small
changes in network behavior.

Bug: webrtc:10365
Change-Id: I0dcb5ba45904d8dda4c78b39bd13619523bc90ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127901
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27160}
2019-03-18 12:21:11 +00:00
Magnus Jedvert
35816cc9a1 Revert "Log an error if the RTT is negative"
This reverts commit a594ef0893.

Reason for revert: This log is triggered more than 10,000 times per run, spamming the log output to the extent that tests start failing with EXCESSIVE_OUTPUT.

The tests are chromium.webrtc.fyi tests:
 * WebRtcStressResolutionSwitchBrowserTest.MANUAL_SurvivesPeerConnectionResolutionSwitching
 * WebRtcStressPauseBrowserTest.MANUAL_SurvivesPeerConnectionVideoPausePlaying
on linux, win, and mac.

Example run: https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Linux%20Tester/2556

Original change's description:
> Log an error if the RTT is negative
> 
> Bug: webrtc:10407
> Change-Id: I5479cb2b7163c6e9e58854f4ffa7976b3d606da5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127568
> Commit-Queue: Evan Shrubsole <eshr@google.com>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27122}

TBR=srte@webrtc.org,eshr@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:10407
Change-Id: Ida2572b722b92bae4893d4567597dd21d1df54b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128120
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27144}
2019-03-15 13:11:24 +00:00
Evan Shrubsole
a594ef0893 Log an error if the RTT is negative
Bug: webrtc:10407
Change-Id: I5479cb2b7163c6e9e58854f4ffa7976b3d606da5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127568
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27122}
2019-03-14 08:44:09 +00:00
Sebastian Jansson
5ce38fff17 Making UpdatesTargetRateBasedOnLinkCapacity more robust.
This CL adds enough simulated time to recover the built up delay. This
makes the test less sensitive to small timing changes. This prepares
for further changes in Scenario test framework.

Bug: webrtc:10365
Change-Id: Iddbe6a57e31f17f590004e29221f907321cbb3d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127567
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27107}
2019-03-13 15:36:55 +00:00
Seth Hampson
bd50a84336 Revert "Reland "DCHECK feedback_rtt is positive""
This reverts commit ab0d03dcaa.

Reason for revert: Broke webrtc importer.

Original change's description:
> Reland "DCHECK feedback_rtt is positive"
> 
> This is a reland of 37d4f91db3
> Reason for reland: Got Aliby for Android FEC test flakes.
> 
> Original change's description:
> > DCHECK feedback_rtt is positive
> >
> > Bug: None
> > Change-Id: I6eb10d6a20a679fff08f604441f8e58dcd417608
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126464
> > Commit-Queue: Evan Shrubsole <eshr@google.com>
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#27034}
> 
> Bug: None
> Change-Id: Iacacda9e3b141c69189f7931a1ec63d74b2dd845
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126920
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Ying Wang <yinwa@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27082}

TBR=srte@webrtc.org,yinwa@webrtc.org,yvesg@webrtc.org,yvesg@google.com,eshr@google.com

Change-Id: Ia59f20019309c1e0b44029179d63558e92d39a85
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127324
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27085}
2019-03-12 19:40:25 +00:00
Evan Shrubsole
ab0d03dcaa Reland "DCHECK feedback_rtt is positive"
This is a reland of 37d4f91db3
Reason for reland: Got Aliby for Android FEC test flakes.

Original change's description:
> DCHECK feedback_rtt is positive
>
> Bug: None
> Change-Id: I6eb10d6a20a679fff08f604441f8e58dcd417608
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126464
> Commit-Queue: Evan Shrubsole <eshr@google.com>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27034}

Bug: None
Change-Id: Iacacda9e3b141c69189f7931a1ec63d74b2dd845
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126920
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27082}
2019-03-12 17:00:51 +00:00
Jonas Olsson
e096004745 Enable configuring probes via field trial.
This CL adds a field trial that lets us control the size of the initial probes, how we grow the following probes and how big and frequent our ALR probes are.

Bug: webrtc:10394
Change-Id: I6c7783dfada9aaf55cd836dd8991bb7b8ca4993b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126880
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27077}
2019-03-12 14:27:18 +00:00
Sebastian Jansson
8a0c1f58cc Don't reset bitrate when allocatable minimum changes.
This fixes an issue where the time between freezes dropped in
perf tests. This was triggered by resetting and updating the bitrates
immediately if the min allocatable bitrate changed, causing a drop in
target bitrate. With this CL, the change in min bitrate will not take
effect until we get more data.

Bug: chromium:940349
Change-Id: Ia680a5f1cfe71847ef90669987e7b89b240b9524
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126625
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27054}
2019-03-11 11:46:38 +00:00
Yves Gerey
c0c3e966d3 Revert "DCHECK feedback_rtt is positive"
This reverts commit 37d4f91db3.

Reason for revert: Breaks downstream Android projects.

Original change's description:
> DCHECK feedback_rtt is positive
> 
> Bug: None
> Change-Id: I6eb10d6a20a679fff08f604441f8e58dcd417608
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126464
> Commit-Queue: Evan Shrubsole <eshr@google.com>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27034}

TBR=srte@webrtc.org,yinwa@webrtc.org,eshr@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: None
Change-Id: I412cc3bf9fd6991d3afa68c0fd9289bfc84a98cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126622
Reviewed-by: Yves Gerey <yvesg@google.com>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#27047}
2019-03-10 11:00:37 +00:00
Evan Shrubsole
37d4f91db3 DCHECK feedback_rtt is positive
Bug: None
Change-Id: I6eb10d6a20a679fff08f604441f8e58dcd417608
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126464
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27034}
2019-03-08 13:04:41 +00:00
Sebastian Jansson
06b77f9d8f Use min allocatable bitrate as lower bound for target bitrate.
Bug: None
Change-Id: Iee060064bb35bc916dcf2744d969ccd512bf8973
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126004
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27018}
2019-03-07 14:18:35 +00:00
Sebastian Jansson
dc62ae432d Cleanup of constraints configuration in GoogCcNetworkController.
Bug: webrtc:9887
Change-Id: Ic12cc477ae96dac0890337d3f7aa8ff031ff6687
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126003
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27014}
2019-03-07 10:50:24 +00:00
Sebastian Jansson
11e55ee90a Renaming min_pacing_rate to min_total_allocated_bitrate.
This prepares for upcoming CL using the value for more than
controlling pacing rates.

Bug: webrtc:9887
Change-Id: Id3891c3727865149b87f946b3e7c3095a6ac9f26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126001
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27004}
2019-03-06 18:09:16 +00:00
Jonas Olsson
f441ea9429 Minor cleanup of probe_controller.cc
Bug: None
Change-Id: Iaf4e85d6d245f5bfdbcc6efbd083aaa71c180d69
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125760
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26984}
2019-03-06 09:07:06 +00:00
Niels Möller
6ec2f547d7 Fix mis-spelled TODO items
No-Try: true
Tbr: kwiberg@webrtc.org
Bug: webrtc:10198
Change-Id: Iedcafb89d3fd39a812d410db1b2ed6fac8fade38
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125724
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26972}
2019-03-05 13:45:39 +00:00
Mirko Bonadei
fc52b912a3 Implicitly suppress //build/config/clang:find_bad_constructs.
Since there is no way to enable/disable these diagnostics at runtime,
this CL moves the suppression into the rtc_* templates in order to
remove the need to explicitly add the snippet of code needed to
suppress it (currently copy/pasted in 144 locations).

The diagnostic that causes the most problems is the one about "complex
class/struct explicit ctor/dtor" [1] because WebRTC doesn't find
it useful enough.

Other diagnostics are good (for example the one that warns about
using "virtual" instead of "override", but that will be covered by
this clang-tidy check [2]) while others are Chromium related so
they have never triggered.

[1] - https://cs.chromium.org/chromium/src/tools/clang/plugins/FindBadConstructsConsumer.cpp?l=147-167&rcl=b4bebe1aa15dba7ca5fcc6456a81a55665327c3a
[2] - https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html

Bug: webrtc:163
Change-Id: Icbf27efa5b369100a31e6a32df1a0913729b3b34
Reviewed-on: https://webrtc-review.googlesource.com/c/125088
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26918}
2019-03-01 10:18:17 +00:00
Christoffer Rodbro
8ea0238c7b Add bandwidth floor for RTT based backoff.
Bug: webrtc:10368
Change-Id: I341a1e0b5a84c03b323e6051a1c2d56feb90867d
Reviewed-on: https://webrtc-review.googlesource.com/c/124990
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26905}
2019-02-28 16:14:19 +00:00
Sebastian Jansson
2c7964832e Remove rtc::TimeMillis() call from ALR detector.
We want to avoid system clock dependencies in congestion
controllers as it makes it harder to test them. This CL removes
a rtc::TimeMillis() call from the AlrDetector class and removes
dependencies on rtc_base_approved as it exposes time_utils.h.

Bug: None
Change-Id: Ie50a27399c05a0c50cdc17ad142db884b94ee918
Reviewed-on: https://webrtc-review.googlesource.com/c/124491
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26879}
2019-02-27 16:14:11 +00:00
Sebastian Jansson
c9d0b08982 Respects min ALR probing interval.
In a previous refactor, the ALR probe timestamp update was moved
after a return statement by accident. This CL fixes this.

The impact of this bug is limited as there are several other criteria
that has to be fulfilled for sending ALR probes.

Bug: None
Change-Id: Ia85e6ff9d782c1c4722a3df7e01ed803cf86b11d
Reviewed-on: https://webrtc-review.googlesource.com/c/124489
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26861}
2019-02-26 18:51:04 +00:00
Sebastian Jansson
418dd0b96a Stop using special RTT value for DelayBasedBwe.
There are two RTT values reported to GoogCC. They come from the same
source initially but one is calculated and smoothed in the video call stats.
However, there's not really any technical reasons why this value should
be received via the stats, this has just been maintained for legacy reasons.

Experiments shows no real difference between the modes, therefore the
stats-reported RTT is removed in this CL as a cleanup.

Bug: None
Change-Id: If1462d6c91570ffb883ecef2ba034f04a571c9b5
Reviewed-on: https://webrtc-review.googlesource.com/c/123883
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26833}
2019-02-25 09:51:33 +00:00
Evan Shrubsole
3f6bf3a4ab Clarify that pacing rate is based on raw target rate
Change-Id: Ib9cc068c88f45536ea5d9d0a84fab9da8f963131
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/123050
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26765}
2019-02-20 10:59:29 +00:00
Piotr (Peter) Slatala
c39f462b2d Move RtcEventProbeClusterCreated to the network controller.
Originally RtcEventProbeClusterCreated was logged in bitrate prober. This means that anyone who was using GoogCcNetworkControl wasn't logging it, and the NetworkControl wasn't self-contained.
This changes moves the responsibility for logging ProbeClusterCreated to ProbeController (where the probe is created), it also moves the responsibility for assigning probe ids to the probe controller.

Bug: None
Change-Id: If0433cc6d311b5483ea3980749b03ddbcd2bf041
Reviewed-on: https://webrtc-review.googlesource.com/c/122927
Commit-Queue: Peter Slatala <psla@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26713}
2019-02-15 16:42:47 +00:00
Evan Shrubsole
1d7bf89ad6 Add LS_VERBOSE logging for target bitrate in GoogCC
This will be used to investigate the effect of congestion window
pushback on bandwidth esimation. There is currently no data available
in event logs to analyze this in test runs.

Bug: None
Change-Id: I2397842e90fd4acab6306b03d1ee9daf62469ee3
Reviewed-on: https://webrtc-review.googlesource.com/c/121765
Reviewed-by: Konrad Hofbauer <hofbauer@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#26681}
2019-02-14 11:11:40 +00:00
Christoffer Rodbro
5f6abcfbd2 Fix for RttBackoff when sending of packets with TWCC stops.
Bug: webrtc:10290
Change-Id: Ia825cbde070214e5ec9f5439246ea43f58c3c2b7
Reviewed-on: https://webrtc-review.googlesource.com/c/121561
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26605}
2019-02-08 10:47:03 +00:00
Rasmus Brandt
681de2036b Stop changing the requested max bitrate based on protection level.
With the current implementation, whenever we are toggling between
sending/not sending retransmissions, the BitrateAllocator will
toggle the total requested max bitrate that is signalled to the
probing mechanism. The result is that spurious probes are sent
mid-call, at |max_bitrate| and |2*max_bitrate|. This behaviour
is undesirable, and thus removed in this CL. Instead, whenever
the allocation limits actually change, we produce a single
set of probes at |max_bitrate| and |2*max_bitrate|.

This CL does not change how the BitrateAllocator hysteresis is
accounting for protection, since it does not relate to the
spurious probes.

Bug: webrtc:10275
TBR: sprang@webrtc.org
Change-Id: Iab3a690a500372c74772a8ad6217fb838af15ade
Reviewed-on: https://webrtc-review.googlesource.com/c/120808
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26544}
2019-02-05 11:21:00 +00:00
Bjorn Terelius
7af962b38d Add field trial to configure averaging window for BitrateEstimator.
Bug: webrtc:10274
Change-Id: Ida699c8e0cdc91d55f91e7f685d0ab7e880703a0
Reviewed-on: https://webrtc-review.googlesource.com/c/120809
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26498}
2019-01-31 16:18:42 +00:00
Sebastian Jansson
2d79dccfb1 Removes new delay based rate controller.
Will focus on delivering model based controller instead.

Bug: webrtc:9718
Change-Id: I5df82424469c577f3c170758e0db64e3e1aa7705
Reviewed-on: https://webrtc-review.googlesource.com/c/120607
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26478}
2019-01-30 19:33:57 +00:00
Per Kjellander
338bfab0e6 Move sorting from TransportFeedbackAdapter to GoogCC.
BUG= none

Change-Id: Ibe1d058f6d5ed18a7cbdadaa3c053dd51533309d
Reviewed-on: https://webrtc-review.googlesource.com/c/120602
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26469}
2019-01-30 14:28:59 +00:00
Erik Språng
5118bbc8b7 Add ability to set max probing bitrate via GoogCcNetworkController
Bug: webrtc:10223
Change-Id: I8e9ee0cd333634e7d0b53d3d446a580374cc88b4
Reviewed-on: https://webrtc-review.googlesource.com/c/120342
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26452}
2019-01-29 19:19:04 +00:00
Sebastian Jansson
0ef117e14c Improving robustness of stable bandwidth estimate test.
It didn't have proper time to stabilize, making it sensitive to small
changes. This CL increases the stabilization period from 20 to 30s.

Also fixing some minor test suite bug found during investigation.

Bug: webrtc:9718
Change-Id: If56dba5383251ad3d3efe304eebcd880522afabe
Reviewed-on: https://webrtc-review.googlesource.com/c/119943
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26408}
2019-01-25 15:06:17 +00:00
Sebastian Jansson
470a5eae93 Introduces common AudioAllocationSettings class.
This class collects the field trial based configuration of audio
allocation and bandwidth in one place. This makes it easier
overview and prepares for future cleanup of the trials.

Bug: webrtc:9718
Change-Id: I34a441c0165b423f1e2ee63894337484684146ac
Reviewed-on: https://webrtc-review.googlesource.com/c/118282
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26370}
2019-01-23 12:13:29 +00:00
Sebastian Jansson
79f0d4d0c7 Enables feature to account for unacknowledged data.
By enabling this trial, we can also remove reporting of packet
feedback status from send streams that was used before.

Bug: webrtc:9718
Change-Id: I3e7c4656b0ac6592a834617e044f23a072454181
Reviewed-on: https://webrtc-review.googlesource.com/c/118281
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26363}
2019-01-23 10:00:52 +00:00
Erik Språng
7121564e97 Move congestion window field trial parsing to new class.
This cl is part of work to move several experiments into a joint
experiment group. Most of them vill be ralted to video, hence the name.

Bug: webrtc:10223
Change-Id: I8767c43abb6aa910ab51710eeb908e0f9df1e296
Reviewed-on: https://webrtc-review.googlesource.com/c/118361
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26346}
2019-01-21 16:39:42 +00:00
Christoffer Rodbro
982639c019 Fix for bandwidth toggling problem in StartUpPhase.
Fix has 2 parts:
1. Fix for the LossBasedControl being at much lower levels than
DelayBased in StartUpPhase.
2. Explicitly fix state machine problem leading to toggling between
the two estimates.

Bug: webrtc:10222
Change-Id: Ieaaaec6c9233da61a86b69d936c4979c79645686
Reviewed-on: https://webrtc-review.googlesource.com/c/118280
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26327}
2019-01-18 15:58:35 +00:00
Sebastian Jansson
95edb037a4 Adds WebRtcKeyValueConfig interface
The WebRtcKeyValueConfig interface allows providing custom key value
configurations that changes per instance of GoogCcNetworkController.

Bug: webrtc:10009
Change-Id: I520fff030d1c3c755455ec8f67896fe8a6b4d970
Reviewed-on: https://webrtc-review.googlesource.com/c/116989
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26312}
2019-01-18 08:45:08 +00:00
Sebastian Jansson
52de8b0270 Adds functionality to write logs to memory.
This makes it possible to save log outputs from scenario tests to
either files or memory.

Bug: webrtc:9510
Change-Id: I883bd8240ab712d31d54118adf979041bd83481a
Reviewed-on: https://webrtc-review.googlesource.com/c/116321
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26284}
2019-01-16 17:36:31 +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
Ying Wang
aaa99a93e2 Add unittest for congestion window pushback in goog_cc.
Bug: none
Change-Id: Idc4ed71d8e12335eeaccbf1181eff36657f122d0
Reviewed-on: https://webrtc-review.googlesource.com/c/116320
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26222}
2019-01-11 15:42:57 +00:00
Per Kjellander
79a07cd9f6 Change type StreamsConfig::requests_alr_probing to abls::optional
That means it does not have to be set on every update of StreamsConfig.

BUG=webrtc:9586

Change-Id: I6a348160e209042857c4475323466e2aa92adef8
Reviewed-on: https://webrtc-review.googlesource.com/c/116690
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26184}
2019-01-10 06:12:05 +00:00
Christoffer Rodbro
c610e26be5 Include pacing buffer size in congestion window.
Bug: webrtc:10171
Change-Id: I9e21880a8b6f325415b62397081c301ee904f2ea
Reviewed-on: https://webrtc-review.googlesource.com/c/116068
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26175}
2019-01-09 11:16:58 +00:00
Erik Språng
791d43c4b1 Add ability to set max probing bitrate in SendSideCongestionController.
While this class is deprecated, it's needed as a stop-gap solution.
Other methods to configure the max probe rate all effect the current
estimate and/or trigger new probes to be sent, and we need a way to
configure the max without affecting other behavior.

Bug: webrtc:10070
Change-Id: I2b0ba2fef42d0bab6e5ea7f7c921681557802b4b
Reviewed-on: https://webrtc-review.googlesource.com/c/114880
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26162}
2019-01-08 16:11:53 +00:00
Ying Wang
6704c91061 Bugfix: Activate pushback on every sent packet.
Fix a bug introduced in (https://webrtc-review.googlesource.com/c/src/+/105102) that causes cwnd pushback only active when there is network condition changes.

Bug: None
Change-Id: I8164d5663304ce2e445db09205f706011ff7d784
Reviewed-on: https://webrtc-review.googlesource.com/c/115945
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26122}
2019-01-03 14:13:09 +00:00
Sebastian Jansson
da0222b3fc Adds new timer based rate controller trial to GoogCC
The new controller behaves mostly like before, but increases the target
rate on timer update rather than when feedback is received. This makes
the behavior easier to predict. It also uses a duration parameter to
track the increase, removing the meed for the minimum rate increase
constants that exists in the previous solution.

Bug: webrtc:9718
Change-Id: Iae31a9ba2d6474a8236f8eb72f86ff434f1d1fc6
Reviewed-on: https://webrtc-review.googlesource.com/c/114681
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26088}
2018-12-21 14:14:08 +00:00
Sebastian Jansson
358fba1f9d Removes NetworkControllerTester
Replacing NetworkControllerTester usages with SimulatedTimeClient since
they have corresponding functionality.

Bug: webrtc:9510
Change-Id: I4a6a78142a9922e53b862eb8cb71ba9091236346
Reviewed-on: https://webrtc-review.googlesource.com/c/114660
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26048}
2018-12-18 16:11:22 +00:00
Erik Språng
b3564c1cb2 Back off relative to current estimate rather than ack rate when in ALR.
If we're in ALR, the acked rate is going to be significantly lower than
the current estimate for the link capacity. If we need to back off in
this situation (usually caused by latency spikes), this CL makes us back
off relative to current estimate if. We then immediately send a new
probe just in case the network did actually change.

All of this is behind experiment flags for now.

Bug: webrtc:10144
Change-Id: I062a259c36417eea2211d44592ef7fc979aa22b7
Reviewed-on: https://webrtc-review.googlesource.com/c/113880
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26045}
2018-12-18 12:33:08 +00:00
Bjorn Terelius
24779d8229 Missing packet send time should not cause BWE backoff.
The removed coded causes problems if the same RTCP packet is forwarded
to the congestion controller multiple times.

Bug: webrtc:10125
Change-Id: I659d8f8f3ce3c643710156fa81176ceeaedd714a
Reviewed-on: https://webrtc-review.googlesource.com/c/114165
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26016}
2018-12-14 14:48:48 +00:00
Christoffer Rodbro
5d4740170a Reduce pacing buffer padding rate during pushback.
Bug: webrtc:10112
Change-Id: I2cd2d07bd5bcbff5b3808ee63eea251a52e45b79
Reviewed-on: https://webrtc-review.googlesource.com/c/113808
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25968}
2018-12-11 15:22:27 +00:00
Sebastian Jansson
aa4f100225 Adds trial to fall back to probe rate if ack rate is missing.
Bug: webrtc:9718
Change-Id: I7b6e1d3c051e67b97f6de1ec95e84631af9c5b0d
Reviewed-on: https://webrtc-review.googlesource.com/c/113600
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25953}
2018-12-10 16:12:18 +00:00
Sebastian Jansson
f3ef6cd863 Using more accurate receive time calculation in scenario tests.
Some tests had to be updated due to this change.

Bug: webrtc:9510
Change-Id: I79c4c0166d8ba5e8190a607d5d35b67dc30a3c14
Reviewed-on: https://webrtc-review.googlesource.com/c/113522
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25952}
2018-12-10 15:54:33 +00:00
Erik Språng
74fb822b67 Allow probing up to 2x allocation limit
The limit we put on probing is a bit too conservative now. If an
allocation limit is set, this CL allows probing up to 2x the current
max allocation limit.

This better handles overshooting when networks actually have the
capacity to allow bursts.

Bug: webrtc:10070
Change-Id: I0003f6b22512c13b6a83c1934952a2c3a2b70b48
Reviewed-on: https://webrtc-review.googlesource.com/c/112905
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25888}
2018-12-04 11:43:54 +00:00
Sebastian Jansson
b939d35e8e Fixes DCHECK bug in LinkCapacityEstimator.
Conversion to kbps will fail if the estimate is lower than the deviation
estimate * 3, since that would produce a negative value.

Bug: webrtc:9718
Change-Id: I83b52acd476d90b1f22c9db9894fa26c9a3e8e17
Reviewed-on: https://webrtc-review.googlesource.com/c/112560
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25854}
2018-11-30 09:44:55 +00:00
Sebastian Jansson
051251f598 Extracts LinkCapacityEstimator from AimdRateControl.
This prepares for future refactoring of rate controller.

Bug: webrtc:9718
Change-Id: I425c8c547399bda98b4271a0d24a0bb7ee06bc13
Reviewed-on: https://webrtc-review.googlesource.com/c/112420
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25846}
2018-11-29 18:58:40 +00:00
Erik Språng
cfe36ca3b3 Cap probing bitrate to max total allocated bitrate
Bug: webrtc:10070
Change-Id: I3ba2656dff08e9ff054e263d78dcacba1ff77dd1
Reviewed-on: https://webrtc-review.googlesource.com/c/112384
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25845}
2018-11-29 17:35:15 +00:00
Christoffer Rodbro
5976bde2e6 Unittests for loss based bandwidth estimation.
Bug: none
Change-Id: I204071683c1c6e28040ea3bce900c4b04108cba7
Reviewed-on: https://webrtc-review.googlesource.com/c/112380
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25844}
2018-11-29 17:22:59 +00:00
Yves Gerey
3e70781361 [Cleanup] Add missing #include. Remove useless ones. IWYU part 2.
This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.

Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
2018-11-28 18:25:07 +00:00
Bjorn Terelius
6b3d18164b Remove unused BWE field trial strings.
Bug: None
Change-Id: I38d2e5495ddfe0b9f1493efc38ef7df95e7fd207
Reviewed-on: https://webrtc-review.googlesource.com/c/111258
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25798}
2018-11-27 13:05:43 +00:00
Sebastian Jansson
57f3ad0f8d Adds stable bandwidth estimate to GoogCC.
The intention is to provide a bandwidth estimate that only updates if
the actual available bandwidth is known to have changed. This will be
used in media streams to avoid changing the configuration (such as
frame size, audio frame length etc), just because the control target
rate changed.

Bug: webrtc:9718
Change-Id: I17ba5a2f9e5bd408a71f89c690d45541655a68e2
Reviewed-on: https://webrtc-review.googlesource.com/c/107726
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25772}
2018-11-23 14:55:37 +00:00
Sebastian Jansson
885cf60106 Moves ProbeBitrateEstimator from DelayBasedBwe.
This prepares for providing an additional implementation of delay based
rate control. By moving the probe controller, less code will have to be
added in the upcoming CL.

Bug: webrtc:9718
Change-Id: I64eb2c8f5f7950b6e9d209f110dc0a757c710b4b
Reviewed-on: https://webrtc-review.googlesource.com/c/111860
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25770}
2018-11-23 13:43:51 +00:00
Mirko Bonadei
e3abb8134f Decouple //rtc_base:rtc_base_tests_utils from gunit.
This CL decouples //rtc_base:rtc_base_tests_utils from gunit by
moving gunit helpers (rtc_base/gunit.h) and rtc_base/testclient.h
(which depends on gunit helpers) to their own build target.

It also removes some unused dependencies in the WebRTC build graph.

Bug: None
Change-Id: Ia9820e84ff697da39b351eef73c45f6e4bdf2623
Reviewed-on: https://webrtc-review.googlesource.com/c/111861
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25769}
2018-11-23 12:52:46 +00:00
Bjorn Terelius
eccfc47ffa Cleanup AimdRateController and remove RateControlRegion enum.
- Rename avg_max_bitrate_kbps to link_capacity_estimate_kbps and change
  the type to optional.
- Remove the RateControlRegion enum. The old code seems to have the invariant
  that the region is kRcMaxUnknown iff avg_max_bitrate_kbps is uninitialized.
- Change floats to double.

Bug: webrtc:9942
Change-Id: Ic071a11ec4950053ec92beaa06f28f43192521d7
Reviewed-on: https://webrtc-review.googlesource.com/c/111247
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25752}
2018-11-22 13:51:28 +00:00
Alex Loiko
ecd62056e3 Disable GoogCcNetworkControllerTest.DetectsHighRateInSafeResetTrial
Test is flaky. See linked bug.

TBR=srte@webrtc.org

Bug: webrtc:10036
Change-Id: I21dd0daceaca6071364cb3aec50da79480f4dfcb
Reviewed-on: https://webrtc-review.googlesource.com/c/111747
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25746}
2018-11-22 10:51:11 +00:00
Sebastian Jansson
5f00995964 Using unit classes in AimdRateControl.
Bug: webrtc:9718
Change-Id: I1efed4e55c9d1ccec3c32ed012cb3cd82d7f4ee8
Reviewed-on: https://webrtc-review.googlesource.com/c/110788
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25705}
2018-11-20 08:04:11 +00:00
Sebastian Jansson
b6787bcd79 Using data unit classes in DelayBasedBwe.
Bug: webrtc:9718
Change-Id: I1b6ed37afd7680dfad6267addfe46155c378525d
Reviewed-on: https://webrtc-review.googlesource.com/c/110903
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25702}
2018-11-19 20:18:36 +00:00
Christoffer Rodbro
3a83748422 New loss-based bandwidth control mechanism.
Bug: none
Change-Id: Ie60e9225e2a2260624342ffbadb08cb887b2b6f5
Reviewed-on: https://webrtc-review.googlesource.com/c/109923
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25696}
2018-11-19 15:09:04 +00:00
Sebastian Jansson
24643488d4 Don't reset RTT Backoff timeout on route change.
Bug: webrtc:9718
Change-Id: I536733b33c40838cdfc473988581147bec6a358a
Reviewed-on: https://webrtc-review.googlesource.com/c/109927
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25638}
2018-11-14 15:06:15 +00:00
Sebastian Jansson
6b64c43cfd Using early acknowledged rate for safe reset in GoogCC.
This won't be perfect since the peeked value will be noisy, but since we
cap it with the starting rate, it should only improve things.

Bug: webrtc:9718
Change-Id: Id2cf42fb85c8d7126f6d538a3982d65caa7a75b7
Reviewed-on: https://webrtc-review.googlesource.com/c/109926
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25604}
2018-11-12 15:19:43 +00:00
Sebastian Jansson
af6d741fe1 Makes send time information in feedback non-optional.
This makes it safer to reason about the common case where send
time information is available. We don't have to either assume that
it's available, or check it everywhere the PacketResult struct is used.

To achieve this, a new field is added to TransportPacketsFeedback
and a new interface is introduced to clearly separate which field is
used. A possible followup would be to introduce a separate struct.
That would complicate the signature of ProcessTransportFeedback.

Bug: webrtc:9934
Change-Id: I2b319e4df2b557fbd4de66b812744bca7d91ca15
Reviewed-on: https://webrtc-review.googlesource.com/c/107080
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25465}
2018-11-01 12:39:56 +00:00
Sebastian Jansson
449c1c03a7 Adds unit tests for safe reset trial.
Since they rely on a real time simulation, a new build target is
introduced that is intended to be used for real time tests.

Bug: webrtc:9518
Change-Id: Iea58f6a2b687f026e9ab1f37b4aabf8261ed7d23
Reviewed-on: https://webrtc-review.googlesource.com/c/107345
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25410}
2018-10-29 11:14:46 +00:00
erikvarga@webrtc.org
0f08d227c2 Add a function for enabling the congestion window and pushback controller in the webrtc::SendSideCongestionController.
Bug: webrtc:9923
Change-Id: Id01ebd7237ba33f34003aa9560405a13da7580e2
Reviewed-on: https://webrtc-review.googlesource.com/c/107893
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Commit-Queue: Erik Varga <erikvarga@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25393}
2018-10-26 17:19:32 +00:00
Yves Gerey
988cc0870b [Cleanup] Add missing #include. Remove useless ones.
This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.

bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
2018-10-23 11:32:56 +00:00
Sebastian Jansson
8d33c0c104 Adds field trial to do safer reset on route change.
Bug: webrtc:9718
Change-Id: I71143a9616981a24bca7bd5c663a9dae9fc9692e
Reviewed-on: https://webrtc-review.googlesource.com/c/106903
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25286}
2018-10-22 10:46:49 +00:00
Sebastian Jansson
78416b6e18 Adds time to initial config in analyzer code.
Bug: webrtc:9586
Change-Id: Ib5cbcdcf2cce3bea24d8c03a25f6cd415feb97ad
Reviewed-on: https://webrtc-review.googlesource.com/c/106880
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25254}
2018-10-18 12:43:31 +00:00
Sebastian Jansson
f5e767dbbc Don't send max allocation probe unless allocation changed.
This changes the behavior to a probe only gets trigged if
the total max allocated bitrate  actually changed.

Also adding helpful log dump flag to ramp up tests that
was used to investigate the issue.

Bug: chromium:894434
Change-Id: I907675b8fd5a339f838b07d433ecf837e312def1
Reviewed-on: https://webrtc-review.googlesource.com/c/105981
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25212}
2018-10-16 15:13:57 +00:00
Sebastian Jansson
cd0ca2d5d7 Adds unit test for RTT based backoff.
Bug: webrtc:9718
Change-Id: I372f7874a6a001e6cb5e7f6886b28763ae84c464
Reviewed-on: https://webrtc-review.googlesource.com/c/105665
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25179}
2018-10-15 17:01:01 +00:00
Sebastian Jansson
8285841e8f Adds handling of untracked data to congestion controller.
Bug: webrtc:9796
Change-Id: I097e8f72a6c8d323c3ea73dbb4ade60873dd4e8d
Reviewed-on: https://webrtc-review.googlesource.com/c/104883
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25129}
2018-10-11 18:47:44 +00:00
Ying Wang
fb226af64d Remove some old logging in goog_cc for congestion window.
Bug: None
Change-Id: I05550e5099cd7b4bc9512d2ce4159222779c02a7
Reviewed-on: https://webrtc-review.googlesource.com/c/105326
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25118}
2018-10-11 16:08:57 +00:00
Sebastian Jansson
3bdbc84888 Moves pushback controller to GoogCC
Since the pushback controller doesn't strictly adhere to the congestion
window, it better belongs together with the congestion controller logic.

Also ensuring that it does not override the configured min bitrate.

Bug: webrtc:9586
Change-Id: I57dcfc946d470247e66c67adabddaafa3d9d83ad
Reviewed-on: https://webrtc-review.googlesource.com/c/105102
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25115}
2018-10-11 13:49:07 +00:00
Sebastian Jansson
c87b8c194a Moves GoogCC factory to API.
Bug: None
Change-Id: Ib5be0e984eff3a652504106552b0779be2c316ca
Reviewed-on: https://webrtc-review.googlesource.com/c/104941
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25076}
2018-10-10 06:11:36 +00:00
Sebastian Jansson
2e068e8b6f Adds RTT based backoff trial to SendSideBandwidthEstimation.
Bug: webrtc:9718
Change-Id: Ic94dcd7612524d350f54d1907f843577b890badf
Reviewed-on: https://webrtc-review.googlesource.com/c/104122
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25048}
2018-10-08 12:36:06 +00:00
Sebastian Jansson
7c1744d3dc Reland "Reland "Using units in SendSideBandwidthEstimation.""
This reverts commit a4de9c8b04.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Reland "Using units in SendSideBandwidthEstimation.""
> 
> This reverts commit e2cb26cb4f.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Reland "Using units in SendSideBandwidthEstimation."
> > 
> > This reverts commit 917e5967a5.
> > 
> > Reason for revert: Handling downstream use case.
> > 
> > Original change's description:
> > > Revert "Using units in SendSideBandwidthEstimation."
> > > 
> > > This reverts commit 35b5e5f3b0.
> > > 
> > > Reason for revert: Breaks downstream project
> > > 
> > > Original change's description:
> > > > Using units in SendSideBandwidthEstimation.
> > > >
> > > > This CL moves SendSideBandwidthEstimation to use the unit types
> > > > DataRate, TimeDelta and Timestamp. This prepares for upcoming changes.
> > > >
> > > > Bug: webrtc:9718
> > > > Change-Id: If10e329920dda037b53055ff3352ae7f8d7e32b8
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/104021
> > > > Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> > > > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#25029}
> > > 
> > > TBR=terelius@webrtc.org,srte@webrtc.org
> > > 
> > > No-Try: True
> > > Bug: webrtc:9718
> > > Change-Id: Iaf470f1eec9911ee6fc7c1b4f5db9675d89d3780
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/104480
> > > Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
> > > Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#25035}
> > 
> > TBR=oprypin@webrtc.org,terelius@webrtc.org,srte@webrtc.org
> > 
> > Change-Id: I0940791fcd1e196598b0f0a2ec779c49931ee5df
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:9718
> > Reviewed-on: https://webrtc-review.googlesource.com/c/104520
> > Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> > Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#25036}
> 
> TBR=oprypin@webrtc.org,terelius@webrtc.org,srte@webrtc.org
> 
> Change-Id: I6628771c79fc78dfd856649ae92232e95df63495
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9718
> Reviewed-on: https://webrtc-review.googlesource.com/c/104540
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25037}

TBR=oprypin@webrtc.org,terelius@webrtc.org,srte@webrtc.org

Change-Id: If5473859cea725420afce11b6683fa0c70a29b0a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9718
Reviewed-on: https://webrtc-review.googlesource.com/c/104501
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25039}
2018-10-08 09:02:03 +00:00
Sebastian Jansson
a4de9c8b04 Revert "Reland "Using units in SendSideBandwidthEstimation.""
This reverts commit e2cb26cb4f.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland "Using units in SendSideBandwidthEstimation."
> 
> This reverts commit 917e5967a5.
> 
> Reason for revert: Handling downstream use case.
> 
> Original change's description:
> > Revert "Using units in SendSideBandwidthEstimation."
> > 
> > This reverts commit 35b5e5f3b0.
> > 
> > Reason for revert: Breaks downstream project
> > 
> > Original change's description:
> > > Using units in SendSideBandwidthEstimation.
> > >
> > > This CL moves SendSideBandwidthEstimation to use the unit types
> > > DataRate, TimeDelta and Timestamp. This prepares for upcoming changes.
> > >
> > > Bug: webrtc:9718
> > > Change-Id: If10e329920dda037b53055ff3352ae7f8d7e32b8
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/104021
> > > Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> > > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#25029}
> > 
> > TBR=terelius@webrtc.org,srte@webrtc.org
> > 
> > No-Try: True
> > Bug: webrtc:9718
> > Change-Id: Iaf470f1eec9911ee6fc7c1b4f5db9675d89d3780
> > Reviewed-on: https://webrtc-review.googlesource.com/c/104480
> > Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
> > Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#25035}
> 
> TBR=oprypin@webrtc.org,terelius@webrtc.org,srte@webrtc.org
> 
> Change-Id: I0940791fcd1e196598b0f0a2ec779c49931ee5df
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9718
> Reviewed-on: https://webrtc-review.googlesource.com/c/104520
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25036}

TBR=oprypin@webrtc.org,terelius@webrtc.org,srte@webrtc.org

Change-Id: I6628771c79fc78dfd856649ae92232e95df63495
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9718
Reviewed-on: https://webrtc-review.googlesource.com/c/104540
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25037}
2018-10-08 08:27:29 +00:00
Sebastian Jansson
e2cb26cb4f Reland "Using units in SendSideBandwidthEstimation."
This reverts commit 917e5967a5.

Reason for revert: Handling downstream use case.

Original change's description:
> Revert "Using units in SendSideBandwidthEstimation."
> 
> This reverts commit 35b5e5f3b0.
> 
> Reason for revert: Breaks downstream project
> 
> Original change's description:
> > Using units in SendSideBandwidthEstimation.
> >
> > This CL moves SendSideBandwidthEstimation to use the unit types
> > DataRate, TimeDelta and Timestamp. This prepares for upcoming changes.
> >
> > Bug: webrtc:9718
> > Change-Id: If10e329920dda037b53055ff3352ae7f8d7e32b8
> > Reviewed-on: https://webrtc-review.googlesource.com/c/104021
> > Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#25029}
> 
> TBR=terelius@webrtc.org,srte@webrtc.org
> 
> No-Try: True
> Bug: webrtc:9718
> Change-Id: Iaf470f1eec9911ee6fc7c1b4f5db9675d89d3780
> Reviewed-on: https://webrtc-review.googlesource.com/c/104480
> Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
> Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25035}

TBR=oprypin@webrtc.org,terelius@webrtc.org,srte@webrtc.org

Change-Id: I0940791fcd1e196598b0f0a2ec779c49931ee5df
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9718
Reviewed-on: https://webrtc-review.googlesource.com/c/104520
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25036}
2018-10-08 08:26:09 +00:00
Oleh Prypin
917e5967a5 Revert "Using units in SendSideBandwidthEstimation."
This reverts commit 35b5e5f3b0.

Reason for revert: Breaks downstream project

Original change's description:
> Using units in SendSideBandwidthEstimation.
>
> This CL moves SendSideBandwidthEstimation to use the unit types
> DataRate, TimeDelta and Timestamp. This prepares for upcoming changes.
>
> Bug: webrtc:9718
> Change-Id: If10e329920dda037b53055ff3352ae7f8d7e32b8
> Reviewed-on: https://webrtc-review.googlesource.com/c/104021
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25029}

TBR=terelius@webrtc.org,srte@webrtc.org

No-Try: True
Bug: webrtc:9718
Change-Id: Iaf470f1eec9911ee6fc7c1b4f5db9675d89d3780
Reviewed-on: https://webrtc-review.googlesource.com/c/104480
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25035}
2018-10-08 08:21:18 +00:00
Sebastian Jansson
35b5e5f3b0 Using units in SendSideBandwidthEstimation.
This CL moves SendSideBandwidthEstimation to use the unit types
DataRate, TimeDelta and Timestamp. This prepares for upcoming changes.

Bug: webrtc:9718
Change-Id: If10e329920dda037b53055ff3352ae7f8d7e32b8
Reviewed-on: https://webrtc-review.googlesource.com/c/104021
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25029}
2018-10-05 18:37:13 +00:00
Sebastian Jansson
a23dc78c7d Removes initial window field trial.
Bug: webrtc:9718
Change-Id: Ia1cc352bde1d8994cce7eb7e3bdcbc04e03fd718
Reviewed-on: https://webrtc-review.googlesource.com/c/104041
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25025}
2018-10-05 15:41:50 +00:00
Sebastian Jansson
35fa280229 Adds allocated rate without feedback to new congestion controller.
When bitrate is allocated to streams that does not have packet feedback,
the allocated bitrate should be included in the estimate. This was
previously only implemented for the old congestion controller and not
for the new task queue based version.

To make the behavior more robust, the responsibility for tracking this
is moved to BitrateAllocator where it's handled consistently for
multiple streams without feedback.

Bug: webrtc:9586, webrtc:8243
Change-Id: I8af7fec23e1bdc08cc61cf1b4ff10461c3711fb0
Reviewed-on: https://webrtc-review.googlesource.com/102681
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24905}
2018-10-01 07:48:02 +00:00
Sebastian Jansson
71a091e24e Adds simulated time scenario client.
Adds SimulatedTimeClient, a class that simulates time so congestion
controllers can be tested using the Scenario test framework without
running in real time.

This allows using simplified scenario tests as unit tests, narrowing
the gap between end to end tests and unit tests.

Bug: webrtc:9510
Change-Id: I61ab388bd610f636b926675b1f14b8d85e3c1114
Reviewed-on: https://webrtc-review.googlesource.com/99801
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24890}
2018-09-28 12:30:44 +00:00
Mirko Bonadei
17f4878419 Remove deprecated field_trial_default and metrics_default.
This CL removes some deprecated build targets (and their headers)
from system_wrappers:
- field_trial_api
- field_trial_default
- metrics_api
- metrics_default

It also refreshes all the dependencies on field_trial.h and metrics.h.

A nice side effect is that it is finally possible to remove 'nogncheck'
from the following files (when it was used with field_trial_default
and metrics_default):
- sdk/objc/api/peerconnection/RTCMetricsSampleInfo+Private.h
- sdk/android/src/jni/pc/peerconnectionfactory.cc
- sdk/objc/api/peerconnection/RTCFieldTrials.mm

Bug: webrtc:9631
Change-Id: Ib621f41ef8ad0aba4fe1c1d7e749c044afc956c3
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/100524
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24878}
2018-09-28 07:21:07 +00:00
Sebastian Jansson
98b07e9180 Adds scenario test framework.
Bug: webrtc:9510
Change-Id: I387aab4211f520a1c54832f82032ee724479e89e
Reviewed-on: https://webrtc-review.googlesource.com/89342
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24864}
2018-09-27 12:31:33 +00:00
Sebastian Jansson
c0af56b9fb Cleanup in congestion controller.
This CL removes some indirection and moves some constants. This
is done to simplify understanding and debugging of the code.

Bug: webrtc:9718
Change-Id: Ibe2b1da0163b4c97ffd1a5bc157f6aa59582d697
Reviewed-on: https://webrtc-review.googlesource.com/98240
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24732}
2018-09-13 15:46:37 +00:00
Sebastian Jansson
57606328f6 Adds initial data window field trial to GoogCC.
Bug: webrtc:9718
Change-Id: Ia5a77a09d7ba82b545e9ab12036f717765fdf3b4
Reviewed-on: https://webrtc-review.googlesource.com/97740
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24659}
2018-09-10 16:55:37 +00:00
Mirko Bonadei
50cfab7d84 Fix no_global_constructors in congestion_controller/goog_cc.
Bug: webrtc:9693
Change-Id: Ic341f3bed2c7c8c4f62363a7344f8524ff561155
Reviewed-on: https://webrtc-review.googlesource.com/98580
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24607}
2018-09-06 16:01:49 +00:00
Mirko Bonadei
96ede16a4e Enable -Wexit-time-destructors and -Wglobal-constructors.
This CL enables -Wexit-time-destructors and -Wglobal-constructors on
rtc_static_library and rtc_source_set build targets.

It also adds the possibility to suppress these warnings because
they trigger in a few places.

The long term goal is to avoid regressions on this and remove all the
suppressions.

Bug: webrtc:9693
Change-Id: I4c1ecc137ef9e87ec5e66981ce95d96fb082727c
Reviewed-on: https://webrtc-review.googlesource.com/98380
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24604}
2018-09-06 12:43:20 +00:00
Sebastian Jansson
8f03216bbd Minor refactor in GoogCcNetworkController.
In-lining GetNetworkParameters and MaybeUpdateCongestionWindow which
was left over from previous refactoring. This prepares for upcoming CLs
changing the behavior.

Bug: webrtc:9586
Change-Id: I6f038acdf97c3db2c85254a36592c617a5754a96
Reviewed-on: https://webrtc-review.googlesource.com/97605
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24570}
2018-09-05 09:20:15 +00:00
Sebastian Jansson
d0e0ec959f Printing internal state of GoogCC.
This is useful for debugging and has minimal effect on production code.

Bug: webrtc:9510
Change-Id: I3a71f484a0d4e54999e376b7924b73230d86cd96
Reviewed-on: https://webrtc-review.googlesource.com/97607
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24557}
2018-09-04 17:26:02 +00:00
Sebastian Jansson
9de4ef4b24 Adds signed infinity to timestamps.
Negative infinity is useful in comparisons as it represents a value
guaranteed to be less than any other timestamp. This avoid using
Timestamp::ms(0) to represent such a value or having to use optional
for the special case of first time execution.

To avoid ambiguity, Timestamp::Infinity is renamed to PlusInfinity.

Bug: webrtc:9709
Change-Id: Ib2debff91036e94d1dc903ec0c6faae30febde4e
Reviewed-on: https://webrtc-review.googlesource.com/79440
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24556}
2018-09-04 17:14:05 +00:00
Sebastian Jansson
ed1f75ab6d Removes redundant starting rate.
Sine a starting rate field was added to the constraints struct. Having
it in the initial config separately is reduntant. To simplify the code,
the extra field is removed. This is a follow up on:
https://webrtc-review.googlesource.com/c/src/+/92624

Bug: webrtc:9586
Change-Id: I9b01b16b2fc4b8479e83b7e998308be2295e0325
Reviewed-on: https://webrtc-review.googlesource.com/96801
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24514}
2018-08-31 17:36:21 +00:00
Will Harris
fc173d00ec Add no_size_t_to_int_warning suppression to webrtc.
Current set of warnings that need fixing before this warning can
be enabled is here -> https://pastebin.com/raw/jTddgPzP

BUG=chromium:588506, webrtc:9451

Change-Id: Id7896cf48c7231b2ee28dde378ff3ce17da73c2b
Reviewed-on: https://webrtc-review.googlesource.com/96623
Commit-Queue: Will Harris <wfh@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24503}
2018-08-30 17:45:54 +00:00
Sebastian Jansson
34ee419a23 Fixes breaking bug in feedback based GoogCC.
This CL fixes a bug in the feedback based GoogCC where packets lost
was swapped with expected packets received. Since this version of
GoogCC isn't yet used this wasn't discovered. There was also a lack
of unit test coverage. To ensure reasonable behavior, unit tests was
added.

Unit tests was also converted from relevant unit tests on send side
congestion controller for the regular GoogCC controller.

Bug: webrtc:9586
Change-Id: I83c40ff4766104820cb72ec1e8b95c5782def19a
Reviewed-on: https://webrtc-review.googlesource.com/59401
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24498}
2018-08-30 13:22:51 +00:00
Sebastian Jansson
206b77f7ad Adds start bitrate handling to task queue congestion controller.
This adds a start bitrate field to TargetRateConstraints since this is
required in VideoSendStreamTests. This also reduces the differences
between the old SendSideCongestionController and the new TaskQueue
based version.

Bug: webrtc:9586
Change-Id: I5d3d1414e9d30b51723c911a0bf2e96b876c04e5
Reviewed-on: https://webrtc-review.googlesource.com/92624
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24384}
2018-08-22 10:09:26 +00:00
Sebastian Jansson
eb73a7bd16 Removes unnecessary webrtc_cc namespaces.
Bug: webrtc:9586
Change-Id: I6407ee465d725d7469c409e5bea1c55354ab7f95
Reviewed-on: https://webrtc-review.googlesource.com/92385
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24199}
2018-08-06 17:18:45 +00:00
Sebastian Jansson
13ef7d25f6 Adds feedback only mode to GoogCC.
This CL adds a factory for creating a GoogCC network controller that
can be used without RTCP specific messages. This prepares for enabling
use of other underlying protocols as long as they can provide per
packet feedback.

Bug: None
Change-Id: I6671181949d97abd18843d0f4edf75040cc3f007
Reviewed-on: https://webrtc-review.googlesource.com/84583
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24198}
2018-08-06 15:43:37 +00:00
Sebastian Jansson
da2ec40590 Always sends probes when they are generated.
This changes makes the usage of the new probe controller reflect how the
old probe controller was used. That is probes are now sent as soon as
they are generated. This is to avoid regressions in performance doe to
the timing of the sent probes.

Bug: chromium:868776
Change-Id: I722585689258c9b01e8f1dc47249b284a05a2793
Reviewed-on: https://webrtc-review.googlesource.com/91441
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24175}
2018-08-02 15:36:12 +00:00
Mirko Bonadei
3e5281f2b3 Enable clang::find_bad_constructs for congestion_controller/goog_cc.
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: I289795c92958fd43fed6165894510ad63ca9d24d
Reviewed-on: https://webrtc-review.googlesource.com/90415
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24114}
2018-07-26 13:32:29 +00:00
Niels Möller
a12c42a6b2 Delete root header file typedef.h.
Usage replaced with stdint.h, rtc_base/system/arch.h and
rtc_base/system/unused.h, as appropriate.

Bug: webrtc:6854
Change-Id: I97225465d14b969903d92979e2df3c3c05d35f18
Reviewed-on: https://webrtc-review.googlesource.com/90249
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24100}
2018-07-25 14:59:26 +00:00
Bjorn Terelius
0c7ec80927 Limit BWE reductions before first measured throughput.
After detecting overuse of the network capacity, the target
bitrate is reduced. Normally, this should happen at most once
per RTT to prevent repeated reductions from the same overuse
signal. This CL fixes a bug that allowed repeated reductions
if an overuse was detected before it had the first reliable
throughput measurement.

The fix is guarded by a field trial. To enable the fix, use
WebRTC-BweInitialBackOffInterval/Enabled-200/

Bug: webrtc:9493
Change-Id: Iae566227fd94ebb8a4449406572158a8b79d9c53
Reviewed-on: https://webrtc-review.googlesource.com/88765
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24021}
2018-07-18 13:51:05 +00:00
Sebastian Jansson
b2ecc3dc49 Removes old probe controller.
This removes the old version of Probe Controller. The new controller is
slightly different, therefore the legacy SendSideCongestionController is
changed to accommodate the new function.

Most notably, the functionality is changed so that probes are now sent
only from the OnProcess call and not immediately on changing a
parameter.

The lock previously owned and used by ProbeController is moved to SendSideCongestionController. This should not change any
behavior.

Bug: webrtc:8415
Change-Id: I3c69ddeb04aeeae1234a2a5e116fb677f36b4ae4
Reviewed-on: https://webrtc-review.googlesource.com/86541
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23973}
2018-07-13 16:13:26 +00:00
Bjorn Terelius
d97b862593 Field trial to initialize throughput estimate faster.
The current acknowledged bitrate (i.e. throughput) estimator takes 500ms
to initialize. This CL creates a field trial to experiment with this
arbitrary initialization time.

Bug: webrtc:9492, webrtc:7746
Change-Id: I8a803f7bc0ee78856e808e289f37bab57d763efa
Reviewed-on: https://webrtc-review.googlesource.com/87145
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23852}
2018-07-05 12:14:04 +00:00
Karl Wiberg
918f50c5d1 Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.

This CL was generated by the following script:

  git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
  git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
  git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
  git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
  git cl format

Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.

Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 10:59:49 +00:00
Sebastian Jansson
13171bdba8 Adds debug printing for congestion controllers.
These are useful for plotting creating data files that can be used to
visualize and debug congestion controller behavior.

Bug: webrtc:9467
Change-Id: I75b03a309b4b7d562fefe82a828ae1e6a9f069c8
Reviewed-on: https://webrtc-review.googlesource.com/86126
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23822}
2018-07-03 17:00:24 +00:00
Sebastian Jansson
04b18cb365 Removes redundant delay based bwe.
This removes the legacy DelayBasedBwe to reduce code redundancy and
avoid the risk of applying changes on only one version.

Bug: webrtc:8415
Change-Id: I88aba03adbb77ee0ff0a97a8b3be6ddf028af48a
Reviewed-on: https://webrtc-review.googlesource.com/85364
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23798}
2018-07-02 09:11:33 +00:00
Sebastian Jansson
f9f49a323c Removes redundant AlrDetector.
This replaces the old AlrDetector used by the pacer with the one in
GoogCC. This reduces the risk of accidentally changing only one version.

Note that the pacer instance will be removed when moving over to the
task queue based send side congestion controller.

Bug: webrtc:8415
Change-Id: Id4b2000ee5a04b94565092c29a84572a7750d2f5
Reviewed-on: https://webrtc-review.googlesource.com/85363
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23791}
2018-06-29 16:28:04 +00:00
Bjorn Terelius
43d0b98fe5 Clean up RateControlInput struct, used by bandwidth estimation.
Remove unused member noise_var from RateControlInput struct.

Rename incoming_bitrate to estimated_throughput_bps to reflect
that the AimdRateControl may be running on either the send side
or the receive side.

Bug: webrtc:9411
Change-Id: Ie1ae0c29dc9559ef389993144e69fcd41684f1a4
Reviewed-on: https://webrtc-review.googlesource.com/83728
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Anastasia Koloskova <koloskova@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23783}
2018-06-29 10:47:37 +00:00
Alex Narest
bcf91808a2 Allows audio bitrate allocation in video calls without enabling TWCC (Transport Wide Congestion Control as defined at https://tools.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01.html) for audio stream.
This will allow experimenting with audio bitrate allocation in video calls without increasing transport overhead.

Bug: webrtc:8243
Change-Id: If961780921d53bdce95b68c26641df6875509c1f
Reviewed-on: https://webrtc-review.googlesource.com/84501
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23755}
2018-06-27 10:33:40 +00:00
Mirko Bonadei
beb2d9813c Removing usage of //build/config/compiler:no_size_t_to_int_warning.
Bug: webrtc:9251, webrtc:1348
Change-Id: I76e52abbfab5666cad73044b49172a9799539108
Reviewed-on: https://webrtc-review.googlesource.com/84144
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23686}
2018-06-20 13:44:26 +00:00
Danil Chapovalov
0040b66ad3 Replace rtc::Optional with absl::optional
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script from modules with parameters
'pacing video_coding congestion_controller remote_bitrate_estimator':

find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: I8ea501d7f1ee36e8d8cd3ed37e6b763c7fe29118
Reviewed-on: https://webrtc-review.googlesource.com/83900
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23640}
2018-06-18 10:24:48 +00:00
Ying Wang
66eaed0393 Adding direct congestion window pushback to encoders.
When CongestionWindowPushback experiment is enabled, the pacer is oblivious to the congestion window. The relation between outstanding data and the congestion window affects encoder allocations directly.

Bug: None
Change-Id: Iaacc1d460d44a4ff2d586934c4f9ceb067109337
Reviewed-on: https://webrtc-review.googlesource.com/74922
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23411}
2018-05-28 12:15:59 +00:00
Sebastian Jansson
172fd8536e Replaces redundant congestion controller components
This CL replaces components in the congestion controller module
that are identical to equivalent components in the rtp and goog_cc
subfolder. Some redundant components are left as they were not
trivial to replace.

Bug: webrtc:8415
Change-Id: I86a1f164d7b100b8ec8ba7dbc1c9bda2128a4f37
Reviewed-on: https://webrtc-review.googlesource.com/78521
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23384}
2018-05-24 13:35:31 +00:00
Per Kjellander
dd3eae5f94 Revert "Configure and use max bitrate to limit the AIMD controller estimates."
This reverts commit 18d7c7ea7e.

Reason for revert: 
This seems to cause the auto roller to Chrome to fail on Linux and Mac on the browsertest
WebRtcSimulcastBrowserTest.TestVgaReturnsTwoSimulcastStreams

https://chromium-review.googlesource.com/c/chromium/src/+/1064736


Original change's description:
> Configure and use max bitrate to limit the AIMD controller estimates.
> 
> Bug: webrtc:9275
> Change-Id: I9625cd473e1cb198abe08020f5462f1bd64bf2a5
> Reviewed-on: https://webrtc-review.googlesource.com/77081
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23287}

TBR=terelius@webrtc.org,stefan@webrtc.org,srte@webrtc.org

Change-Id: I8ed827ab6b2f7d2b70b9889e5a88701bfb974d35
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9275
Reviewed-on: https://webrtc-review.googlesource.com/77660
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23291}
2018-05-18 07:12:26 +00:00
Bjorn Terelius
18d7c7ea7e Configure and use max bitrate to limit the AIMD controller estimates.
Bug: webrtc:9275
Change-Id: I9625cd473e1cb198abe08020f5462f1bd64bf2a5
Reviewed-on: https://webrtc-review.googlesource.com/77081
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23287}
2018-05-17 16:07:42 +00:00
Sebastian Jansson
c6c44268bc Moves network control interface to API.
This prepares for allowing injection of a network controller.

Bug: webrtc:9155
Change-Id: I5624f47738db9c5cd4750eac76cb6289e06a7aa3
Reviewed-on: https://webrtc-review.googlesource.com/73100
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23188}
2018-05-09 11:01:36 +00:00
Sebastian Jansson
ea562b40f8 Removes dependency on Optional for unit classes.
This makes the dependency graph simpler and prepares for moving the
unit classes to api/.

Bug: webrtc:9155
Change-Id: I1b36d5e05f75d70ba8951e880d76359f896f7741
Reviewed-on: https://webrtc-review.googlesource.com/74920
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23161}
2018-05-08 08:00:45 +00:00
Sebastian Jansson
ec6e550a8f Removes usage of uninitialized units in network control code.
This removes places where the units types are implicitly left
uninitialized in network_types.h and adds rtc::Optional where needed.

Also removing the change indicator in the NetworkEstimate struct as it
is not used in practice.

Bug: webrtc:9155
Change-Id: I7e30e338effba96bd466ae91e380e6a8e90f66e1
Reviewed-on: https://webrtc-review.googlesource.com/73369
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23126}
2018-05-04 16:19:14 +00:00
Sebastian Jansson
341bfca58c Removes uptr alias in network control code.
Bug: webrtc:9155
Change-Id: Ia3b79642a9477d9357a289f8f14bd2f53bc52e2e
Reviewed-on: https://webrtc-review.googlesource.com/73371
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23098}
2018-05-03 11:57:41 +00:00
philipel
9fd6b98f44 Don't interrupt exponential probing when VideoStream bitrates are reconfigured.
Bug: chromium:834255, webrtc:8955
Change-Id: Iba316e940ddc2d0d5891e57c24b808c68e0bbcfe
Reviewed-on: https://webrtc-review.googlesource.com/70760
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22943}
2018-04-19 15:44:59 +00:00
philipel
0676f224f8 Probe on video encoder reconfiguration test.
This CL includes the changes from this CL:
https://webrtc-review.googlesource.com/c/src/+/63642

Bug: webrtc:8955
Change-Id: If95cdec59f25e97c6ff5ea45a52d6113128a0921
Reviewed-on: https://webrtc-review.googlesource.com/64822
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22910}
2018-04-17 16:54:14 +00:00
Sebastian Jansson
f7ffd94ad2 Removes abbreviated seconds functions on network time classes.
Having only one name for seconds makes the interface more consistent.
The non-abbreviated was chosen since it's used less frequently than
ms() and us().

Bug: None
Change-Id: Ia29ff2f9f18f3dddcde9bac4f041695cef2c8f0f
Reviewed-on: https://webrtc-review.googlesource.com/69817
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22877}
2018-04-16 12:47:38 +00:00
Sebastian Jansson
a73538828f Fixes potential crash in GoogCcNetworkController
UpdatePacingRates required that a bandwidth estimate was available and
would otherwise crash. This CL ensures that there is an initial bandwidth
estimate available from the beginning.

Bug: webrtc:8415
Change-Id: I20c3b444eac42326a78cfebee70b4c1aa370c867
Reviewed-on: https://webrtc-review.googlesource.com/69802
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22857}
2018-04-13 12:24:18 +00:00
Sebastian Jansson
342695d068 Removes network ostream operators.
The ostream operators does not work consistently with gtest since the
definitions would have to be included before the first include of gtest.
This is tricky to ensure and the end result is that the operators will
sometimes work and sometimes not without obvious explanations.
To avoid causing confusing behavior, this CL removes the operators
pending a better solution.

Bug: None
Change-Id: I66bead0efb7246d368359ddf9e9bfad9d67c05da
Reviewed-on: https://webrtc-review.googlesource.com/68640
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22808}
2018-04-10 14:59:15 +00:00
Sebastian Jansson
ae9057831f Removed observer from network controller interface.
Moving the responsibility for calling callbacks from implementations
of NetworkControllerInterface to SendSideCongestionController. This
decreases the coupling and makes the callbacks more explicit.

Bug: webrtc:8415
Change-Id: Ie75effbde01533106080bb6c40308b0c20064c45
Reviewed-on: https://webrtc-review.googlesource.com/66882
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22793}
2018-04-09 11:54:38 +00:00
Sebastian Jansson
f2e3e7a25a Removed observer from probe controller.
Replacing observer interface with polling for pending probe clusters.
The purpose is to make it easier to reason about and control side
effects and to prepare for a similar change in the network controller
interface.

Bug: webrtc:8415
Change-Id: I8101cfda22e640a8e0fa75f3f6e63876db826a89
Reviewed-on: https://webrtc-review.googlesource.com/66881
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22775}
2018-04-06 16:13:37 +00:00
Sebastian Jansson
63b48df334 Removed static const network units.
Static const objects can cause what's called a "static initialization
order fiasco". This CL removes the statically initialized network units
in favor of constexpr defined versions available via static functions.

Bug: webrtc:8415
Change-Id: Ib1b316ae007481c52a53b2d1bb0352a630a220e2
Reviewed-on: https://webrtc-review.googlesource.com/65164
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22670}
2018-03-29 09:45:27 +00:00
Sebastian Jansson
aca5a7df73 Improvements to network control types.
This CL prepares for adding the BBR network controller and
unit tests for GoogCC network controller.

The changes include:
* Adding pad_rate helper method on PacerConfig.
* Adding ostream operators for controller feedback structs.
* Adding increment operator to Timestamp class.
* Adding kEpoch to Timestamp class to represent 0.
* Rounding when multiplying with double.

Bug: webrtc:8415
Change-Id: I58289f37a6f9f2eee0a88bb06fb24dc295942862
Reviewed-on: https://webrtc-review.googlesource.com/61503
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22458}
2018-03-15 15:40:08 +00:00
Sebastian Jansson
efbcfb13a7 Configuration in constructor of Goog CC.
Adding configuration of new GoogCcNetworkController to initializer, this
makes sure that it is properly initialized from the start. To achieve
this SendSideCongestionController waits until it has received the
necessary information to construct the object. This information should
be provided in the constructor for SendSideCongestionController in the
future.

Bug: webrtc:8415
Change-Id: Icc09b8b246bae9f9704b80855fc4caa3450b34fc
Reviewed-on: https://webrtc-review.googlesource.com/58099
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22404}
2018-03-13 16:05:21 +00:00
Karl Wiberg
12edf4ce34 Separate build target for rtc_base/numerics/safe_minmax.h
So that we can avoid dependency cycles.

Bug: none
Change-Id: I821d9f1319dff01403d6e4e310cbb2d4b2b125e8
Reviewed-on: https://webrtc-review.googlesource.com/60500
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22328}
2018-03-07 14:12:00 +00:00
philipel
db4fa4b944 Propagating total_bitrate_bps from BitrateAllocator to ProbeController, part 3.
Trigger on total bitrate change.

Bug: webrtc:8955
Change-Id: I2373a1b7f139c7ea748a9641593e714d6895c8f6
Reviewed-on: https://webrtc-review.googlesource.com/59323
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22323}
2018-03-07 10:31:35 +00:00
Sebastian Jansson
8d9dcb1c89 Adding bps_or method to DataRate class.
Bug: webrtc:8415
Change-Id: I64e46b63d82cb843f0710839c1fc22e2440ae7e1
Reviewed-on: https://webrtc-review.googlesource.com/59222
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22285}
2018-03-05 11:47:52 +00:00
Sebastian Jansson
fc7ec8e9f8 Reland "Moved congestion controller to goog_cc folder."
This is a reland of e6cefdf9c5.

Original change's description:
> Moved congestion controller to goog_cc folder.
> 
> Bug: webrtc:8415
> Change-Id: I2070da0cacf1dbfc4b6a89285af3e68fd03497ab
> Reviewed-on: https://webrtc-review.googlesource.com/43841
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21928}

Bug: webrtc:8415
Change-Id: Ib5cf8641466655d64ac80f720561817f4cab49a9
Reviewed-on: https://webrtc-review.googlesource.com/53062
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22244}
2018-03-01 10:16:12 +00:00
Danil Chapovalov
bda5068fae Revert "Moved congestion controller to goog_cc folder."
This reverts commit e6cefdf9c5.

Reason for revert: conflicts with reverting https://webrtc-review.googlesource.com/c/src/+/52980

Original change's description:
> Moved congestion controller to goog_cc folder.
> 
> Bug: webrtc:8415
> Change-Id: I2070da0cacf1dbfc4b6a89285af3e68fd03497ab
> Reviewed-on: https://webrtc-review.googlesource.com/43841
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21928}

TBR=terelius@webrtc.org,stefan@webrtc.org,srte@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:8415
Change-Id: If8965e1e745e57694192b9ca2a69503c722658d9
Reviewed-on: https://webrtc-review.googlesource.com/53020
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22012}
2018-02-14 10:09:44 +00:00
Sebastian Jansson
e6cefdf9c5 Moved congestion controller to goog_cc folder.
Bug: webrtc:8415
Change-Id: I2070da0cacf1dbfc4b6a89285af3e68fd03497ab
Reviewed-on: https://webrtc-review.googlesource.com/43841
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21928}
2018-02-07 09:50:48 +00:00