Commit Graph

33767 Commits

Author SHA1 Message Date
a839cca2bc Update six library version
https://crrev.com/c/2837514 uses functionality that is not in the onld version. We need to update it to unblock chromium -> webrtc roll

Bug: None
Change-Id: Ie3052ff58606b2955aa3f984096f6ce20d3ad7b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216241
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33835}
2021-04-26 16:39:07 +00:00
e52274b9e3 Add mbonadei@ as owner of .pylintrc / .vpython.
No-try: true
Bug: None
Change-Id: I3b4bd3d81831fd9a256782401a5780460eed8129
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216242
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33834}
2021-04-26 16:34:57 +00:00
03e912abaf dcsctp: Add Retransmission Queue
The Retransmission Queue contain all message fragments (DATA chunks)
that have once been sent, but not yet ACKed by the receiver. It will
process incoming SACK chunks, which informs it which chunks that the
receiver has seen (ACKed) and which that are lost (NACKed), and will
retransmit chunks when it's time.

If a message has been sent with partial reliability, e.g. to have a
limited number of retransmissions or a limited lifetime, the
Retransmission Queue may discard a partially sent and expired message
and will instruct the receiver that "don't expect this message - it's
expired" by sending a FORWARD-TSN chunk.

This currently also includes the congestion control algorithm as it's
tightly coupled with the state of the retransmission queue. This is
a fairly complicated piece of logic which decides how much data that
can be in-flight, depending on the available bandwidth. This is not done
by any bandwidth estimation, but similar to TCP, where data is sent
until it's lost, and then "we dial down a knob" and take it more
carefully from here on.

Future refactoring will try to separate the logic regarding fragment
retransmission and the congestion control algorithm.

Bug: webrtc:12614
Change-Id: I8678250abb766e567c3450634686919936ea077b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214046
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33833}
2021-04-26 14:58:21 +00:00
27e50ccf4c dcsctp: Add Retransmission Timeout
The socket can measure the round-trip-time (RTT) by two different
scenarios:
  * When a sent data is ACKed
  * When a HEARTBEAT has been sent, which as been ACKed.

The RTT will be used to calculate which timeout value that should be
used for e.g. the retransmission timer (T3-RTX). On connections with a
low RTT, the RTO value will be low, and on a connection with high RTT,
the RTO value will be high. And on a connection with a generally low
RTT value, but where it varies a lot, the RTO value will be calculated
to be fairly high, to not fire unnecessarily. So jitter is bad, and is
part of the calculation.

Bug: webrtc:12614
Change-Id: I64905ad566d5032d0428cd84143a9397355bbe9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214045
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33832}
2021-04-26 13:48:41 +00:00
e249d195e0 Make RefCountedObject require overriding virtual methods
Bug: webrtc:12701
Change-Id: Ia4ae4ad2e857cb8790d6ccfb6f88f07d52a8e91b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215967
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33831}
2021-04-26 11:05:19 +00:00
1959f8fedc Make ChannelInterface::Enabled() be async.
* Changing return value from bool to void since the operation as async
  effects anyway.
* Removing the `enabled()` accessor due to potential threading issues
  and potential TOCTOU issues. It was only used in one place anyway.
* Applying thread restrictions to member variables.

Bug: none
Change-Id: I51949f5594339952d7b717cfd82f99b532e86b23
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216182
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33830}
2021-04-26 09:52:52 +00:00
448d18b18d Update WebRTC code version (2021-04-26T04:02:45).
TBR=webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com,mbonadei@webrtc.org

Bug: None
Change-Id: I18c22154fc480670ad32a6272a95f4056f09f0d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216177
Reviewed-by: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#33829}
2021-04-26 06:10:42 +00:00
b9bdf64b92 dcsctp: Add Heartbeat Handler
It's responsible for answering incoming Heartbeat Requests, and to
send requests itself when a connection is idle. When it receives
a response, it will measure the RTT and if it doesn't receive a response
in time, that will result in a TX error, which will eventually close
the connection.

Bug: webrtc:12614
Change-Id: I08371d9072ff0461f60e0a2f7696c0fd7ccb57c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214129
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33828}
2021-04-25 20:40:18 +00:00
f8476cc02c dcsctp: Add Retransmission Error Counter
This is just a simple SCTP variable, but wrapped in its own object
for convenience.

