Commit graph

1805 commits

Author SHA1 Message Date
Sam Zackrisson
2e1f16d55c Make AEC3 json parsing code testonly
Reasons:
- the code is no longer used in Chrome
- it is conceptually weird for WebRTC to have JSON parsing in its API
- there are concerns around the reliability of the underlying JSON library

Additionally, this CL removes the rtc_json "poisonous" attribute: the scheme is incompatible and redundant with testonly.

Bug: webrtc:1493351
Change-Id: I0b621b0e3f183df7315919d9c89242fbe387928f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325062
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41014}
2023-10-26 12:03:02 +00:00
Tommi
7c1ddb760c Support initializing a SequenceChecker with a provided TaskQueue.
Bug: none
Change-Id: I5106f29ab7f9ed8530626f33f6259eb7aeb9e779
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324260
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40993}
2023-10-23 14:43:04 +00:00
Dor Hen
3723433d2f Add support for min value in SampleCounter
Required logic to query the min value of a SampleCounter along with some
additions to the existing test cases

Bug: webrtc:15580
Change-Id: I46afb30ad130f17f9e68ebc794b6935187bb2479
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323900
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40956}
2023-10-18 08:14:46 +00:00
Harald Alvestrand
aa653c0d76 Reland "Deprecate all classes related to AsyncResolver"
This reverts commit 08d431ec34.

Reason for revert: Last (hopefully) Chrome blocker removed

Original change's description:
> Revert "Deprecate all classes related to AsyncResolver"
>
> This reverts commit 61a442809c.
>
> Reason for revert: Breaks roll into Chromium
>
> Original change's description:
> > Deprecate all classes related to AsyncResolver
> >
> > and remove internal usage.
> >
> > Bug: webrtc:12598
> > Change-Id: Ie208682bfa0163f6c7a8e805151cfbda76324496
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322860
> > Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> > Auto-Submit: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40919}
>
> Bug: webrtc:12598
> Change-Id: I8aef5e062e19a51baec75873eddfca2a10467d3c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322901
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Auto-Submit: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40927}

Bug: webrtc:12598
Change-Id: I3c7b07c831eb9ff808368433d9b9ae8ec4b2afb6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323720
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40944}
2023-10-17 07:08:57 +00:00
Björn Terelius
5502de6ee9 Fix missing include.
Bug: webrtc:15556
Change-Id: I18d0010333c4e5bb2ee9bb07a4320101e87cc0b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323641
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40942}
2023-10-16 16:14:52 +00:00
Jeremy Leconte
23bee61dc7 Remove unused variables in ip_address_unittest.
Change-Id: I99bb6b5b8ea3ad813d31ca4995e38125fd1e93b1
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323620
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#40940}
2023-10-16 14:04:28 +00:00
Jeremy Leconte
137c3bfacb Remove unused variable kIPv4MappedRFC1918AddrString.
https://ci.chromium.org/ui/p/webrtc/builders/try/android_compile_arm_rel/51821/overview

Change-Id: Id7650d95d3576d2fbc9b89b717d91fd3ab5c005c
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323462
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40935}
2023-10-16 09:34:41 +00:00
Harald Alvestrand
08d431ec34 Revert "Deprecate all classes related to AsyncResolver"
This reverts commit 61a442809c.

Reason for revert: Breaks roll into Chromium

Original change's description:
> Deprecate all classes related to AsyncResolver
>
> and remove internal usage.
>
> Bug: webrtc:12598
> Change-Id: Ie208682bfa0163f6c7a8e805151cfbda76324496
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322860
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Auto-Submit: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40919}

Bug: webrtc:12598
Change-Id: I8aef5e062e19a51baec75873eddfca2a10467d3c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322901
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40927}
2023-10-13 11:20:51 +00:00
Harald Alvestrand
61a442809c Deprecate all classes related to AsyncResolver
and remove internal usage.

Bug: webrtc:12598
Change-Id: Ie208682bfa0163f6c7a8e805151cfbda76324496
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322860
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40919}
2023-10-12 14:07:37 +00:00
Jeremy Leconte
1a8d5292c2 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 19/inf
Convert most field trials used in PCLF tests.

Change-Id: I26c0c4b1164bb0870aae1a488942cde888cb459d
Bug: webrtc:10335
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322703
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40909}
2023-10-11 11:09:35 +00:00
Danil Chapovalov
c941579e95 Move field trial check WebRTC-DisableRtxRateLimiter
Checking in sending classes avoids using global field trial string in favor of the injected one.

In addition to that RateLimiter looks wrong layer for check that field trial:
checking inside RateLimiter class might be surprising if it is used for limiting something else than RTX bitrate.
evaluating field trial for each retransmitting packet might be expensive

Bug: webrtc:15184, webrtc:10335
Change-Id: I87bae3522bbd9692629d4f9b6caa119be03f2bd6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322720
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40908}
2023-10-11 10:34:17 +00:00
Harald Alvestrand
60362c144c Prepare to deprecate AsyncResolver class
This removes internal usage of AsyncResolver, including from
PhysicalSocketServer.
PhysicalSocketServer was also run through IWYU.

Bug: webrtc:12598
Change-Id: I18aa6fb60e4a40face4afa0446a161379470680d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322721
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40900}
2023-10-10 12:16:33 +00:00
Harald Alvestrand
fb658ca282 RTC_EXPORT AsyncDnsResolver
Its predecessor is being used directly by at least one Chromium function.

Bug: webrtc:12598
Change-Id: I0c521f03cf6664036a48d5d45dcacaa74ae8582c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322800
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40896}
2023-10-10 08:46:15 +00:00
Philipp Hancke
36e4dd2f42 Add histogram for DTLS peer signature algorithm
in order to estimate the impact of deprecating SHA1. Chromium UMA CL:
  https://chromium-review.googlesource.com/c/chromium/src/+/4894345

BUG=webrtc:15517

Change-Id: I5216ba2a8cbba2f276af20d31aa5e111e7c3a141
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321620
Reviewed-by: David Benjamin <davidben@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40882}
2023-10-06 12:25:37 +00:00
Philipp Hancke
ebe207f71c Add field trial for enabling SSL client hello extension permutation
using WebRTC-PermuteTlsClientHello as a field trial.

This has been launched in Chromium already:
  https://groups.google.com/a/chromium.org/g/blink-dev/c/bYZK81WxYBo/m/lKLrZ_P2BwAJ

WebRTC-specific I2S:
  https://groups.google.com/a/chromium.org/g/blink-dev/c/1CIKec0W1fg

Chromestatus entry:
  https://chromestatus.com/feature/5191245718880256

BUG=webrtc:15467

Change-Id: I18f4065661bbe2db03e1823d7bfba4c9b60046aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318640
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40831}
2023-09-28 13:34:38 +00:00
Sergey Silkin
21b5ec1cc7 Add AV1 singlecast bitrate limits
Bug: b/300060059
Change-Id: I07763632b9fec19dae9d676bb2488cd7d2191e76
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321660
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40822}
2023-09-27 22:19:55 +00:00
qwu16
ae82df718c Add codec name H265 to support H265 in WebRTC
Bug: webrtc:13485
Change-Id: I352b15a65867f0d56fc8e9a9e03081bd3258108e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316283
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40773}
2023-09-20 09:25:32 +00:00
Philipp Hancke
1a5630eb99 re-enable SSL-related unit tests on Windows
BUG=None

Change-Id: If2bb0500a3edbafe6b0ae176d29d402d26f2209e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318780
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/main@{#40748}
2023-09-14 11:57:36 +00:00
Tommi
48df56e9ac Remove SignalSSLHandshakeError signal from SSLStreamAdapter.
Also removing has_slots depdency from OpenSSLStreamAdapter and moving
it to the  OpenSSLStreamAdapter subclass where it's still needed.

Bug: webrtc:11943
Change-Id: Ibcae5ea1efff146d78b32bb0eca63d7f44ed08c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318885
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40702}
2023-09-05 12:27:23 +00:00
Tommi
2afd284016 Rename [Un]SubscribeClose event subscription methods for clarity.
This is following up on a discussion here:
https://webrtc-review.googlesource.com/c/src/+/318061

