Commit graph

53 commits

Author SHA1 Message Date
Jonas Oreland
ed99dae422 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 1
This cl/
1) move WebRtcKeyValueConfig from api/transport to api/ directory.
2) add a test/ScopedKeyValueConfig (compare ScopedFieldTrials).
3) removes usage of webrtc::field_trial:: from the pc/ directory.
4) removes a few unused includes of system_wrappers/field_trial.h.

Bug: webrtc:10335
Change-Id: If29c07900dbe791050b0a5ad05332bedfad035f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253903
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36160}
2022-03-09 13:23:21 +00:00
Artem Titov
ea24027e83 Use backticks not vertical bars to denote variables in comments for /call
Bug: webrtc:12338
Change-Id: I8f92127b61352bd4b98a0690e9a0435bb6c6f870
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226943
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34569}
2021-07-27 18:29:33 +00:00
Danil Chapovalov
cad3e0e2fa Replace DataSize and DataRate factories with newer versions
This is search and replace change:
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataSize::Bytes<\(.*\)>()/DataSize::Bytes(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataSize::bytes/DataSize::Bytes/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::BitsPerSec<\(.*\)>()/DataRate::BitsPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::BytesPerSec<\(.*\)>()/DataRate::BytesPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::KilobitsPerSec<\(.*\)>()/DataRate::KilobitsPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::bps/DataRate::BitsPerSec/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::kbps/DataRate::KilobitsPerSec/g"
git cl format

Bug: webrtc:9709
Change-Id: I65aaca69474ba038c1fe2dd8dc30d3f8e7b94c29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168647
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30545}
2020-02-18 16:09:50 +00:00
Danil Chapovalov
0c626afcf3 Use newer version of TimeDelta and TimeStamp factories in webrtc
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g"
git cl format

Bug: None
Change-Id: I87469d2e4a38369654da839ab7c838215a7911e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168402
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30491}
2020-02-10 12:21:17 +00:00
Ying Wang
9b881abea9 Enable congestion window pushback to reduce bitrate by only drop video frames.
With current congestion window pushback, when congestion window is filling up, it will reduce bitrate directly and encoder may reduce encode quality, resolution, or framerate to adapt to the allocated bitrate, the behavior is depending on the degradation preference.
This change enable congestion window to only drop frames to reduce bitrate (when needed) instead of reduce general bitrate allocation.

Bug: webrtc:11334
Change-Id: I9cf5c20a0858c4d07d006942abe72aa5e1f7cb38
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168059
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30483}
2020-02-07 14:14:47 +00:00
Sebastian Jansson
538ca57b23 Converts const methods in BitrateAllocator to non-member functions.
Also cleaning up finished TransmissionMaxBitrateMultiplier trial.

Bug: webrtc:9883
Change-Id: I049f0e8e3051f91b57201e9ce750427018c74bfa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153889
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29302}
2019-09-25 11:55:13 +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
Sebastian Jansson
40de3cc5ef Propagating TargetRate struct to BitrateAllocator.
Bug: webrtc:9883
Change-Id: I443ac7f1ef0f933e2165fdb2f912d314acc7f2f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153345
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29241}
2019-09-19 14:03:04 +00:00
Sebastian Jansson
93b1ea2168 Using struct for bitrate allocation limits.
Bug: webrtc:9883
Change-Id: I855c29808ffa14626d78842491fdf81cd00589e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153344
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29227}
2019-09-18 17:03:59 +00:00
Sebastian Jansson
4d461ba298 Reusing MediaStreamAllocationConfig struct in ObserverConfig.
This makes it easier to follow the code and reduces the risk of
accidents in the mapping of fields.

Also renaming the ObserverConfig struct to AllocatableTrack to better
reflect what it represents.

Bug: webrtc:9883
Change-Id: Ia320363813db2b4bf7b37852882a1ccb7644ae0b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153342
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29213}
2019-09-17 19:31:25 +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
Jonas Olsson
0182a0300f Reland "Remove the injectable bitrate allocation strategy API."
This is a reland of 80cb3f6db6

