Commit graph

1820 commits

Author SHA1 Message Date
Jeremy Leconte
1bd331f102 Ensure <netinet/in.h> is included by using rtc_base/ip_address.h.
Change-Id: I1b48275ef458bcd579d027b879240c702975ab56
Bug: b/236227627
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362280
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#43001}
2024-09-11 08:11:44 +00:00
Jeremy Leconte
83d1f9abd0 Ensure <sys/socket.h> is included by using "rtc_base/net_helpers.h".
* IWYU export <sys/socket.h> from rtc_base/net_helpers.h.
* Add a presubmit check to ensures that <sys/socket.h> is included through net_helpers.h (expect if there is a IWYU pragma or a no-presubmit-check).
* Clean up existing includes of <sys/socket.h>

Change-Id: I4bc6cce045c046287f8f74f89edfc9321293b274
Bug: b/236227627
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362082
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42996}
2024-09-10 14:23:24 +00:00
Markus Handell
5162dc3370 Reland "TaskQueueStdlib: Stop spamming on idle."
This reverts commit 9463095df8.

Reason for revert: Problem fixed.

Original change's description:
> Revert "TaskQueueStdlib: Stop spamming on idle."
>
> This reverts commit 2fbaa8e3a3.
>
> Reason for revert: Breaks tests
>
> Original change's description:
> > TaskQueueStdlib: Stop spamming on idle.
> >
> > When the stdlib task queue has no work for >= 3s on
> > Android, it will emit bogus deadlock warnings. Fix
> > this by ensuring we're not triggering this behavior.
> >
> > Fixed: b/364436627
> > Change-Id: I3fe02e13993cbb4a59d5669df06c4c293d237bc4
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361721
> > Commit-Queue: Markus Handell <handellm@webrtc.org>
> > Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#42955}
>
> Change-Id: Ie80d86f6aa0cdff3bc5ee1d79fa4c8144009e33f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361741
> Auto-Submit: Markus Handell <handellm@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#42960}

Fixed: b/364436627
Change-Id: I7baa8c5c169e5c63b28e1a5363c06e3d8d3f4c7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361742
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Markus Handell <handellm@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42963}
2024-09-05 13:18:08 +00:00
Markus Handell
9463095df8 Revert "TaskQueueStdlib: Stop spamming on idle."
This reverts commit 2fbaa8e3a3.

Reason for revert: Breaks tests

Original change's description:
> TaskQueueStdlib: Stop spamming on idle.
>
> When the stdlib task queue has no work for >= 3s on
> Android, it will emit bogus deadlock warnings. Fix
> this by ensuring we're not triggering this behavior.
>
> Fixed: b/364436627
> Change-Id: I3fe02e13993cbb4a59d5669df06c4c293d237bc4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361721
> Commit-Queue: Markus Handell <handellm@webrtc.org>
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42955}

Change-Id: Ie80d86f6aa0cdff3bc5ee1d79fa4c8144009e33f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361741
Auto-Submit: Markus Handell <handellm@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#42960}
2024-09-05 11:31:52 +00:00
Markus Handell
2fbaa8e3a3 TaskQueueStdlib: Stop spamming on idle.
When the stdlib task queue has no work for >= 3s on
Android, it will emit bogus deadlock warnings. Fix
this by ensuring we're not triggering this behavior.

Fixed: b/364436627
Change-Id: I3fe02e13993cbb4a59d5669df06c4c293d237bc4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361721
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42955}
2024-09-05 07:22:36 +00:00
Philipp Hancke
8480808c2f ssl: remove SSL_set_read_ahead for DTLS mode
since it has no impact for DTLS:
  https://docs.openssl.org/1.1.1/man3/SSL_CTX_set_read_ahead/

BUG=webrtc:353750117

Change-Id: I09d135aa69471af9d2feaf82e35625da3ae2e247
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361220
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: David Benjamin <davidben@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42950}
2024-09-04 23:25:15 +00:00
Philipp Hancke
86251a072a rewrite SSLInfoCallback logging
BUG=webrtc:339300437