Bug: webrtc:12614
Change-Id: I0c45c356488d21b71c72a936e4ceeee5ed0ec96d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214047
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33827}
2021-04-25 18:28:31 +00:00
e1d60b0b58 dcsctp: Add Context
In the Socket module, there are a few (two, to be exact right now, but
the goal is to have even more) separate "handlers" that are responsible
for a feature set. These handlers must have an API to interact with
the rest of the socket - and this is the API.

Mocks are also added.

Bug: webrtc:12614
Change-Id: If19b43bf99a784bba3a42467d0ed3abdd8b4c62c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214128
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33826}
2021-04-25 17:43:08 +00:00
dbcf5d3918 Change return type of SetSendingStatus to be void.
The eventual implementation of changing the status will be async so the
return value isn't that useful and was in fact only being used to log
a warning if an error occured.

This change is to facilitate upcoming changes related to media engine.

Bug: webrtc:11993
Change-Id: Ia7f85a9ea18b2648b511fa356918cf32a201461f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215975
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33825}
2021-04-25 15:27:38 +00:00
5ec1d0b25c dcsctp: Add missing test
This was missing in the build file, and caught in post-review at:
https://webrtc-review.googlesource.com/c/src/+/213347

Bug: webrtc:12614
Change-Id: I1870c1e305913b2195df801487b99549b02b2558
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215065
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33824}
2021-04-25 15:18:48 +00:00
4bb4a8f4d6 Update WebRTC code version (2021-04-25T04:03:29).
TBR=webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com,mbonadei@webrtc.org

Bug: None
Change-Id: I3c61fcfa81efcca2f41e29333722f6fb425f721a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216072
Reviewed-by: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#33823}
2021-04-25 05:39:49 +00:00
a002c310e0 Roll chromium_revision 492c83d619..3fcf4b3884 (875565:875696)
Change log: 492c83d619..3fcf4b3884
Full diff: 492c83d619..3fcf4b3884

Changed dependencies
* src/base: f862fec37f..5e6f757090
* src/build: 037125721a..eae219f9f1
* src/ios: 5e2ffe9a9d..468e1607dc
* src/testing: 71417a8c5f..cbf481cd42
* src/third_party: cf181ccab9..7dabd46d8a
* src/third_party/perfetto: e122069ff3..7653b6f2ef
* src/tools: 1d74eabc8d..d78b7e0049
DEPS diff: 492c83d619..3fcf4b3884/DEPS

No update to Clang.

TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com,
BUG=None

Change-Id: I2d465a3e73210fd745af86353e3a4d4a320c8f1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216066
Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#33822}
2021-04-23 16:57:09 +00:00
66241e4fa4 Add GetTopLeft to WgcCaptureSource to facilitate cursor capture.
This change disables native cursor capture in WgcCapturerWin to better
support the existing idiom of wrapping a capturer in a
DesktopAndCursorComposer. That means we also need to set the top_left
property of output DesktopFrames, so I've also implemented GetTopLeft in
WgcCaptureSource to facilitate this. I've also added a few unit tests
for WgcCaptureSource.

Bug: webrtc:12654
Change-Id: I5c9988a6f8548b584451b073ac29fbb482e09e2e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215102
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Austin Orion <auorion@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#33821}
2021-04-23 16:46:49 +00:00
70efbb839b Enhance the readability of the style guide.
* Make links more accessible for screen readers.
* Markup codeblocks with the source language.
* Markup tables with vertical bars on the leftmost and rightmost sides.
* Remove explicit formatting of headings.
* Update broken links according to the current location of the sites.
* Use a line width of 80 characters where possible.
* Use backticks to markup code.