Bug: none
Change-Id: Idb572ca6d0aad8d791eb6ba80dc0f48292f9f244
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318883
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40698}
2023-09-05 10:07:30 +00:00
Tommi
59574ca6d3 Add absl::AnyInvocable to SSLStreamAdapter::Create
Remove internal use of SignalSSLHandshakeError and prepare removal of
sigslot dependency from SSLStreamAdapter.

Bug: webrtc:11943
Change-Id: I9768e2e31529945620bdd8d0d285042bb2388b7b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318881
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40695}
2023-09-05 08:50:11 +00:00
Harald Alvestrand
8219cc3dc9 Fix UAF in the test case where signaling thread goes away
Bug: chromium:1478193
Change-Id: If5207e7f740abcc43f74cf8eab30455a8bb0d5ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318622
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40687}
2023-09-04 08:34:30 +00:00
Harald Alvestrand
96e1882860 Convert AsyncDnsResolver to use absl::AnyInvocable
Bug: webrtc:12598
Change-Id: I0950231d6de7cf53116a573dcd97a3cf5514946c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318400
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40670}
2023-08-31 08:50:40 +00:00
Harald Alvestrand
aa7d2f3b20 More unused sigslot includes
This time, hit the BUILD files too (where possible).

Bug: webrtc:11943
Change-Id: Ic8f2d77e1ba66f740efe0ef73b1ea6051356dedc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318100
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40654}
2023-08-29 12:20:44 +00:00
Harald Alvestrand
3924bc272c Remove sigslot include from async_udp_socket.cc
Also run iwyu on async_udp_socket.cc

Bug: webrtc:11943
Change-Id: I4ca0f468d27be08fa869fde791aec51cf0029047
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317940
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40640}
2023-08-28 12:29:07 +00:00
Harald Alvestrand
4d25a77fd3 Deprecate AsyncResolver config fields and remove internal usage.
Bug: webrtc:12598
Change-Id: Ic43cbcd13e4de44b02351c89da12844606368623
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317604
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40627}
2023-08-25 14:02:27 +00:00
Harald Alvestrand
f45c2ceae0 Fix TSAN conflict in AsyncDnsResolver
Bug: webrtc:12598
Change-Id: I42daf93b26ea56614812fedc26efa850db0d6526
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40615}
2023-08-24 11:36:02 +00:00
Harald Alvestrand
d36be2fc22 Revise AsyncDnsResolver unittest
The revised version should work in more network configurations.
Submitted with no-try to unbreak the build.

No-try: true
Bug: b/297247924, webrtc:12598
Change-Id: I4b4bc586af1ec2393dc257b9cebf06fd71268131
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317560
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40614}
2023-08-24 09:27:25 +00:00
Harald Alvestrand
8d4a5f1122 Add an async DNS resolver suitable for defaulting.
This should replace the wrapping async DNS resolver used
for default resolution.

Bug: webrtc:12598
Change-Id: Ic65ecd17da7a5695d0003178aeb30824a707ec78
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316928
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40607}
2023-08-23 10:08:52 +00:00
inaqui-signal
c570368abc Merge branch 'm116' into 5845 2023-08-09 14:40:20 -05:00
Christoffer Jansson
8dc55689d2 Reland "Skip NetworkTest if IPV4 is not available"
This reverts commit c71bfccaa5.

Reason for revert: Downstream is seemingly fixed.

Original change's description:
> Revert "Skip NetworkTest if IPV4 is not available"
>
> This reverts commit 73ae5ca594.
>
> Reason for revert: Speculative revert due to downstream project breaking.
>
> Original change's description:
> > Skip NetworkTest if IPV4 is not available
> >
> > Bug: b/292167110
> > Change-Id: I6d55524e53d134d9828a85b9d38a4fea71f0af5b
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314920
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40509}
>
> Bug: b/292167110
> Change-Id: I1322d239e699e005419fbb33bf9b00eed0e07664
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315000
> Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Christoffer Jansson <jansson@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40515}

Bug: b/292167110
Change-Id: I5fe4ea203118b043a83b046144f2a9420b1cba77
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315060
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#40516}
2023-08-07 07:49:55 +00:00
Christoffer Jansson
c71bfccaa5 Revert "Skip NetworkTest if IPV4 is not available"
This reverts commit 73ae5ca594.

Reason for revert: Speculative revert due to downstream project breaking.

Original change's description:
> Skip NetworkTest if IPV4 is not available
>
> Bug: b/292167110
> Change-Id: I6d55524e53d134d9828a85b9d38a4fea71f0af5b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314920
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40509}

Bug: b/292167110
Change-Id: I1322d239e699e005419fbb33bf9b00eed0e07664
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315000
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40515}
2023-08-04 12:57:24 +00:00
Harald Alvestrand
b38d9d2b6f Add ArrayView versions of SendRtp and SendRtcp
This is part of the long term plan to stop using pointer + length
to pass around buffers.

Bug: webrtc:14870
Change-Id: Ibaf5258fd326b56132b9b5a8a6b1563a763ef2f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314960
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40512}
2023-08-04 11:20:53 +00:00
Christoffer Jansson
73ae5ca594 Skip NetworkTest if IPV4 is not available
Bug: b/292167110
Change-Id: I6d55524e53d134d9828a85b9d38a4fea71f0af5b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314920
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40509}
2023-08-03 14:25:09 +00:00
Mirko Bonadei
23fc2bee6b Remove backwards compatibity #include
Bug: b/292167110
Change-Id: I3d9766ac095256a069c9bae34d6d3402819d0e15
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314680
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40501}
2023-08-02 11:39:30 +00:00
Mirko Bonadei
0d8b79eb40 Reland "Extract HasIPv4Enabled/HasIPv6Enabled."
This is a reland of commit 86cfe50c0e

The fix was to add a backwards compatible #include + build dep.
They will be removed once Chromium is migrated.

Original change's description:
> Extract HasIPv4Enabled/HasIPv6Enabled.
>
> Bug: b/292167110
> Change-Id: Idafa4ef23e87951bdd0276c29dee3e7f8be68476
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312580
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40478}

Bug: b/292167110
Change-Id: I9797f52adf15aba57e114d0a1efec0f757ead278
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/313264
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40491}
2023-07-31 07:51:19 +00:00
Joachim Reiersen
d212551ad3 Update RTC_LOG macro so it can be used when called from xyz::rtc namespaces
Similar to earlier CL https://webrtc-review.googlesource.com/c/src/+/169683. While this is a rather specific use case and solution, currently these macros are using a mix of styles ever since https://webrtc-review.googlesource.com/c/src/+/184934. By switching to ::rtc we can ensure that the right namespace is used.

Bug: webrtc:11400
Change-Id: Id06f09b5224a399bd6b43bf0237422b24b5adfb1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312980
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40490}
2023-07-31 06:34:54 +00:00
Mirko Bonadei
3d7889a4ca Revert "Extract HasIPv4Enabled/HasIPv6Enabled."
This reverts commit 86cfe50c0e.

Reason for revert: Breaks roll into Chromium.

https://ci.chromium.org/ui/p/chromium/builders/try/android-arm64-rel/264191/overview

Original change's description:
> Extract HasIPv4Enabled/HasIPv6Enabled.
>
> Bug: b/292167110
> Change-Id: Idafa4ef23e87951bdd0276c29dee3e7f8be68476
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312580
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40478}

Bug: b/292167110
Change-Id: Id7ebb5a673eac3c83a2236d4dfbaf31cce1eb9b6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/313262
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40480}
2023-07-27 06:35:55 +00:00
Mirko Bonadei
86cfe50c0e Extract HasIPv4Enabled/HasIPv6Enabled.
Bug: b/292167110
Change-Id: Idafa4ef23e87951bdd0276c29dee3e7f8be68476
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312580
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40478}
2023-07-26 21:17:02 +00:00
Danil Chapovalov
e546ff99a6 Introduce strong types friendly version of RateStatistics
With the intent to migrate all usages of the RateStatistics and RateTracker to these two new classes and thus encourage strong types over raw ints