Change-Id: I105dedb1bb2e5a8e6a15fc49355e18448b5cdeb8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360522
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42915}
2024-09-02 17:17:20 +00:00
Florent Castelli
8037fc6ffa Migrate absl::optional to std::optional
Bug: webrtc:342905193
No-Try: True
Change-Id: Icc968be43b8830038ea9a1f5f604307220457807
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361021
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42911}
2024-09-02 12:16:47 +00:00
Andrew Grieve
6ea1c96325 Fix license metadata for spl_sqrt_floor, portaudio, sigslot
Bug: b/361140175
Change-Id: I35e76039608fa5094c04ace5f3ad1dba868ccb85
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360900
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Andrew Grieve <agrieve@google.com>
Cr-Commit-Position: refs/heads/main@{#42885}
2024-08-29 19:11:29 +00:00
Philipp Hancke
06a49f02bd build: add options to configure libsrtp for boringssl or other libraries
Depends on
  https://webrtc-review.googlesource.com/c/src/+/359928

BUG=webrtc:42234521,webrtc:42224104

Change-Id: I0d6335aa5fb3f090c781bed234ed34d6c98ec299
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359928
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42857}
2024-08-27 07:17:52 +00:00
Ho Cheung
5b47a7a149 [rtc] Adjust the sequence of rtc::Network definition
rtc::Network must be defined before classes that
use it as an instance variable.

Bug: webrtc:360158397
Change-Id: I5ca0acbc70cb5c27318d0ad01081b10b0b4dbff5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360440
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Ho Cheung <hocheung@chromium.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42843}
2024-08-26 07:04:16 +00:00
Philipp Hancke
cfd83744d9 Misc OpenSSL fixes
improving the error message from PEM parsing and adding a few DCHECKs
Tested locally with OpenSSL 3.x

BUG=webrtc:42225468

Change-Id: Ia2ff1e5826f486060db73bee979e2703fc6c5823
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358441
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: David Benjamin <davidben@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42776}
2024-08-14 07:11:57 +00:00
Philipp Hancke
b16d828895 TLS: update SSLStreamAdapter and SSLIdentity tests to various hashes for certificates
since OpenSSL 3.x deprecated SHA1 there and SHA256 has been the default
in Chrome for a decade. Test all variants with a reduced test suite.

BUG=webrtc:42225468

Change-Id: I728bfd953c3248d6a7804c55ab71009fcc701a45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358820
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42765}
2024-08-12 17:05:49 +00:00
Florent Castelli
06163404a5 openssl: Do not require the rtc_ssl_root variable
If the includes are in /usr/include, adding this path to the include path
may break resolution of internal compiler headers.
If the variable is required, I would expect users to already have it set
properly.

Bug: None
Change-Id: I1d86776da4ae516aba99c58ecee1135dcd27aec8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359240
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42763}
2024-08-12 14:49:49 +00:00
Florent Castelli
ccec7e2042 Fix OpenSSL builds
BoringSSL includes cannot be included in an OpenSSL build.
Links the SSL related target against the crypto and ssl libs
the proper way.

Bug: None
Change-Id: I4252e6207815d7d7e35bb8d4d966e3d1b83e659d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358941
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42754}
2024-08-09 14:58:10 +00:00
Philipp Hancke
486aa857b5 Add SHA224 and SHA256 HMAC tests to message digest
SHA384 and SHA512 are not yet tested since our (custom)
HMAC code does not support those algorithms and rejects a block size.
Note that this is only used for computing TURN MD5 and STUN SHA1 HMACs

BUG=None

Change-Id: Idabc651d988a5e5f3abd1fad0f36726bcc7a69a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358780
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42753}
2024-08-09 14:44:45 +00:00
Harald Alvestrand
53c424eba7 Apply include-cleaner to the SSL files
Bug: webrtc:42226242
Change-Id: I04acc5aa4c76af4e900d7a7b50129cee9c9c3137
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358180
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42723}
2024-08-03 08:47:17 +00:00
Harald Alvestrand
4849eb8a3f Fix OpenSSL build
Bug: None
Change-Id: I0577e0b32dc738da567e1d7a8b3e265a7c2bba89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358401
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42721}
2024-08-02 16:22:39 +00:00
Philipp Hancke
b2ce406053 Fix unit test build with OpenSSL and fix gn check failure
follow-up to
  https://webrtc-review.googlesource.com/c/src/+/358300
which links the unit tests against OpenSSL when building with that by using
  rtc_build_ssl = false
  rtc_ssl_root = "/usr/include/openssl"
as gn args which showed an additional gn check failure

BUG=None