Bug: None
Change-Id: I6177b379fc7a4f457de7729cbec1a25ba0390234
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215974
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33820}
2021-04-23 15:35:56 +00:00
e8080f4a43 Fix uninitialized variable in vp9_encoder_references_fuzzer
Bug: chromium:1201537
Change-Id: Ic900340ebb632a40ed8c34a6e226e83b7a000203
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215962
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33819}
2021-04-23 13:02:19 +00:00
c1d589146b Replace new rtc::RefCountedObject with rtc::make_ref_counted in a few files
Bug: webrtc:12701
Change-Id: Ie50225374f811424faf20caf4cf454b2fd1c4dc9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215930
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33818}
2021-04-23 12:04:39 +00:00
dbcf8afbcd Fix documentation owners formating
Bug: None
Change-Id: I8f52c08d14b826192830b395f8e63e24809224f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215972
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33817}
2021-04-23 11:07:28 +00:00
b7bc2436bc flexfec: add signaling unit tests
Adds a signaling unit tests which asserts that a flexfec
offer negotiates flexfec in the answer

BUG=webrtc:8151

Change-Id: Ica6bfe2bdde1a035cdd429d636fefb7f751062d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204680
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33816}
2021-04-23 09:23:35 +00:00
d7842008ef Add utilities to facilitate correct usage of rtc::RefCounted classes.
We have a few places where RefCountedObject is a class that's inherited
from, whereas it's meant to be the 'final' class. We also have many
places with RefCountedObject boilerplate code that has been copy pasted
around but FinalRefCountedObject might be a better fit for the
implementation. Then there's the fact that it would be nice to reduce the
amount of required boilerplate code.

Bug: webrtc:12701
Change-Id: I0aaf55197c8640b1b17d20c7c15c8d0bb3605161
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215928
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33815}
2021-04-23 09:02:25 +00:00
e6de5ae2d6 Remove virtual inheritance from RTCStatsCollector
Bug: none
Change-Id: I5c3d93f3cc64c588c2f8e750c70c51c991736023
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215961
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33814}
2021-04-23 08:40:35 +00:00
0c3b9098aa Roll chromium_revision 1a13f11499..492c83d619 (872016:875565)
Change log: 1a13f11499..492c83d619
Full diff: 1a13f11499..492c83d619

Changed dependencies
* src/base: 5700691dd4..f862fec37f
* src/build: 5526928992..037125721a
* src/buildtools/third_party/libc++abi/trunk: d0f33885a2..2f2a4e507a
* src/buildtools/third_party/libunwind/trunk: 08f35c8514..5844fc6769
* src/ios: 4eb37acafe..5e2ffe9a9d
* src/testing: 26f265efe4..71417a8c5f
* src/third_party: e1c6211d47..cf181ccab9
* src/third_party/androidx: eXwYVabVnQThhcPnVG-yr1yweogZnSLAmAcy_kKQscsC..OlL9OGf4wTT0pjm2vwmttRgPxRRGKMLtgw5ITuLShmIC
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/49f0329110..15961379e6
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/dafcf4aa95..9cf09f1e1b
* src/third_party/depot_tools: 9955936084..61bf6e8d69
* src/third_party/freetype/src: b9b74f9f78..8a459e5172
* src/third_party/googletest/src: 486a4a6be5..23ef29555e
* src/third_party/icu: 81d656878e..d25bdc013c
* src/third_party/perfetto: 2e2cb5197d..e122069ff3
* src/third_party/r8: wupRO-hEg2hxgKU9FC5HKY88dMpfEpdimjxcgekXH8oC..h1H8tuKYpnoPW2uwLMSaHgD_vVy9_8E6n4UZ5nwbMRkC
* src/tools: bbda6274f3..1d74eabc8d
* src/tools/luci-go: git_revision:99ac75773c6241b6ddf82ade4c54553faa084530..git_revision:7ad561e001cdb13c858e065ef0bb3019aae49601
* src/tools/luci-go: git_revision:99ac75773c6241b6ddf82ade4c54553faa084530..git_revision:7ad561e001cdb13c858e065ef0bb3019aae49601
* src/tools/luci-go: git_revision:99ac75773c6241b6ddf82ade4c54553faa084530..git_revision:7ad561e001cdb13c858e065ef0bb3019aae49601
DEPS diff: 1a13f11499..492c83d619/DEPS

Clang version changed llvmorg-13-init-6429-g0e92cbd6:llvmorg-13-init-7296-ga749bd76
Details: 1a13f11499..492c83d619/tools/clang/scripts/update.py

TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com,
BUG=None