Bug: webrtc:13756
Change-Id: I6d98024e903e75c41b2929509f601bb32d15259d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312460
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40451}
2023-07-21 14:15:22 +00:00
Anne Redulla
73d51f8e84 [ssci] Added Shipped field to READMEs
This CL adds the Shipped field (and may update the
License File field) in Chromium READMEs. Changes were
automatically created, so if you disagree with any of
them (e.g. a package is used only for testing purposes
and is not shipped), comment the suggested change and
why.

See the LSC doc at go/lsc-chrome-metadata.

Bug: b:285450740
Change-Id: If4955c6f6e7b58e0c99469fc45ed5b9e8f30a32b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311720
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Anne Redulla <aredulla@google.com>
Cr-Commit-Position: refs/heads/main@{#40424}
2023-07-12 07:31:06 +00:00
Danil Chapovalov
26f72901c6 Mark rtc::CopyOnWriteBuffer move constructor noexcept
To allow use more efficient move instead of copy when wrapped into std::vector

Bug: webrtc:15263
Change-Id: Ie085e3ae41fc4e49b350e430a6dea4767777bbf4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311460
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40403}
2023-07-06 10:21:30 +00:00
Li-Yu Yu
758f26852d Fix downstream review comments for C++20
This CL addresses the review comments for
https://webrtc-review.googlesource.com/c/src/+/261221
in the downstream cherry-pick: https://crrev.com/c/4660950.

*   Always use size_t{} for casting.
*   Remove unneeded size_t casts.
*   Avoid using __x as it is reserved for the compiler.

Bug: b:217226507
Change-Id: I13c57cb69d7db066ac9a6dbd15b7f6de54abb613
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311360
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Li-Yu Yu <aaronyu@google.com>
Cr-Commit-Position: refs/heads/main@{#40395}
2023-07-04 09:06:07 +00:00
Philipp Hancke
3adaeefbc6 Fix TimeUTCMicros resolution on Windows
making it return actual microseconds instead of being limited to
millisecond resolution.

This uses GetSystemTimeAsFileTime
  https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimeasfiletime
which returns a timestamp in multiples of 100ns since January 1st 1601.

BUG=webrtc:15212

Change-Id: I293868d8f683289a9dbcf6eccb910bd9c6694e57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306440
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40360}
2023-06-27 14:15:09 +00:00
Mirko Bonadei
589ee5ae62 Add nogncheck to protobuf_utils.h #include.
GN dependency checker doesn't run the preprocessor, so when the build
is configured with `rtc_enable_protobuf = false` it complains that
protobuf headers don't have a dependency (since the dependency is not
added here [1]).

It is unclear why this problem didn't show up before [2].

[1] - https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/rtc_base/BUILD.gn;l=26-29;drc=45afbc1e81449609cea181e410fa6875b00ec151
[2] - https://webrtc-review.googlesource.com/c/src/+/309262

Bug: None
Change-Id: I139fe3a9804209f0ca39a5cccce8fd4f3ae062c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310320
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40343}
2023-06-26 08:17:20 +00:00
Olov Brändström
7bf1cd341a Prevent warnings from timestamp aligner used in AudioDeviceBuffer
The logcat is spammed with warnings from timestamp aligner.
This CL make a workaround to use the timestamp aligner to get capture times,
without generating the warnings.

Bug: webrtc:14970
Change-Id: Idab4b298e0484a57841a214db9440f9ac6faaa4d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296324
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#39486}
2023-06-23 12:06:37 -04:00
Rasmus Brandt
0510463439 Enable RttMult by default.
This feature has had positive impact in downstream experiments, so we should enable it by default. It will be kept around as a kill switch for a while though.

Bug: webrtc:15260
Change-Id: Ibfd25f5be124f65cd4360ae76f7022bb46f65301
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309781
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40327}
2023-06-21 14:17:11 +00:00
Samuel Attard
6efbd1fdbc fix: do not use dispatch_queue_global_t directly
Referencing this type directly is not allowed when building
with the macOS 14.0 SDK.

Other usages in webrtc follow this inline pattern too so
going with this instead of "auto" which also works.

Change-Id: I84a0ba9c78e83843bc73c71c642caca75750f127
Bug: chromium:1454356
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308560
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40313}
2023-06-20 10:23:18 +00:00
Sameer Vijaykar
45afbc1e81 Allow setting a custom randomness source.
This is useful in environments where OpenSSL may not be available.

Bug: webrtc:15240
Change-Id: I7ba29e44bd1d25231df13ee79dacc74f260ded67
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308600
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Cr-Commit-Position: refs/heads/main@{#40293}
2023-06-15 15:26:48 +00:00
Philipp Hancke
1cc41ea84f Remove unused Win32Window class
BUG=None

Change-Id: I1d6b4e64a01076166d841c7c72eb0e2b968dd812
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306441
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40140}
2023-05-25 10:48:40 +00:00
Ying Wang
aa6d4fa622 Adds WebRTC-DisableRtxRateLimiter for enable/disable RTX rate limiter.
Change-Id: I22e65c5b2a0b5017aa52a3f1af0fc2fd6357f439
Bug: webrtc:15184
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305660
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40116}
2023-05-23 09:59:11 +00:00
Mirko Bonadei
efb1292574 Remove WEBRTC_EXTERNAL_JSON.
The flexibility offered by the GN `rtc_jsoncpp_root` should be enough
to wire a different version of jsoncpp.

Bug: b/281848049
Change-Id: I8af39fec2406e27c3af7b7ec1949a4762dce762f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304861
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40045}
2023-05-10 21:34:52 +00:00
Yury Yarashevich
c0b470c327 Update ssl_roots.h with https://pki.goog/roots.pem
Bug: webrtc:11710
Change-Id: Idc2f28ad0f9a37f2d3d38e3ce377bf903c1de1a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304701
Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40040}
2023-05-10 13:37:34 +00:00
Joachim Reiersen
aac19d3136 Fix SSLStreamAdapterTestDTLSCertChain when building with OpenSSL
These tests were failing when building WebRTC against OpenSSL instead of
BoringSSL. The reason is that OpenSSLStreamAdapter::SSLVerifyCallback in
the BoringSSL mode returns the full cert_chain by calling
SSL_get0_peer_certificates. This API does not exist in OpenSSL, instead
only a single certificate is fetched via X509_STORE_CTX_get0_cert.

ifdef out the parts of the test that assert on cert[1] and cert[2].

An alternative but more involved way to fix these tests could be to use
X509_STORE_CTX_get1_chain to fetch the full chain on the OpenSSL path.

Bug: webrtc:15153
Change-Id: I1ede6a3c5a63d4afd2de849f5e44fcd67592aa3c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304400
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40022}
2023-05-09 11:03:39 +00:00
Diep Bui
7e2aa7d70a Add logs to see if network is ignored because flag IFF_RUNNING is not set.
Some chrome os endpoints get ICE NEVER CONNECTED because their wireless interfaces are ignored. One possible explanation is that result from getifaddrs is incorrect because some interfaces can work even if IFF_RUNNING is not set. Comparing to chromium code, not all messages with IFF_RUNNING on wireless interface are considered (https://chromium.googlesource.com/chromium/src/+/refs/heads/main/net/base/address_tracker_linux.cc#539). Thus the log print helps us to verify our explanation.

Chrome log: https://screenshot.googleplex.com/8SnDn66F56HAKfQ
Webrtc log: https://screenshot.googleplex.com/4jKxPsTHxExNBgz

Bug: webrtc:14334
Change-Id: Icd67dbe4e8ddcaed8b583f2fdb5f1fadfd7bac60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304460
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40020}
2023-05-09 10:01:36 +00:00
Tommi
301e546a68 Remove SequenceCheckerImpl::valid_system_queue_
As pointed out in issue webrtc:15146 this Mac/iOS specific variable,
makes the SequenceChecker behave incorrectly on those platforms.

The variable was introduced in a CL that merged the previous checker
classes, ThreadChecker and SequencedTaskChecker, but curiously neither
one of them had such a variable. So I'm not exactly sure what problem
was being solved. Hence I'm wondering if we actually need it.

Reference: https://webrtc-review.googlesource.com/c/src/+/129721