Change-Id: Id3356f3e211509141f2a05f096f19a7b1b8eee9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358340
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42720}
2024-08-02 12:16:53 +00:00
Harald Alvestrand
7079843bc8 Fix some gratuitous compile failures under OpenSSL
To test:
- ensure openssl files live in /usr/include/openssl
- make a config with the following values:
```
   rtc_build_ssl = false
   rtc_ssl_root = "/usr/include/openssl
```
- compile rtc_unittests

There will be link errors, but no compile errors.

Bug: None
Change-Id: I3d28b1613e11a716b11c7def808100ef58ab75f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358300
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42714}
2024-08-01 17:27:09 +00:00
Philipp Hancke
5d6fa7d2fc Split SSLAdapter/SSLStreamAdapter and deprecate SSL(Stream)Adapter::SetMode
since we do not need two adapters with TLS and DTLS modes.
SSLAdapter is the TLS adapter,
SSLStreamAdapter is the DTLS adapter.

BUG=webrtc:353750117

Change-Id: I223917c71c88437339380e1f196dcf3c0e2021c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354940
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42713}
2024-08-01 17:00:02 +00:00
Philipp Hancke
b5ff55adee Reland "Enable TLS Client Hello extension permutation by default"
This is a reland of commit e13945bf07
with additional backward compability defaulting to the new value.

Original change's description:
> Enable TLS Client Hello extension permutation by default
>
> similar to the previous change for DTLS. This affects native TURN/TLS
> connections which are already using this in Chromium.
>
> BUG=webrtc:422225803
>
> Change-Id: I605f106371f2dbe23b1ad5f8385e0e01abe7c48f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357903
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42688}

Bug: webrtc:422225803
Change-Id: Ic194e4f763029e65c1a15a6bbaabcfbcd2866eac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358120
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42702}
2024-07-31 06:01:22 +00:00
Mirko Bonadei
dfa7b2b425 Revert "Enable TLS Client Hello extension permutation by default"
This reverts commit e13945bf07.

Reason for revert: Breaks downstream project

Original change's description:
> Enable TLS Client Hello extension permutation by default
>
> similar to the previous change for DTLS. This affects native TURN/TLS
> connections which are already using this in Chromium.
>
> BUG=webrtc:422225803
>
> Change-Id: I605f106371f2dbe23b1ad5f8385e0e01abe7c48f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357903
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42688}

Bug: webrtc:422225803
Change-Id: I8020e420e270c0f47cb8e26a210c801e94f8de7d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357883
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42689}
2024-07-30 07:56:29 +00:00
Philipp Hancke
e13945bf07 Enable TLS Client Hello extension permutation by default
similar to the previous change for DTLS. This affects native TURN/TLS
connections which are already using this in Chromium.

BUG=webrtc:422225803

Change-Id: I605f106371f2dbe23b1ad5f8385e0e01abe7c48f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357903
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42688}
2024-07-30 06:01:19 +00:00
Philipp Hancke
76430c0bf1 TLS: enable TLS client hello permutation by default
this is flipping
  WebRTC-PermuteTlsClientHello
to a killswitch in the SSLStreamAdapter used for DTLS.

BUG=webrtc:42225803

Change-Id: I942851c474ec5e723c5b6c9f6206e7eafbe80ea4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357901
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42676}
2024-07-26 17:19:40 +00:00
Philipp Hancke
7b61b84ab1 Cleanup SSLStreamAdapter unit tests
BUG=None

Change-Id: I71fa442f6f9b95bad63a3d7d797433d95bf5c298
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354780
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42663}
2024-07-22 17:21:33 +00:00
Danil Chapovalov
cd8b36bb9f Fix integer underflow in H264 bitstream parser
num_ref are represented using golomb and may be very large.
BitstreamReader is generally resilent to many consenquites fail reads, but not when number of reads comparable to int limit.
This change address the issue in two ways, either one is enough, but both are helpful in their own way:

H264 parser now fails faster when number of references is too large.
BitstreamReader now is resilent to unlimited number of fail reads.

Bug: chromium:352402499
Change-Id: I19646bc3f53cd2970393d00bc143400b1fdf5473
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357100
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42628}
2024-07-12 15:01:55 +00:00
Tommi
187a4363c0 Remove more sstream deps
Bug: webrtc:8982
Change-Id: I7e1e2a8515b84567d6fe8127ff0e2806a2a4714a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356400
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42610}
2024-07-09 10:30:26 +00:00
Philipp Hancke
db519e75b7 Reland "Clean up SRTP helper functions"
This is a reland of commit c47f649e67