Original change's description:
> Remove the injectable bitrate allocation strategy API.
>
> This removes PeerConnectionInterface::SetBitrateAllocationStrategy()
> plus a ton of now-dead code.
>
> Bug: webrtc:10556
> Change-Id: Icfae3bdd011588552934d9db4df16000847db7c3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133169
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28523}

TBR=kwiberg@webrtc.org

Bug: webrtc:10556
Change-Id: Ic17a7a7cc447292306876ee9582ad62fd2499765
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145900
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28585}
2019-07-17 10:20:45 +00:00
Mirko Bonadei
e95b57cdfc Revert "Remove the injectable bitrate allocation strategy API."
This reverts commit 80cb3f6db6.

Reason for revert: Performance regression on downstream project.

Original change's description:
> Remove the injectable bitrate allocation strategy API.
> 
> This removes PeerConnectionInterface::SetBitrateAllocationStrategy()
> plus a ton of now-dead code.
> 
> Bug: webrtc:10556
> Change-Id: Icfae3bdd011588552934d9db4df16000847db7c3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133169
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28523}

TBR=henrika@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,srte@webrtc.org,alexnarest@webrtc.org,jonasolsson@webrtc.org

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

Bug: webrtc:10556
Change-Id: Ife905d661e7b1a227662395c729a9336c62fd2d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145338
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28560}
2019-07-12 15:27:19 +00:00
Jonas Olsson
80cb3f6db6 Remove the injectable bitrate allocation strategy API.
This removes PeerConnectionInterface::SetBitrateAllocationStrategy()
plus a ton of now-dead code.

Bug: webrtc:10556
Change-Id: Icfae3bdd011588552934d9db4df16000847db7c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133169
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28523}
2019-07-10 13:13:25 +00:00
Sebastian Jansson
4ad51d8b31 Removes SendSideCongestionController.
Bug: webrtc:9586
Change-Id: Id6f3508eb19f277d74c34edfbcaeb8a22320b030
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140286
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28222}
2019-06-11 11:09:24 +00:00
Jonas Olsson
8f119ca0a7 Enable experiments with audio bitrate priority.
This CL makes it possible to configure the priority of audio streams in
bitrate allocations using field trials.

It also adds the option to forcibly ignore any injected audio allocation
strategy, so that experimentation with allocation won't be blocked on
the work to remove the strategy injection.

Bug: webrtc:10603
Change-Id: Ic36ceee6c15eb0fad275866f77e2a121066e516c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135467
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27881}
2019-05-08 14:21:01 +00:00
Sebastian Jansson
b55015e4e1 Replacing SequencedTaskChecker with SequenceChecker.
Bug: webrtc:9883
Change-Id: I5e3189da2a46e6f4ed1a3c5a5dfd2f7d75a16b5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130961
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27518}
2019-04-09 12:28:04 +00:00
Sebastian Jansson
da6806c204 Injecting Clock into BitrateAllocator.
Bug: webrtc:10365
Change-Id: I9b722f09a25b3ec0f2899f1c83eae5a4648b6965
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125188
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26952}
2019-03-04 16:26:03 +00:00
Sebastian Jansson
464a5576ea Adds audio priority bitrate field trial parameter.
This replaces the functionality provided by
AudioPriorityBitrateAllocationStrategy, removing the need provide that
component via injection in all clients using audio bitrate priority.

Bug: webrtc:10286
Change-Id: I3bafab56d24459d9d27dc07abffdc8538440a346
Reviewed-on: https://webrtc-review.googlesource.com/c/121402
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26651}
2019-02-12 16:03:22 +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
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
Sebastian Jansson
2701bc93df Signals start rate when registering to TargetTransferRateObserver.
Bug: webrtc:10121
Change-Id: Ib608a98406d61225544d8b13bbcccb65c34e37f0
Reviewed-on: https://webrtc-review.googlesource.com/c/113814
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25983}
2018-12-12 09:22:32 +00:00
Erik Språng
00672b1ddc Don't trigger too many probes when max allocated bitrate changes.
This fixes an issue which can happen if fec is used. The protection
rate may fluctuate and each such change would trigger a new allocation
limit to be signaled. For each such update, the probe controller could
initiate a new probe.

We work around this by both quantizing the protection fraction and by
not sending a new probe unless the max allocated bitrate has increased
significantly (or we are in ALR).