Bug: webrtc:15146
Change-Id: Ia7a9eb17b993c4f8a1e8204c658bf0b3dbdaa1e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304401
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40019}
2023-05-09 09:40:51 +00:00
Markus Handell
c8c4a282a6 Introduce support for video packet batching.
This CL introduces a new feature enabling video packet send batches.
The feature is enabled via
PeerConnectionInterface
::RTCConfiguration
::MediaConfig
::enable_send_packet_batching.

PacketOptions have been augmented with attribute "batchable" (set for
all video packets) and attribute "last_packet_in_batch" which gives
injected AsyncPacketSockets a chance to understand when a batch begins
and ends.

When the feature is on, packets are collected in RtpSenderEgress. On
reception of OnBatchComplete from PacingController, RtpSenderEgress
sends the collected batch, setting "last_packet_in_batch" to true
in the last packet.

Bug: chromium:1439830
Change-Id: I1846b9d4a8a0efd227d617691213a2e048bdc8a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303720
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40012}
2023-05-08 16:24:03 +00:00
Diep Bui
41daa40203 Update log level in network.cc to avoid excessive log printing
Bug: webrtc:14334
Change-Id: I034a7db47b5af14fb437d7370331cdadfed0c1a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304021
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39973}
2023-05-03 08:13:02 +00:00
Rashad Sookram
147fdb9f46 Merge branch 'm112' into 5615 2023-04-27 12:45:13 -04:00
Per K
d1771e925d Enable SSL logging per default
Done in order to simplify connection debuging.

Example log:

openssl_adapter.cc:829): connect_loop TLS client read_server_hello
(openssl_adapter.cc:829): connect_loop TLS client read_server_certificate
(openssl_adapter.cc:829): connect_loop TLS client read_certificate_status
(openssl_adapter.cc:829): connect_loop TLS client verify_server_certificate
(openssl_stream_adapter.cc:1128): Accepted peer certificate.
(openssl_adapter.cc:829): connect_loop TLS client read_server_key_exchange
(openssl_adapter.cc:829): connect_loop TLS client read_certificate_request
(openssl_adapter.cc:829): connect_loop TLS client read_server_hello_done
(openssl_adapter.cc:829): connect_loop TLS client send_client_certificate
(openssl_adapter.cc:829): connect_loop TLS client send_client_key_exchange
(openssl_adapter.cc:829): connect_loop TLS client send_client_certificate_verify
(openssl_adapter.cc:829): connect_loop TLS client send_client_finished
(openssl_adapter.cc:829): connect_loop TLS client finish_flight
(openssl_adapter.cc:829): connect_loop TLS client read_session_ticket
(openssl_adapter.cc:829): connect_exit TLS client read_session_ticket
(openssl_adapter.cc:829): accept_loop TLS server verify_client_certificate
(openssl_stream_adapter.cc:1128): Accepted peer certificate.
(openssl_adapter.cc:829): accept_loop TLS server read_client_key_exchange
(peer_connection.cc:1952): Changing IceConnectionState 0 => 1
(openssl_adapter.cc:829): accept_loop TLS server read_client_certificate_verify
(peer_connection.cc:1971): Changing standardized IceConnectionState 0 => 1
(peer_connection.cc:1971): Changing standardized IceConnectionState 0 => 1
(peer_connection.cc:1971): Changing standardized IceConnectionState 1 => 2
(peer_connection.cc:1971): Changing standardized IceConnectionState 1 => 2
(openssl_adapter.cc:829): accept_loop TLS server read_change_cipher_spec
(openssl_adapter.cc:829): accept_loop TLS server process_change_cipher_spec
(openssl_adapter.cc:829): accept_loop TLS server read_next_proto
(openssl_adapter.cc:829): accept_loop TLS server read_channel_id
(openssl_adapter.cc:829): accept_loop TLS server read_client_finished
(openssl_adapter.cc:829): accept_loop TLS server send_server_finished
(openssl_adapter.cc:829): accept_loop TLS server finish_server_handshake
(openssl_adapter.cc:829): accept_loop TLS server done
(openssl_adapter.cc:829): handshake_done TLS server done
(openssl_adapter.cc:829): accept_exit TLS server done
(dtls_transport.cc:688): DtlsTransport[0|1|__]: DTLS handshake complete.

Bug: b/275671043
Change-Id: Ib8d394aa74c5665c489b485bb44152aff67d3b7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302300
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39955}
2023-04-26 13:01:13 +00:00
Sameer Vijaykar
df7df199ab Clean up IPv6 fixes field trial artifacts.
The fixes have been default enabled, so clean up dead code.

Bug: webrtc:14334
Change-Id: I4967d5ad451ac333c54294fc14bea6c7ba1445e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301180
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Cr-Commit-Position: refs/heads/main@{#39949}
2023-04-25 14:59:55 +00:00
Jared Siskin
802e8e5fdb Format /rtc_base
git ls-files | grep -e  "\(\.h\|\.cc\)$" | grep -e  "^rtc_base/" | xargs clang-format -i ; git cl format
after landing: add to .git-blame-ignore-revs

Bug: webrtc:15082
Change-Id: I152228f7c7926adf95d2f3fbbe4178556fd75d0d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302061
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39914}
2023-04-21 06:17:42 +00:00
Michael Horowitz
8a10dca8ff Set AV1 default bitrate limits.
Bug: webrtc:15097
Change-Id: I9106665ccb9e980e9c28f56c8f376c6c0a3c9d35
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301802
Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39898}
2023-04-19 18:45:33 +00:00
Sameer Vijaykar
1f251dd67e Default enable WebRTC-IPv6NetworkResolutionFixes
Fully launched on mobile and approved for chrome launch.

Removed tests for feature enablement with field trial.

Bug: webrtc:14334
Change-Id: I7ca7183ff618835fef8c820cfd52863e1c7fa25e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301163
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Cr-Commit-Position: refs/heads/main@{#39879}
2023-04-17 20:28:53 +00:00
Diep Bui
5248228d79 Do not use deprecated IPv6 on Windows, and set temporary address attribute for IPv6
Currently webrtc does not have info about interface flags, thus it can use deprecated IPv6 and does not prefer temporary addresses as mentioned in https://www.rfc-editor.org/rfc/rfc8835#name-usage-of-temporary-ipv6-add

Test: not able to test it because cannot mock GetAdaptersAddresses system call on Windows. However, it should be correct because the implementation is the same as chromium code. https://source.chromium.org/chromium/chromium/src/+/main:net/base/network_interfaces_win.cc;l=182

Bug: webrtc:14334
Change-Id: Iae696b00368ae2f9480b542d2ddbc036338081f1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300965
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39839}
2023-04-13 07:49:23 +00:00
Diep Bui
46849fc73c Print discovered network interfaces for debugging ICE_NEVER_CONNECTED endcause.
Bug: webrtc:14334
Change-Id: Iad2f25e44cd3a154d6dceda755696480e2618a93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299421
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39716}
2023-03-29 11:58:22 +00:00
Tommi
c848268ab1 Use SequenceChecker(SequenceChecker::kDetached) in a few places.
This CL is partly a test to see if there's an impact on binary size:
- Not a big difference for binaries (decrease): -776b to -4Kb
- For libraries (libwebrtc.a) it actually increases the size: +40Kb

Secondarily this CL is basically to introduce this pattern to the
code base. In terms of LOC, this makes things slightly more compact.

From:

  class Foo {
   public:
     Foo() {
       checker_.Detach();
     }
   private:
    SequenceChecker checker_;
  };

To:

  class Foo {
   public:
     Foo() = default;
   private:
    SequenceChecker checker_{SequenceChecker::kDetached};
  };

Bug: none
Change-Id: I59fc34ccea10847e13455a349851ce9a0af458e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299020
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39664}
2023-03-24 07:44:18 +00:00
Per K
7efd372f02 Per default endable reading incoming packet timestamp from socket
This cl per default enable the experiment WebRTC-SCM-Timestamp but
leaves the wiring in place for now to explictly allow disabling it.