Original change's description:
> Clean up SRTP helper functions
>
> BUG=None
>
> Change-Id: If1df1828a09aef2e335c028cf4425c9507906aac
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354649
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Cr-Commit-Position: refs/heads/main@{#42525}

Bug: None
Change-Id: Ib98842407b1c15b4e4b72a3ce2f0833f07f60da6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355540
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42603}
2024-07-08 15:33:47 +00:00
Tommi
55c3600781 Remove <ostream> dependencies
Some dependencies still exist but are a bit more complex to remove.
This CL removes either unused or easily replaced with ToString()
instances of ostream usage. In one case, moving the operator<<
implementation to the one test file that requires it.

Bug: webrtc:8982
Change-Id: Ia5c840b12a42893494af401317a3daf2fe50ba9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356240
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42582}
2024-07-03 12:27:55 +00:00
Tommi
f101f3f803 Remove sstream code from socket_address
Bug: webrtc:8982
Change-Id: I85f1678aa02a51ddad083fb299577cfa5d364df8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355905
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42570}
2024-07-02 11:36:00 +00:00
Tony Herre
93788b68c6 Make platform_thread.cc build under emscripten without pthread support
Otherwise targets which don't need threads but transitively include this
fail to build due to missing thread priority symbols as described in the
bug.

Bug: webrtc:349961287
Change-Id: I33098a150387b8d20ab9344f49d7c7cb19be2db4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355901
Auto-Submit: Tony Herre <herre@google.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42563}
2024-06-29 16:12:11 +00:00
Olov Brändström
c2c6442ad5 Add RTC_EXPORT to TimeUTCMicros (2nd try)
In https://webrtc-review.googlesource.com/c/src/+/355181 I supposed to add RTC_EXPORT to the TimeUTCMicros function. However in the code I added it to TimeUTCMillis(). I hadn't realized there where two similar functions, so I did a poor error check.

I think it make sense to have RTC_EXPORT on both of them, since they are similar. So I opted to not revert the change in the previous faulty CL.

Bug: chromium:333359951
Change-Id: Icb3d3adeebd4fbf56244986a9e801bee84ff04df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355760
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42546}
2024-06-26 16:53:17 +00:00
Philipp Hancke
3fede875fe Remove rtc_base/helpers.h and crypto_random include in port allocator
after fixing Chromium (and possibly other downstream projects)

BUG=webrtc:339300437

Change-Id: I1637b379ce778e78b4fb73cb44b291c2f66c3606
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353766
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42533}
2024-06-25 16:10:15 +00:00
Olov Brändström
27abd690cc Add RTC_EXPORT to TimeUTCMicros
A requirement for https://chromium-review.git.corp.google.com/c/chromium/src/+/5314759.

Bug: chromium:333359951
Change-Id: I010ecbc0966a5d9d17b0869ed8eb2c2f48e6cd86
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355181
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42532}
2024-06-25 14:55:14 +00:00
Björn Terelius
e71fa4e8b9 Revert "Clean up SRTP helper functions"
This reverts commit c47f649e67.

Reason for revert: Breaks downstream build

Original change's description:
> Clean up SRTP helper functions
>
> BUG=None
>
> Change-Id: If1df1828a09aef2e335c028cf4425c9507906aac
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354649
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Cr-Commit-Position: refs/heads/main@{#42525}

Bug: None
Change-Id: Iff893decb2be00545b623b72383240926cb0d553
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355481
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42529}
2024-06-25 09:58:52 +00:00
Philipp Hancke
c47f649e67 Clean up SRTP helper functions
BUG=None

Change-Id: If1df1828a09aef2e335c028cf4425c9507906aac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354649
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42525}
2024-06-24 15:34:11 +00:00
Danil Chapovalov
3a45801d34 Make Unit types factories from float numbers be constexpr
std::isnan is not constexpr until c++23 and thus prevents constexpr construction from float numbers of unit types like DataRate
That check is not needed because is redundant with later check that value is convertable to int64_t