Bug: webrtc:10070
Change-Id: I328963da23aedbcbedeb877aec46f5955cd2b88d
Reviewed-on: https://webrtc-review.googlesource.com/c/113525
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25971}
2018-12-11 16:19:53 +00:00
Erik Språng
d1d7b23f89 Include protection bitrate in total max allocated bitrate
This way we make sure we take fec into account when deciding how high
we probe.

Bug: webrtc:10070
Change-Id: I5286c82fc32dd99f7b9d79c9e5fc4465e1c6c259
Reviewed-on: https://webrtc-review.googlesource.com/c/113429
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25930}
2018-12-07 10:43:55 +00:00
Sebastian Jansson
6736df1778 Moves BitrateAllocationUpdate to api.
This way it can be forwarded to lower layers. This makes it easier to
add information without having to change signatures of intermediate
classes. This will be used in a later CL to use the link capacity in the
Opus decoder.

Bug: webrtc:9718
Change-Id: I4a4c9d104fedb0e4a0bb7f14d169475940edbf7e
Reviewed-on: https://webrtc-review.googlesource.com/c/111508
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25738}
2018-11-21 19:59:55 +00:00
Sebastian Jansson
13e5903626 Using unit classes in BitrateAllocationUpdate struct.
This prepares for moving BitrateAllocationUpdate to API.

Bug: webrtc:9718
Change-Id: Ib2bcedb6b68fde33b6a2466f40829e86438aa973
Reviewed-on: https://webrtc-review.googlesource.com/c/111507
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25737}
2018-11-21 19:56:15 +00:00
Sebastian Jansson
89c94b9aea Adds target bandwidth to BitrateAllocator.
The target bandwidth is a more stable target rate as it does not follow
the variation in the control signal directly. It's intended to be used to
configure the audio frame length.

Bug: webrtc:9718
Change-Id: Idcc83ba0fef90e0ead2926d18ba6893a2b0f085f
Reviewed-on: https://webrtc-review.googlesource.com/c/107729
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25718}
2018-11-21 07:42:09 +00:00
Sebastian Jansson
e2754c95c5 Fixes bug in AudioPriorityBitrateAllocationStrategy field trial.
Previously the rate limits weren't properly applied. This is fixed by
working on mutable copies of the TrackConfig.

Bug: webrtc:9718
Change-Id: I7438c59efa5d7e70fa3ce5e466e2c53a5a7ea9e2
Reviewed-on: https://webrtc-review.googlesource.com/c/107636
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25367}
2018-10-25 13:59:22 +00:00
Sebastian Jansson
c0e4d45ce0 Adds BitrateAllocation struct to OnBitrateUpdated.
This prepares for adding parameters to OnBitrateUpdated. By using a
struct, additional fields doesn't require a change in the signature and
only the obeservers that use the new fields will be affected by the
change.

Bug: webrtc:9718
Change-Id: I7dd6c9577afd77af06da5f56aea312356f80f9c0
Reviewed-on: https://webrtc-review.googlesource.com/c/107727
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25366}
2018-10-25 13:51:11 +00:00
Sebastian Jansson
44a262a6aa Declares BitrateAllocator methods const.
Bug: webrtc:9883
Change-Id: I79e4f8d233281975c4073a381c7568469390b817
Reviewed-on: https://webrtc-review.googlesource.com/c/107725
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25343}
2018-10-24 15:26:36 +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
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Niels Möller
d4043f69ae Replace runtime thread checks by compile-time checks.
For all private methods of BitrateAllocator.

Bug: None
Change-Id: I9943d3ee4cdfe00a842e7c2258f57d88b96c4dda
Reviewed-on: https://webrtc-review.googlesource.com/72860
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23052}
2018-04-27 07:51:55 +00:00
Niels Möller
74e5f804e4 Make BitrateAllocator::transmission_max_bitrate_multiplier_ const.
To make this work, also make the private method
GetTransmissionMaxBitrateMultiplier static.