Bug: webrtc:5773, webrtc:14066
Change-Id: I6118eef73384791ab4d1377e35d36435dc4fa0e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298442
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39624}
2023-03-21 14:41:37 +00:00
Tommi
3da04a93cd Allow SequenceChecker to be initialized detached.
The motivation for this is to not have to implement this pattern:

foo.h:

class Foo {
 public:
  Foo();
 private:
  SequenceChecker checker_;
};

foo.cc:

Foo::Foo() {
  checker_.Detach();
}

And instead be able to do this inline in the .h file:

class Foo {
 public:
  Foo();
 private:
  SequenceChecker checker_{SequenceChecker::kDetached};
};

Bug: none
Change-Id: Idd7ca82d15c2f77f3aaccf26f1943a49f4b40661
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298445
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39616}
2023-03-21 12:34:15 +00:00
Jeremy Leconte
022d4ec34a Fix 'DoNotOptimize<int>' is deprecated issue.
Change-Id: Ia25b7f73882d45bd2f1a606f51569269ece25fe0
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298042
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39589}
2023-03-17 14:56:40 +00:00
Michael Horowitz
12910caf29 Apply resolution-bitrate limits collected from field trial (cl/294600) for AV1.
Bug: webrtc:14931
Change-Id: I1e8471a499bc884cb9479609a2b093de90f638d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296120
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39582}
2023-03-16 19:04:32 +00:00
Taylor Brandstetter
5136600626 Implement WaitPoll for Fuchsia
Fuchsia's libc provides `select` and `poll` but not `epoll`.

This CL adds a `WaitPoll` method, which is modeled after `WaitSelect` but uses `poll`. The pre-existing `WaitPoll` method was renamed to `WaitPollOneDispatcher`.

TESTED="2p video call on Fuchsia. WaitPoll is faster compared to
WaitSelect, primarily because WaitSelect pessimistically calls
getsockopt(SO_ERROR) on each fd, while WaitPoll does so only on fds that
have entered an error state."

Original author: tombergan@google.com

Bug: None
Change-Id: I83cc824fca40d691fd93712c1c933ff21b3f877c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296826
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tom Bergan <tombergan@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39564}
2023-03-15 14:35:08 +00:00
Peter Kasting
ab456dd092 Always check out google_benchmark, part 5.
Remove use of google_benchmark/buildconfig.gni.

Bug: chromium:1404759
Change-Id: I06e225b1457dd50e3777c5fcd277f639471f453a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297700
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39560}
2023-03-15 07:52:04 +00:00
Peter Kasting
049f5ef9b9 Always check out google_benchmark, part 4.
Remove use of non-WebRTC-specific arg to control benchmark use.

Bug: chromium:1404759
Change-Id: If50b215ff6c7698d385d1271bc8b6c38ed443e32
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297680
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39556}
2023-03-14 20:28:26 +00:00
Peter Kasting
1e6d77c29a Always check out google_benchmark, part 3.
Add a WebRTC-specific arg that can be used to control use of targets
that rely on //third_party/google_benchmarks, so the .gni in that
directory can eventually be removed.

Bug: chromium:1404759
Change-Id: I2a9422fae119ca13eb50028d962fc0a671b5fb33
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297460
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39553}
2023-03-14 12:14:51 +00:00
Hans Wennborg
1ee02d4580 Add missing include of pthread.h
This presumably worked before because some libc++ header included it
transitively, but that's no longer the case.

Bug: chromium:1423839
Change-Id: I6ed1c3474c1bfa02084a665c0b9e249484ac50d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297420
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39544}
2023-03-13 13:06:56 +00:00
Bruno Pitrus
86eb6ba207 Add missing header causing build error with GCC13
Bug: chromium:957519
Change-Id: I0146fdb18764b683b502e9804bce1c7b2ab05294
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296980
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Bruno Pitrus <brunopitrus@hotmail.com>
Cr-Commit-Position: refs/heads/main@{#39536}
2023-03-10 21:07:30 +00:00
Olov Brändström
3ca732d12d Prevent warnings from timestamp aligner used in AudioDeviceBuffer
The logcat is spammed with warnings from timestamp aligner.
This CL make a workaround to use the timestamp aligner to get capture times,
without generating the warnings.

Bug: webrtc:14970
Change-Id: Idab4b298e0484a57841a214db9440f9ac6faaa4d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296324
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#39486}
2023-03-06 15:47:51 +00:00
philipel
579a7b498c Add OptionalBlobEncoder for RTC event logs.
Bug: webrtc:14801
Change-Id: I7c14597e39b312c26573f034dca444cc1d90e332
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295480
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39449}
2023-03-02 12:02:07 +00:00
Markus Handell
2fa39bdfc9 Implement support for Chrome task origin tracing. #3.8/4
This CL forwards TaskQueue locations to the contained
task queue.

Bug: chromium:1416199
Change-Id: I989ae445a67991bf5a857407135dbe8bacbd3c55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295622
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39446}
2023-03-01 16:04:36 +00:00
Markus Handell
fb727f3a5f Implement support for Chrome task origin tracing. #3.9/4
This CL forwards repeating task client locations to the passed
task queue.

Bug: chromium:1416199
Change-Id: I437d596f8d327d13498b47dfc0a03812af870331
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295623
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39443}
2023-03-01 15:47:54 +00:00
Markus Handell
8cb31cf125 Implement support for Chrome task origin tracing. #4/4
This CL forwards BlockingCall client locations to
BlockingCallImpl.

Fixed: chromium:1416199
Change-Id: Ic5865280ec5c72a09a64419940b8343e8a54986b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295624
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39442}
2023-03-01 15:46:49 +00:00
Markus Handell
a1ceae206b Implement support for Chrome task origin tracing. #3.5/4
This CL migrates unit tests to the new TaskQueueBase interface.

Bug: chromium:1416199
Change-Id: Ic15c694b28eb67450ac99fdd56754de1246a4d95
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295621
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39434}
2023-03-01 11:11:37 +00:00
Michael Horowitz
b27efd487d Add option to configure AV1 EncoderInfo resolution_bitrate_limits.
bug: webrtc:14931
Change-Id: I8ade2a888d29f76a0f690fc3541b45b7304ad4d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294600
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39426}
2023-02-28 20:48:33 +00:00
Emil Lundmark
227574804f Correctly register test field trials in parser unittest
Previously, field_trial::FindFullName would be called before
field_trial::FieldTrialsAllowedInScopeForTesting was initialized because
member variables will be initialized after the initializer list.

Bug: webrtc:14154
Change-Id: I69098259a21a55a268d5b45949c3ed02e82ae001
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295541
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39420}
2023-02-28 15:47:54 +00:00
Markus Handell
2a256c82ec Implement support for Chrome task origin tracing. #2/4
This prepares TaskQueueBase sub classes to be able to migrate to
the location and traits-based API. It re-introduces a Location class
into the webrtc namespace, which is meant to be overridden by Chromium.

Bug: chromium:1416199
Change-Id: I712c7806a71b3b99b2a2bf95e555b357c21c15ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294381
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39400}
2023-02-27 13:17:38 +00:00
Sergey Silkin
8566e779e3 Add samples sum calculation
Bug: b/261160916, webrtc:14852
Change-Id: I88e464fce4673dd9b9683219b8d2837206579ba5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293942
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39386}
2023-02-24 11:48:39 +00:00
Seija K
1a890c13ba Changed OutputToDebug to create a CFString at compile-time, rather than runtime
CFStringFromCString is useful, however if we have a static C string, we can use the defined macro CFSTR to create a CFString at runtime instead.

Bug: None
Change-Id: I54b3f590b3ab07858409af27b817013c98556ded
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293060
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Seija K. <doremylover123@gmail.com>
Cr-Commit-Position: refs/heads/main@{#39341}
2023-02-19 22:41:59 +00:00
Rashad Sookram
03ddb5df82 Merge branch 'm110' into 5481 2023-02-17 11:35:29 -05:00
Mirko Bonadei
d76d4822b7 Remove base64 from publicly visible targets.
This library is not expected to be used outside of WebRTC.

Bug: None
Change-Id: I35e864eccc2e4101255332372e0c27bb0c492586
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293341
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39322}
2023-02-16 00:12:50 +00:00
Harald Alvestrand
5ad491ec87 Remove call operator from UniqueIdGenerator classes
Call operators do not improve code clarity, and usage was moderate.