Bug: None
Change-Id: Ie8a06287492eb2122edf23fed63f1cd1bcd9df3d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355220
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42520}
2024-06-21 13:40:17 +00:00
Dor Hen
aefed55c25 [iwyu][1\n] Applying to api/[a-s]*
First batch of applying iwyu to the repo.
Done with:
> ./tools_webrtc/iwyu/apply-iwyu api
> git add api/[a-s]*
> python3 gn_autodeps.py ~/local/webrtc/src out/Default

Last step is a custom script I wrote to automatically apply new required
dependencies for target in gn, which saved tons of time manually going
over the files and fixing.
If this is something that interest others, I can submit it as well.

Bug: webrtc:42226242
Change-Id: Id109e77f50835827495bc4512880c4ec9ae175f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343680
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Cr-Commit-Position: refs/heads/main@{#42512}
2024-06-19 06:19:20 +00:00
Björn Terelius
72302cc5e4 Include-what-you-use rtc_base/numerics/
Bug: webrtc:42226242
Change-Id: Ib59078d67af20fa44d79d1a9338b1a3ca6e4c6d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354463
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42492}
2024-06-16 15:35:40 +00:00
Philipp Hancke
ed1801492d Remove more (D)TLS1.0 legacy code
keeping around the DTLS 1.0 constant for unit tests.

BUG=webrtc:40644300

Change-Id: I6d0c3ba1f434bbf3ef1a1b812aeef26943dcf646
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352530
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42471}
2024-06-12 19:57:31 +00:00
Harald Alvestrand
c74412b304 Deprecate rtc::RefCountInterface
and move usages to webrtc::RefCountInterface

This CL also moves more stuff to webrtc:: and adds backwards
compatible aliases for them.

Bug: webrtc:42225969
Change-Id: Iefb8542cff793bd8aa46bef8f2f3c66a1e979d07
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353720
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42446}
2024-06-07 09:47:26 +00:00
Philipp Hancke
4158678b46 Split "helpers" from SSL target to "crypto_random" and rename
since it contains helpers mostly related to cryptographically secure random numbers and strings.

BUG=webrtc:339300437

Change-Id: I10db939534b25dc792ac1600a4721d1b84521880
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42441}
2024-06-07 06:41:51 +00:00
Philipp Hancke
71ad98b2ab Split SSL adapters from main ssl build target 2/2
after Chromium (and internal) updates.

BUG=webrtc:339300437

Change-Id: I0457cacb0bb30b0d157e4c15b9c53a3914d59133
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351380
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42388}
2024-05-27 17:44:56 +00:00
Philipp Hancke
7b087121b5 Move moving average helper out of ssl target
to the only place where it is used.

BUG=webrtc:339300437

Change-Id: I0d4124b95d19a11578efaf7e8e0a1ff1d39eb59b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351581
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42383}
2024-05-27 12:50:06 +00:00
Florent Castelli
99c519b3fd Mass removal of absl_deps in all BUILD.gn files
Bug: webrtc:341803749
Change-Id: Id73844ba8d63b9f2f2c9391d8d8116ad0864c36d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351540
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42372}
2024-05-23 15:09:46 +00:00
Philipp Hancke
c7fd5afd45 Split SSL adapters from main ssl build target 1/2
with an intermediate step since Chromium depends on the openssl_stream_adapter.h which will move to the new target.

BUG=webrtc:339300437

Change-Id: Iea163e0a6e3923ce8a741a2e11e9a2a1e3f3e7a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350887
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42362}
2024-05-21 19:11:53 +00:00
Danil Chapovalov
b57178b836 Query WebRTC-KeyframeInterval through propagated field trials
Bug: webrtc:42220378
Change-Id: I3556ec6b280bf6c03e6c3a20949a19e182eed2b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349640
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42349}
2024-05-20 13:37:24 +00:00
Danil Chapovalov
f317f7106a Remove option to parse RateControlSettings from the global field trial string
Bug: webrtc:42220378
Change-Id: Iff016f0f53f427ff59df816d8d87dc4a8119db65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350921
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42348}
2024-05-20 10:38:14 +00:00
Philipp Hancke
5ef183eee8 Reland "Split digest methods from ssl target into digest target" 2/2
This is a reland of commit 47bfe39ecf
which actually moves the digest out of the ssl target after creating
intermediate targets

BUG=webrtc:339300437

Change-Id: I172e962b25db0b9cce07ead683bd0a5b1d83442a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350861
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42336}
2024-05-17 07:19:15 +00:00