Change-Id: I583eeba9502a5e6b6c93c6a7f2b6ca9a8bc3521d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216063
Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#33813}
2021-04-23 08:39:15 +00:00
f3a687a175 video_replay: add --start-timestamp and --stop-timestamp
to allow filtering of the frames that are being decoded.
Timestamp wraparound is not supported.

BUG=webrtc:12575

Change-Id: If08c46a377336e559475caefa934f6b82c46decc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211864
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33812}
2021-04-23 08:36:15 +00:00
5663ce9152 Avoid undefined behavior in a division operation.
BUG: webrtc:5486
Change-Id: I2850fbec3283b81b49ee4f966349a94aabc2bf82
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215969
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33811}
2021-04-23 07:49:24 +00:00
6674b9879a Update WebRTC code version (2021-04-23T04:02:21).
TBR=webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com,mbonadei@webrtc.org

Bug: None
Change-Id: I1883e4890790f79856795e1e23977632fcb29776
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216060
Reviewed-by: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#33810}
2021-04-23 05:45:12 +00:00
0fd0d5867b Implement FocusOnSelectedSource for WgcCapturerWin.
Previously, windows captured by WgcCapturerWin may have been occluded
by other windows with no functionality to bring them to the top of the
z order. This change implements FocusOnSelectedSource for
WgcCapturerWin to afford consumers this functionality, and match the
experience offered by current capturers.

Bug: webrtc:12664
Change-Id: I8bc067ade90fba0be66a9be57d3429ba54ba1ae0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215241
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Austin Orion <auorion@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#33809}
2021-04-22 18:50:28 +00:00
88f4b33196 usrsctp: Support sending and receiving empty messages
Add new PPIDs 56 and 57. When sending an empty message,
we use the corresponding PPID with a single byte data chunk.
On the receiving side, when detecting such a PPID, we just
ignore the payload content.

Bug: webrtc:12697
Change-Id: I6af481e7281db10d9663e1c0aaf97b3e608432a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215931
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33808}
2021-04-22 13:08:23 +00:00
9bd2457857 Delete SignalQueueDestroyed
It was used only to break the circular dependency between SocketServer
and Thread at destruction time. Replaced with a method call to
SetMessageQueue(nullptr).

Bug: webrtc:11943
Change-Id: I0606d473ad79655cca28411bb02c21e21d2d7220
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215587
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33807}
2021-04-22 13:04:53 +00:00
39e2385509 Add conceptual documentation for Audio - Mixer
NOTRY=true

Bug: webrtc:12570
Change-Id: Iece5588c5a45a8619afb32c812ff671a161e48f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215929
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33806}
2021-04-22 08:59:38 +00:00
feb6eb9701 Create a test showing that maxRetransmits=0, ordered=false works
Bug: chromium:1148951
Change-Id: I7f475bb33ab9988832e8e0770f755238d6e8d5a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215920
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33805}
2021-04-22 06:32:51 +00:00
1366b0f841 AsyncResolver: avoid hanging the WorkerThread.
There's a problem where the destruction of the contained rtc::Thread
will join the spawned thread blocked on getaddrinfo(). However,
getaddrinfo() is sometimes slow and this behavior hinders packet traffic
when it happens.

Fix this by using the brand new detachable PlatformThread support.

Fixed: b:181572711, webrtc:12659
Change-Id: I0b7e0cca3b8b1b3ed22328d940b1bb95cacb5e24
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214780
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33804}
2021-04-22 06:30:11 +00:00
c5bac77159 Add rendered_frames metric to DVQA.
Bug: None
Change-Id: I7990667275cc27a2a9e78398788d10c1b93ddf2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215927
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33803}
2021-04-21 15:40:45 +00:00
e7b752b221 Add fuzzer to validate libvpx vp9 encoder wrapper
Fix simulcast svc controller to reuse dropped frame configuration,
same as full svc and k-svc controllers do.
This fuzzer reminded the issue was still there.

This is a reland of https://webrtc-review.googlesource.com/c/src/+/212281

Bug: webrtc:11999
Change-Id: Id3b2cd6c7e0923adfffb4e04c35ed2d6faca6704
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215921
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33802}
2021-04-21 14:29:04 +00:00
898f091eeb Replace interfaces for sending RTCP with std::functions in ReceiveSideCongestionController
Logic for throttling how often REMB messages are sent is added to ReceiveSideCongestionController as well as a new method SetMaxDesiredReceiveBitrate. These are based on the logic in PacketRouter. The logic for throttling REMB and setting the max REMB will be removed from PacketRouter in a follow up cl.
The purpose is to eventually decouple PacketRouter from sending RTCP messages when RtcpTransceiver is used.