Bug: None
Change-Id: I8d86bd7d435ce88e99f4abee8ab95a336d47dc22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292960
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39294}
2023-02-10 13:10:35 +00:00
Artem Titov
327405165b Add method to get FD for physical socket
Bug: b/264850454, webrtc:14866
Change-Id: I8a47aa3560fa8a5d20a9984cc507c543256788dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291521
Reviewed-by: Victor Boivie <boivie@google.com>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39234}
2023-01-31 10:25:45 +00:00
Danil Chapovalov
2ded55e0df Cleanup Thread::BlockingCall
Remove integration with socket server of the current thread
Network thread that uses PhysicalSocketServer shouldn't be allowed to do blocking calls
Other threads that use NullSocketServer do not need to process any messages while blocking

Bug: webrtc:14856
Change-Id: I56865b86e0992e60376ecefe163ff6b23911edca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291527
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39225}
2023-01-30 12:12:30 +00:00
Sameer Vijaykar
a2653bc236 Export some more symbols for use in chromium tests.
Bug: chromium:1408420
Change-Id: I4d427dfacf79c3dbbbcd9bf969f1af7fee4a2f67
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291522
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39211}
2023-01-27 10:33:19 +00:00
Jim Gustafson
67b9dd5a62 Cleanup merge differences from upstream
Co-authored-by: Rashad Sookram <rashad@signal.org>
2023-01-25 17:17:55 -08:00
Florent Castelli
05ce032486 Remove the //rtc_base target
Bug: webrtc:9838
Change-Id: I17d2a011df20019c517ae92ff25a778070065a5b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291185
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39173}
2023-01-23 14:00:21 +00:00
Mirko Bonadei
62ba379caa Add some RTC_EXPORT needed by Chromium.
These are needed by crrev.com/c/4165083.

Bug: chromium:1369096, webrtc:14131
Change-Id: Id0a46254b46cf866f2f3b7b07b97dc55066c047f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291117
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39165}
2023-01-20 18:29:08 +00:00
Sarah Pham
74f108a671 Add Fuchsia support to memory_usage.
Implement GetProcessResidentSizeBytes for Fuchsia.

Bug: webrtc:14825
Change-Id: I64582ce0da72d3bb0fa61ff64799a1a165e1192f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290922
Commit-Queue: Sarah Pham <smpham@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39154}
2023-01-20 00:06:50 +00:00
Yury Yarashevich
41010f95bb Log resolved & unresolved turn server address as sensitive string.
This should help to debug problems with DNS resolution of turn server
name. E.g. DNS server returns fake IP address to block turn server.

Similar change to stun_port.cc were done in
https://webrtc-review.googlesource.com/c/src/+/215926

Bug: None
Change-Id: If1cc410f4cd0f89620d3678aabf05a0f1b22a393
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290992
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/main@{#39152}
2023-01-19 18:26:50 +00:00
Sarah Pham
f1fa6ac7bf Implement time functions for Fuchsia.
Implement GetProcessCpuTimeNanos and GetThreadCpuTimeNanos for Fuchsia.
This is needed for the tests call_perf_tests and
video_pc_full_stack_tests on Fuchsia.

Bug: fuchsia:115601
Change-Id: Idd10db93d4087d10896ae3fde6abbc37176f625e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290920
Reviewed-by: Christoffer Jansson <jansson@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sarah Pham <smpham@google.com>
Cr-Commit-Position: refs/heads/main@{#39119}
2023-01-16 23:06:21 +00:00
Florent Castelli
a6b9924988 Remove all usage of //rtc_base target
Bug: webrtc:9838
Change-Id: If813dbb426b4dc848185b64c0349d03fa9c059f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290986
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39116}
2023-01-16 14:36:06 +00:00
Evan Shrubsole
d8b6b06e70 [Unwrap] Delete rtc::TimestampWrapAroundHandler
Bug: webrtc:13982
Change-Id: Ia2999e952a55d97dbd69ff19cf12c8f712b1a62f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290882
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39087}
2023-01-12 14:21:03 +00:00
Evan Shrubsole
222c052864 [Unwrap] Delete SequenceNumbersConformanceTest
There is now only one sequence number unwrapper so this is redundant.

Bug: webrtc:13982
Change-Id: I210378e069366eb21dea0051f83d7431e4177057
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290892
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39085}
2023-01-12 13:39:37 +00:00
Evan Shrubsole
4387ad6cdc [Unwrap] Migrate dcsctp sequence numbers to SeqNumUnwrapper
Bug: webrtc:13982
Change-Id: Ic900a967d1b8e96a2b1ec99424674ccb33eb7165
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288940
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39084}
2023-01-12 12:00:30 +00:00
Florent Castelli
a5ba58662f Update visibility on rtc_base:log_sinks target
Some of the new targets are otherwise not visible by external users.

Bug: webrtc:9838
Change-Id: I7b92803692de64e0f93c9ec582c9fe615fda5e65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290844
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39068}
2023-01-11 11:54:09 +00:00
Florent Castelli
143c3b2b4c Update visibility on rtc_base:net_helper target
Some of the new targets are otherwise not visible by external users.

Bug: webrtc:9838
Change-Id: Idc585f45eeeb937802d5a898be57cf3d887fe142
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290730
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39059}
2023-01-10 15:21:34 +00:00
Florent Castelli
353a5ce7e3 Update visibility on rtc_base targets
Some of the new targets are otherwise not visible by external users.

Bug: webrtc:9838
Change-Id: Iba40401b689963615c1a7c528ae59bf66d26316b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290724
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39047}
2023-01-09 19:39:51 +00:00
Florent Castelli
372cf8b824 Prevent rtc_base:log_sinks from being defined in Chromium
This target belongs only to WebRTC and shouldn't be defined there.

Bug: webrtc:9838
Change-Id: Id44573ed4649170820a5a61b68d6077784da8549
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290722
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39041}
2023-01-09 18:23:16 +00:00
Florent Castelli
a138c6c8a5 Split rtc_base into multiple targets
Keeping the headers to allow compatibility with current users
that expect the headers to be in that target before they are
also updated.

Bug: webrtc:9838
Change-Id: I8b1e88850958e92c043686587a37791f01860220
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290569
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39031}
2023-01-09 12:21:25 +00:00
Evan Shrubsole
097fc347ec [Unwrap] Prepare SequenceNumberUnwrapper for migrations
This is in prep for the migration of all unwrappers to
SequenceNumberUnwrapper as a standard implementation.

This moves the SeqNumUnwapper to its own header and adds 2 methods to
SeqNumUnwrapper which are defined by other unwrappers:
* PeekUnwrap
* Reset

It also adds two implementations for RtpTimestamps and
RtpSequenceNumbers.

Bug: webrtc:13982
Change-Id: I5baefb2de1db92fe1bb600760bd63b71e9310eb5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288742
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39030}
2023-01-09 11:42:20 +00:00
Danil Chapovalov
c3c8934219 Use non recursive mutex in rtc::ThreadManager
ThreadManager, i.e. list of all thread is only used for debugging
purpose now, such uses do not enter the loop recursively

Bug: webrtc:11567
Change-Id: I7deb86e0245950c92fe27485285fd119baf6707a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289461
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38986}
2023-01-03 13:28:50 +00:00
Rashad Sookram
a08d327650 Fix logging level 2023-01-02 17:17:14 -05:00
Danil Chapovalov
f4b21da965 Extend DivideRoundToNearest to support negative numbers and use for UnitBase
UnitBase own function to divide with rounding overflows when dividend is close to the max int64_t