Bug: None
Change-Id: I1777602b89d404ecbc9956acf9a9c7f852d69911
Reviewed-on: https://webrtc-review.googlesource.com/72440
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23023}
2018-04-25 13:28:13 +00:00
Sebastian Jansson
24ad720885 Uses config struct with bitrate allocator.
This makes it easier to refactor the interface in upcoming CLs.

Bug: None
Change-Id: I67d0216e24f087294e95ac96f7278f302bf69832
Reviewed-on: https://webrtc-review.googlesource.com/71041
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22933}
2018-04-19 09:15:33 +00:00
Sebastian Jansson
448f4d50dc Checking if total max bitrate has changed in BitrateAllocator.
This ensures that the callback will be called if total max bit rate
changes even if min bitrate or padding bitrate has not changed.

Bug: None
Change-Id: I616e95b1f9f5a30733f1d0acb86e18c93001d3db
Reviewed-on: https://webrtc-review.googlesource.com/63642
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22734}
2018-04-04 13:52:20 +00:00
Sebastian Jansson
29b204ede8 Tracking packet feedback availability in BitrateAllocator.
This CL adds tracking of packet feedback availability in the
BitrateAllocator class.

This is part of a series of CLs tracking the transport feedback status
of the streams known to BitrateAllocator and reporting the status to
the congestion controller.

Bug: webrtc:8415
Change-Id: Ie46d7040494ba116928d791a8e4c5dae6992cafc
Reviewed-on: https://webrtc-review.googlesource.com/63202
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22534}
2018-03-21 13:28:48 +00:00
Sebastian Jansson
fe617a3af1 Adding has_packet_feedback to LimitObserver callback.
This CL adds a boolean indicating availability of per packet feedback
to the OnAllocationLimitsChanged callback on the
BitrateAllocator::LimitObserver interface.

This is part of a series of CLs tracking the transport feedback status
of the streams known to BitrateAllocator and reporting the status to
the congestion controller.

Bug: webrtc:8415
Change-Id: I5bd6e5796733da312556f2f681ff06d49ea2becc
Reviewed-on: https://webrtc-review.googlesource.com/63201
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22533}
2018-03-21 13:13:08 +00:00
Ying Wang
012b7e7473 Add a couple of logs.
Bug: webrtc:8963
Change-Id: I462b0fe493306429fdec499f1324f06a80ae17ac
Reviewed-on: https://webrtc-review.googlesource.com/59681
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22293}
2018-03-05 16:42:02 +00:00
Ying Wang
a646d30820 Enables configuration of transmission max bitrate multiplier and fec protection level.
Bug: webrtc:8963
Change-Id: I5e323f3947f84f87791a42024a4168f721ac6094
Reviewed-on: https://webrtc-review.googlesource.com/59142
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22273}
2018-03-02 18:05:29 +00:00
philipel
f69e768032 Propagating total_bitrate_bps from BitrateAllocator to ProbeController, part 1.
Added total_bitrate_bps to LimitObserver::OnAllocationLimitsChanged.

Bug: webrtc:8955
Change-Id: Ied9b2d24ab97cff21518ce70d5d35dfd8230ed08
Reviewed-on: https://webrtc-review.googlesource.com/58801
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22233}
2018-02-28 15:38:15 +00:00
srte
1eb051c9f4 Made functions on BitrateAllocator::ObserverConfig member functions
This makes it visible that there are no side effects and no dependency on BitrateAllocator.

Bug: None
Change-Id: I3d54ea545e694ae8303860114ddb3ce7569ecb14
Reviewed-on: https://webrtc-review.googlesource.com/26920
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20933}
2017-11-29 12:51:49 +00:00
Alex Narest
e0b2ff5ea4 Add kTransmissionMaxBitrateMultiplier logic to audio priority bitrate allocation strategy similarly to default bitrate allocation logic.
Bug: webrtc:8243
Change-Id: I128712ae96cc13ace0c6d2edf518eb59d30a4569
Reviewed-on: https://webrtc-review.googlesource.com/21983
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20722}
2017-11-16 20:23:56 +00:00
Seth Hampson
fe73d6ab87 Extended the bitrate allocator to allow allocation to tracks based upon priorities which are planned to be defined as a relative bitrate in the RTCRtpEncodingParameters.
Bug: None
Change-Id: I80bc6c1e36b03537eb08f53df8c21d540e7408be
Reviewed-on: https://webrtc-review.googlesource.com/16262
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20680}
2017-11-14 22:20:09 +00:00
Mirko Bonadei
675513b96a Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:

for m in PLOG \
  LOG_TAG \
  LOG_GLEM \
  LOG_GLE_EX \
  LOG_GLE \
  LAST_SYSTEM_ERROR \
  LOG_ERRNO_EX \
  LOG_ERRNO \
  LOG_ERR_EX \
  LOG_ERR \
  LOG_V \
  LOG_F \
  LOG_T_F \
  LOG_E \
  LOG_T \
  LOG_CHECK_LEVEL_V \
  LOG_CHECK_LEVEL \
  LOG
do
  git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g"
done
git checkout rtc_base/logging.h
git cl format

Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
2017-11-09 11:56:32 +00:00
Alex Narest
78609d5b6b Reland of BWE allocation strategy
TBR=stefan@webrtc.org,alexnarest@webrtc.org

Bug: webrtc:8243
Change-Id: Ie68e4f414b2ac32ba4e64877cb250fabcb089a07
Reviewed-on: https://webrtc-review.googlesource.com/13940
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Alex Narest <alexnarest@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20369}
2017-10-20 10:16:15 +00:00
Alex Narest
dc9ca9329b Revert "BWE allocation strategy"
This reverts commit a5fbc23379.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> BWE allocation strategy
> 
> This is reland of https://webrtc-review.googlesource.com/c/src/+/4860 with the fixed RampUpTest test
> 
> Bug: webrtc:8243
> Change-Id: I4b90a449b00dd05feee974001e08fb40710b59ac
> Reviewed-on: https://webrtc-review.googlesource.com/13124
> Commit-Queue: Alex Narest <alexnarest@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20345}

TBR=stefan@webrtc.org,alexnarest@webrtc.org

Change-Id: I8ed12cd2115ef63204e384cc93c9f4473daa54d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8243
Reviewed-on: https://webrtc-review.googlesource.com/14020
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Alex Narest <alexnarest@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20361}
2017-10-19 15:34:52 +00:00
Alex Narest
a5fbc23379 BWE allocation strategy
This is reland of https://webrtc-review.googlesource.com/c/src/+/4860 with the fixed RampUpTest test

Bug: webrtc:8243
Change-Id: I4b90a449b00dd05feee974001e08fb40710b59ac
Reviewed-on: https://webrtc-review.googlesource.com/13124
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20345}
2017-10-19 09:30:00 +00:00
Lu Liu
39260c4a6b Revert "BWE allocation strategy allows controlling of bitrate allocation with WEBRTC external logic."
This reverts commit 54d1da13a5.

Reason for revert: Breaking tests

Original change's description:
> BWE allocation strategy allows controlling of bitrate allocation with WEBRTC external logic.
> 
> This CL implements the main logic and IOS appRTC integration.
> 
> Unit tests and Android appRTC will be in separate CL.
> 
> Bug: webrtc:8243
> Change-Id: If8e5195294046a47316e9fade1b0dfec211155e1
> Reviewed-on: https://webrtc-review.googlesource.com/4860
> Commit-Queue: Alex Narest <alexnarest@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20329}

TBR=deadbeef@webrtc.org,nisse@webrtc.org,stefan@webrtc.org,alexnarest@webrtc.org

Change-Id: I5be1da78f360f72be66f9d56dd6b88c1cc13e963
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8243
Reviewed-on: https://webrtc-review.googlesource.com/12560
Reviewed-by: Lu Liu <lliuu@webrtc.org>
Commit-Queue: Lu Liu <lliuu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20330}
2017-10-17 19:59:04 +00:00
Alex Narest
54d1da13a5 BWE allocation strategy allows controlling of bitrate allocation with WEBRTC external logic.
This CL implements the main logic and IOS appRTC integration.

Unit tests and Android appRTC will be in separate CL.

Bug: webrtc:8243
Change-Id: If8e5195294046a47316e9fade1b0dfec211155e1
Reviewed-on: https://webrtc-review.googlesource.com/4860
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20329}
2017-10-17 18:22:15 +00:00