Bug: webrtc:12693
Change-Id: I9fb5cbcd14bb17d977e76d329a906fc0a9abc276
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215685
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33801}
2021-04-21 13:10:44 +00:00
1585587c57 Uniform IPAddress::ToSensitiveString() behavior (debug vs release).
Having a function that changes its behavior based on the build
flavor (debug vs release) is error prone, especially if considered
that the behavior change invalidates the expectation from the function
name itself.

If this feature is required to improve debugging, it should be behind
a macro (for example WEBRTC_LOG_FULL_IP_ADDRESSES) enabled by an
explicit build configuration which is turned OFF by default.

Bug: None
Change-Id: Id7adafc67d1ae674a3dbb382b16ad9faea59eba6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215064
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33800}
2021-04-21 12:31:14 +00:00
48171ec264 Remove more mentions of RTP datachannels
Bug: webtc:6625
Change-Id: I38c51c4c10df8a5f517733f211e030359d33e787
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215783
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33799}
2021-04-21 10:16:43 +00:00
762f21ce8d dcsctp: Add Send Queue
When the client asks for a message to be sent, it's put in the
SendQueue, which is available even when the socket is not yet connected.

When the socket is connected, those messages will be sent on the wire,
possibly fragmented if the message is large enough to not fit inside a
single packet. When the message has been fully sent, it's removed from
the send queue (but it will be in the RetransmissionQueue - which is
added in a follow-up change, until the message has been ACKed).

The Send Queue is a FIFO queue in this iteration, and in SCTP, that's
called a "First Come, First Served" queue, or FCFS. In follow-up work,
the queue and the actual scheduling algorithm which decides which
message that is sent, when there are messages in multiple streams, will
likely be decoupled. But in this iteration, they're in the same class.

Bug: webrtc:12614
Change-Id: Iec1183e625499a21e402e4f2a5ebcf989bc5c3ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214044
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33798}
2021-04-21 10:05:53 +00:00
67b80ac5b2 Fix iOS chromium roll issue
Fix:
FAILED: obj/examples/socketrocket/SRWebSocket.o
../../examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m:1490:42:
error: block implicitly retains 'self'; explicitly mention 'self' to indicate
this is intended behavior [-Werror,-Wimplicit-retain-self]
                    [self _failWithError:_inputStream.streamError];
                                         ^
                                         self->

Bug: None
Change-Id: Ieef356cd74749dbc4aaa5918da7c5b92fa5f4915
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215784
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33797}
2021-04-21 08:06:11 +00:00
97c4458c8f PlatformThread: add support for detached threads.
The change introduces support for detachable PlatformThreads, for which
the Stop() call doesn't wait until the thread has finished executing.

The change also introduces rtc::ThreadAttributes that carries priority
and detachability thread attributes. It additionally refactors all
known use to use the new semantics.

Bug: b:181572711, webrtc:12659
Change-Id: Id96e87c2a0dafabc8047767d241fd5da4505d14c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214704
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33796}
2021-04-21 07:44:31 +00:00
6ef4af9546 Purge old FEC packets from receiver's queue before media sequence numbers wrap around
- Received FEC packets are purged from the queue if:
  1. All media packets protected by the FEC packet are received.
  2. All media packets protected by the FEC packet are recovered.
  3. Newer FEC packet(s) with sequence number '0x3fff' larger than an old FEC packet is received.
- When FEC packets get separated from their protected media packets by more than 48, none of the first conditions ever delete that FEC packet, no matter how old/ irrelevant it gets.
- Under specific circumstances, the new FEC packet (condition 3) is not received before the media sequence number space wraps around, and incorrectly activates the old FEC packet, resulting in FEC decode for the wrong packet.
- This change purges such old FEC packets in time before the media sequence numbers wrap around.