Bug: b/262999013
Change-Id: I5b0c3f4408165a0f03690cab80bd098e506fc984
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288521
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38943}
2022-12-22 11:02:29 +00:00
Evan Shrubsole
6f5c314f07 Remove unused SeqNumUnwarpper::UnwrapForward/Backwards
Bug: webrtc:13982
Change-Id: I7cef4f9dd5f0c0dcb9680269005e4a9f04d3e490
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288741
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38939}
2022-12-21 12:07:06 +00:00
Markus Handell
82da9324bc Ensure task queues delete closures in task queue context.
Bug: webrtc:14449
Change-Id: I90d09d35398c1f8817701662f51cbc6a684a2fe0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275773
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38917}
2022-12-19 10:41:03 +00:00
Evan Shrubsole
aa5897dcc5 Add conformance tests for integer unwrapping.
This tests all of the known integer unwrappers in WebRTC
* rtc::TimestampWrapAroundHandler
* webrtc::Unwrapper<T>
* webrtc::SequenceNumberUnwrapper<T>
* dcsctp::UnwrappedSequenceNumber

The conformance tests show differences between in behavior between the
unwrappers.

This change also adds const accessors for the internal values of dcsctp::UnwrappedSequenceNumber.

Bug: webrtc:13982
Change-Id: Ia1b483d7ef5ceb43fa4d93013a76cd0251a58c22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287620
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38900}
2022-12-15 13:22:18 +00:00
Chunbo Hua
46ad25119c Make requested_resolution_alignment of webrtc::EncoderInfo as uint32_t.
At the same time, proper names of some parameters are refactored in SimulcastEncoderAdapter.

Bug: None
Change-Id: Ia036e3f362d1394e90aa26b79953c1ffe75e2fe0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284961
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Chunbo Hua <chunbo.hua@intel.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38870}
2022-12-12 06:02:59 +00:00
Byoungchan Lee
1b80be352b Fix unaligned memory access detected by UBSAN
Recently, Chromium added -fsanitize=alignment for `is_ubsan=true`,
and due to this, unaligned memory access was found in several places,
and chromium roll is currently blocked.
Modify unaligned memory access in rtc_base/byte_order.h to use memcpy.
Since libaom and libsrtp perform unaligned memory accesses, add them
to the suppression list.
Also, remove any mention of yasm from the UBSAN suppression list,
as yasm is no longer used.

Bug: chromium:1057551
Change-Id: I4961b66831750f4fa7b6de0b80b2052fe6ef27c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/286200
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38806}
2022-12-05 09:56:00 +00:00
Emil Lundmark
2d7a3e7ca8 Rename test helper for registering field trial keys
This new name emphasizes that the field trial keys are only allowed
within the current scope. We already have test::ScopedFieldTrials that
can be used to ensure that the global field trials string itself is
isolated.

Bug: webrtc:14705
Change-Id: I8b66bbd9c11d97985292c334d2d3496a047074a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284862
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38796}
2022-12-02 13:21:28 +00:00
Harald Alvestrand
cf7077693c Remove deprecated rtc::StreamInterface functions
This cleans up the last vestiges of the old interface for rtc::StreamInterface
and will cause builds to refer to the old functions to fail.

Bug: webrtc:14632
Change-Id: I569b16677754d7f9e08449e273672a59a86e6498
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283844
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38784}
2022-12-01 08:21:17 +00:00
Mirko Bonadei
d409621f28 Fix SetCurrentThreadName() for Fuchsia.
CL suggested by lingxueluo@.

Bug: b/236891952
Change-Id: I960d5b016186e9784e0af5e86608891a06e78b7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284920
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38723}
2022-11-24 09:56:39 +00:00
Rashad Sookram
4344449a11 Fix compile-time error on Windows 2022-11-22 15:06:13 -05:00
Philipp Hancke
310e0624aa Add Cisco AnyConnect IPSec MAC to VPN detection
and set the underlying type to unknown for mac-based detection.

BUG=webrtc:13097,webrtc:13172
Co-authored by: amir.pirogovsky@microsoft.com

Change-Id: I177214f9eb5c2990faa65262f77b3d0ce9d5eab7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284500
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38709}
2022-11-22 11:55:26 +00:00
Rashad Sookram
4deb88c596 Clean up diff 2022-11-18 15:39:11 -05:00
Diep Bui
3d9b5590c2 Move field trial from BasicNetworkManager to NetworkManagerBase
Bug: webrtc:14306
Change-Id: I9bba38090a77a40f599eaa680da3cf60810b0337
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283801
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38674}
2022-11-18 10:39:04 +00:00
Rashad Sookram
5c49cd217c Fix post-merge errors 2022-11-16 17:17:11 -05:00
Mirko Bonadei
99543ae75f Revert "Remove backwards compatibility functions in openssl"
This reverts commit 4db5b979b7.

Reason for revert: Breaks downstream project

Original change's description:
> Remove backwards compatibility functions in openssl
>
> After changing base functions to a CHECK instead of an =0, these
> are no longer needed.
>
> Bug: webrtc:14632
> Change-Id: If3f1a62905cf433486f4974b2153c9210d1e045b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283542
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38643}

Bug: webrtc:14632
Change-Id: I4c0ec753285fab882f60b059b3d34f772bf5f7e7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283721
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38649}
2022-11-16 14:24:11 +00:00
Harald Alvestrand
4db5b979b7 Remove backwards compatibility functions in openssl
After changing base functions to a CHECK instead of an =0, these
are no longer needed.

Bug: webrtc:14632
Change-Id: If3f1a62905cf433486f4974b2153c9210d1e045b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283542
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38643}
2022-11-16 10:09:33 +00:00
Harald Alvestrand
7ccd88f3e5 Convert SocketStream to use new StreamInterface API
Bug: webrtc:14632
Change-Id: I09a6799a9b70f073dde5b7074e4431570c8c9c67
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283543
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38641}
2022-11-16 09:55:47 +00:00
Harald Alvestrand
3e0658beec Convert FifoBuffer to new StreamInterface API
Bug: webrtc:14632
Change-Id: Id6d17d0402c5e3a0e24258c7afa38ca34e7ab227
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283541
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38640}
2022-11-16 09:53:16 +00:00
Harald Alvestrand
dd4c4068d9 Convert MemoryStream to use new StreamInterface
Bug: webrtc:14632
Change-Id: Id6a7e011a6102e829a14de246d07a9aab1e6934f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283620
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38639}
2022-11-16 09:51:42 +00:00
Rashad Sookram
2e9c66e1b1 Finish resolving merge conflicts 2022-11-11 19:10:59 -05:00
Rashad Sookram
bd151651d3 Merge in M108 2022-11-11 17:02:35 -05:00
Harald Alvestrand
11840ce684 Deprecate void* forms of StreamInterface::Read and ::Write
Updates the code to use the new interfaces

Bug: webrtc:14632
Change-Id: I33b2a25b5968de0251e3cbc84076afc013ecef6e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282680
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38601}
2022-11-10 12:40:20 +00:00
Per Kjellander
0dbee62eb9 Remove unused RateControlSettings::TriggerProbeOnMaxAllocatedBitrateChange
The flag has been default true for a long period of time.(longer than https://webrtc-review.googlesource.com/c/src/+/148581)
Reference to it was removed in https://webrtc-review.googlesource.com/c/src/+/282860

Bug: webrtc:14392
Change-Id: I08aab062acc27d39b41c9d96571ed2ce058f2eec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282862
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38599}
2022-11-10 09:12:08 +00:00
Per Kjellander
3daf696188 Add offset to timestamp from socket
This is to ensure Epoch is the same if transport switch to TCP or another transport.
First packet received will always be timestamped with rtc::TimeMicros.
Other packet timstamps will use the kernel timestamp as an offset from the first packet timestamp.
For BWE, it is important that there is not a large time base diff if transport change.

This change is protected by the experiment WebRTC-SCM-Timestamp.

Bug: webrtc:14066
Change-Id: Iaeb49831e7019e21601bc90895ac56003a54e206
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281000
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38587}
2022-11-09 11:16:33 +00:00
Per Kjellander
fdcfefa708 Add experiment to use ::recvmsg to receive packets on posix systems
Using ::recvmsg ensure packet timestamp can then be read directly when reading the buffer
instead of a separate system call and should also work on Ios/Mac.

The same experiment field trial flag will be "WebRTC-SCM-Timestamp/enabled/" and is also planned to be used for fixing webrtc:14066

Bug: webrtc:5773, webrtc:14066
Change-Id: I8a3749e87c686aa18fcee947472c1b602a0f63c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279280
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38585}
2022-11-08 12:51:49 +00:00
Harald Alvestrand
1f609c8582 Add aliases for StreamInterface::Read/Write using ArrayView
A few usages in ssl_stream_adapter_unittests are converted to make
sure the aliases are usable.

Next steps are:
- Change all usages inside WebRTC to the new form
- Deprecate the old API
- Remove the old API

Pipewire failures believed to be unrelated, so No-try.

No-try: true
Bug: webrtc:14632
Change-Id: I618551e61a05d53e524e97483d3c7cef59b88a25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282221
Reviewed-by: Tomas Gunnarsson <tommi@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38577}
2022-11-08 09:16:05 +00:00
Danil Chapovalov
f6e48bf4d1 Add IWYU pragmas for some api headers
Bug: None
Change-Id: I1912e05dbc31d960f36c97151dcb387446535c71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280965
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38510}
2022-10-31 15:43:16 +00:00
Björn Terelius
4fdf8cc67b Suppress -Wdeprecated-volatile in rtc_base/system_time.cc
Bug: webrtc:14601
Change-Id: Ifb6e0cb372231920108142b5efc076039943581b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280442
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38471}
2022-10-25 17:38:01 +00:00
Joachim Reiersen
e457e43836 Fix bug where RTCTransportStats.dtlsCipher was missing when using OpenSSL
A bug in the id being searched for inside OpenSSLStreamAdapter::SslCipherSuiteToName prevented the lookup from ever succeeding.

This resulted in this stat being unavailable when calling PeerConnection::GetStats(). To fix the problem, look for (0x03000000L | cipher_suite) which matches what the BoringSSL codepath is doing.

Bug: webrtc:14596
Change-Id: Ic36d77dbc4c2378fbde1e2f21a9f5bd735b36741
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280100
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38460}
2022-10-24 20:51:33 +00:00
Tommi
2fc37573b9 Add DISALLOW_WAIT(), a regression catching utility.
Bug: none
Change-Id: I94def80a7eb815f74d1be691d21b5f3661771a71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279821
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38457}
2022-10-24 11:10:26 +00:00
Emil Lundmark
6bf20cc76a Verify field trials looked up through field_trial::FindFullName
For now, the run-time check will only be enabled if the
rtc_strict_field_trials GN arg is set.

In order to allow testing with imaginary field trial keys, two test
helpers have been added. It's a bit awkward to test these since the
field trial string is already global, hence the helpers are also
modifying global state. Tests must make sure this global state is reset
between runs. Things won't be an issue anymore when [1] has removed the
global string.

[1] https://crbug.com/webrtc/10335

Bug: webrtc:14154
Change-Id: Ida44cc817079d7177325e2228cf1f1d242b799e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276269
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38447}
2022-10-20 10:46:01 +00:00
Mirko Bonadei
5c9b7da038 Add missing dependencies.
Bug: b/251890128
Change-Id: Ia9312797a5552ad1ceb4a80968014b849121a1b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278580
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38333}
2022-10-10 10:18:37 +00:00
Mirko Bonadei
9d9c2d5795 Make header files self contained.
This CL adds #includes to header files in order to make them
self contained after the preprocessor pass.

Bug: b/251890128
Change-Id: I81c3ba38fb8ab8a2bbd151ba99aa871fae9f1b1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278422
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38327}
2022-10-08 08:38:36 +00:00
Jonas Oreland
3c775ece73 Rewrite "Reset all maps in AndroidNetworkMonitor Start()/Stop()"
This reverts commit 8cd7b0a7ba.

The assumption in AndroidNetworkMonitor that an interface name
is unique has turned out to be incorrect :( for some (weird) devices,
i.e ccmni0.
It is unclear if it is a permanent setup or a transient state.

This cl/ changes the impl. to cope with that, the last
OnNetworkConnected_n "owns" the interface name, and when
OnNetworkDisconnected_n runs, we check if we're "owner"
and maybe set a new "owner" (if we're not "owner" we do nothing).

New testcases added.

I also
1) change NetworkMonitorInterface to return a struct
with all the information that is requested with interface name
as key.
2) Change Network.cc adding (debug) assertions that network
properties can't change inside a loop (in one thread).

Original change's description:
> Revert "Reset all maps in AndroidNetworkMonitor Start()/Stop()"
>
> This reverts commit 02293096f9.
>
> Reason for revert: mysterious crashes in android_network_monitor.cc
>
> Original change's description:
> > Reset all maps in AndroidNetworkMonitor Start()/Stop()
> >
> > This cl/ fixes another race condition with the recent additions
> > to NetworkMonitorAutoDetect (getAllNetworksFromCache).
> >
> > The getAllNetworksFromCache-feature uses the by the Android team
> > preferred way of enumerating networks, i.e to register network listeners.
> >
> > Th recent fix to add IsAdapterAvailable, https://webrtc-review.googlesource.com/c/src/+/257400
> > contained a bug in that the adapter_type_by_name_ map was not
> > reset either on disconnect or Start/Stop.
> >
> > This cl/ addresses that including unit test.
> > It also de-obfuscates NetworkMonitor so that it always
> > calls NotifyOfActiveNetworkList on startMonitoring even
> > if list.size() == 0. This should not matter but makes
> > code easier to understand.
> >
> > Bug: webrtc:13741
> > Change-Id: I438b877eebf769a8b2e7292b697ef1c0a349b24f
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258721
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#36530}
>
> Bug: webrtc:13741
> Change-Id: I36fbf63f658d3e8048e13959cbebfbd14df12b14
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264146
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37016}

Bug: webrtc:13741
Change-Id: Ib4eb072b775e493b564528f0be94c685b70ec20f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264421
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37056}
2022-10-04 15:25:49 -07:00
Mirko Bonadei
0e3151e181 Fix comparator bugs which are not compliant to strict weak ordering.
See a full explanation of the problem on this blog [1] post about changing
std::sort in LLVM and relative issues uncovered.

The CompareNetwork function was violating the 4th rule of "strict weak
ordering" (Transitivity of incomparability: x == y and y == z imply x == z, where x == y means x < y and y < x are both false).

[1] - https://danlark.org/2022/04/20/changing-stdsort-at-googles-scale-and-beyond/

Bug: None
Change-Id: I7e893f0a30da31403766284823f75c45c4db91c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251681
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36711}
2022-10-04 15:25:49 -07:00
Niels Möller
270d3b5181 Reland "Delete deprecated versions of MergeNetworkList"
This is a reland of commit 7679e9bf07

Breakage in chrome/services/sharing/ (not built as part of webrtc
presubmit) should be fixed with
https://chromium-review.googlesource.com/c/chromium/src/+/3604642

Original change's description:
> Delete deprecated versions of MergeNetworkList
>
> Bug: webrtc:13869
> Change-Id: I6b888ba14ca664a1f28de2fb59b7d1343cb18bd8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259300
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36611}

Bug: webrtc:13869
Change-Id: I4cf0fe0f2310eabb2d0b32c6dec5f8aef64c7712
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259869
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36704}
2022-10-04 15:25:49 -07:00
Ilya Nikolaevskiy
e4577d9f57 Revert "Delete deprecated versions of MergeNetworkList"
This reverts commit 7679e9bf07.

Reason for revert: Breaks chromium roll (see https://ci.chromium.org/ui/p/chromium/builders/try/linux-chromeos-compile-dbg/998457/overview)

Original change's description:
> Delete deprecated versions of MergeNetworkList
>
> Bug: webrtc:13869
> Change-Id: I6b888ba14ca664a1f28de2fb59b7d1343cb18bd8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259300
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36611}

Bug: webrtc:13869
Change-Id: I781ac1980687367ee17d033f6613c2e487b7966f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259775
Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36621}
2022-10-04 15:25:49 -07:00
Niels Möller
3b256bf720 Delete deprecated versions of MergeNetworkList
Bug: webrtc:13869
Change-Id: I6b888ba14ca664a1f28de2fb59b7d1343cb18bd8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259300
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36611}
2022-10-04 15:25:49 -07:00