Bug: webrtc:12656
Change-Id: I6ddf5382638c8c7e9a65724b2544dfbbc4803342
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215100
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33795}
2021-04-21 07:33:14 +00:00
20ee02c49f Add codec comparison function to SdpVideoFormat
SdpVideoFormat is used to configure video encoder and decoders.
This CL adds support for comparing two SdpVideoFormat objects
to determine if they specify the same video codec.

This functionality previously only existed in media/base/codec.h
which made the code sensitive to circular dependencies. Once
downstream projects stop using cricket::IsSameCodec, this code
can be removed.

Bug: chromium:1187565
Change-Id: I242069aa6af07917637384c80ee4820887defc7d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213427
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33794}
2021-04-21 07:21:41 +00:00
86ee89f73e Simplify reference counting implementation of PendingTaskSafetyFlag.
On a 32bit system, this reduces the allocation size of the flag
down from 12 bytes to 8, and removes the need for a vtable (the extra
4 bytes are the vtable pointer).

The downside is that this change makes the binary layout of the
flag, less compatible with RefCountedObject<> based reference counting
objects and thus we don't immediately get the benefits of identical
COMDAT folding and subsequently there's a slight binary size increase.
With wider use, the binary size benefits will come.

Bug: none
Change-Id: I04129771790a3258d6accaf0ab1258b7a798a55e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215681
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33793}
2021-04-21 07:04:01 +00:00
e313c07020 Fix iOS compilation for chromium roll
Fix:
FAILED: obj/examples/socketrocket/SRWebSocket.o
error: block implicitly retains 'self'; explicitly mention 'self' to
indicate this is intended behavior [-Werror,-Wimplicit-retain-self]


Bug: None
Change-Id: I55e6c8ebf81d80669308d9249d42dd158b9a09dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215682
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33792}
2021-04-20 14:59:26 +00:00
63b01e19e9 Remove ReceiveDataParams::timestamp
This field was only used in RTP Data Channels and isn't needed anymore.

Bug: webrtc:6625
Change-Id: Ieaa7ae03ca3e90eb4ddec4d384f5a76cef1600cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215687
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33791}
2021-04-20 14:29:49 +00:00
49bec37d9b dcsctp: Log integers as unsigned
Bug: webrtc:12614
Change-Id: I08fa2d43671972a3115c09228a9cd089a53c5c89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214341
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33790}
2021-04-20 14:04:50 +00:00
0e73602a9f dcsctp: Merge ReconfigResponseSN/ReconfigRequestSN
Adding strong types went a little too far as these two types represent
the same sequence number. A "request sequence number" is a number, that
- when responded to - will be used as "response sequence number".

Having them separate added confusion and just a lot of type-casting.

Bug: webrtc:12614
Change-Id: I4636ea8f2252023a2d5a9b7033763e1978b1812e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214130
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33789}
2021-04-20 13:48:37 +00:00
0b0afaa81a dcsctp: Add Chunk Validators
The SCTP RFCs aren't very strict in specifying when a chunk or parameter
is invalid, so most chunks and/or parameters must be accepted but they
may need some cleaning to avoid a lot of error handling deeper in the
chunk handling code.

Bug: webrtc:12614
Change-Id: I723f08cbdc26e1a1b78463b6137340e638089037
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214966
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33788}
2021-04-20 13:37:22 +00:00
59d6e2a19e dcsctp: Add test for StrongAlias<bool> as bool
This test verifies that a StrongAlias<bool> can be evaluated as
a boolean without dereferencing it. Note that this is not the case
for StrongAlias<int>, for example, as that wouldn't even compile. Which
is quite good.

Bug: webrtc:12614
Change-Id: I67329364721fe0354d78daac1233254035454c03
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215686
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33787}
2021-04-20 13:36:17 +00:00
437d129ef5 AEC3: Avoid overcompensating for render onsets during dominant nearend
The ERLE is used to estimate residual echo for echo suppression. The
ERLE is reduced during far-end offset to avoid echo leakage. When there
is a strong near-end present this can cause unnecessary transparency loss.

This change adds an ERLE estimation that does not compensate for onsets and
uses it for residual echo estimation when the suppressor considers the near-end to be dominant.

Bug: webrtc:12686
Change-Id: Ida78eeacf1f95c6e62403f86ba3f2ff055898a84
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215323
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33786}
2021-04-20 12:33:02 +00:00