1887 Commits

Author SHA1 Message Date
Philipp Hancke
4e8c984d15 Obfuscate private keys in unit tests to avoid false lint errors
This was already done in one place but got caught by our linter
nonetheless. For better obfuscation split "PRIVATE" into two pieces.

BUG=None

No-Iwyu: mostly unrelated changes and some require special attention
Change-Id: Iba82b603fd5c5a50c75fc7e27cafbc7237e956f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375063
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@{#43798}
2025-01-24 10:19:00 -08:00
Evan Shrubsole
0bebca526a Remove gunit.h EXPECT/ASSERT..WAIT macros
Bug: webrtc:381524905
Change-Id: I01dff16f7ec26fa4075a9ef659dee3f0844db041
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374881
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43785}
2025-01-22 00:33:15 -08:00
Harald Alvestrand
32f3c6cef1 Add AbslStringify for RtcErrorType and RtcErrorDetail
Drive-by: fix MakeVal in rtc_base/checks.h to ensure that StrCat is
used for types that have AbslStringify.

Bug: None
Change-Id: Ia78c65da18b4a826365a6a2c741f11809640197f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374345
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43779}
2025-01-21 07:10:50 -08:00
Philipp Hancke
9165a9b436 Disable OpenSSL tests needing a fake clock when boringssl is not used
since OpenSSL lacks that feature so broke as a result of
https://chromiumdash.appspot.com/commit/130bdcea7e69368cae66e10a99c5e86dc4e5770a

BUG=webrtc:375552698

Change-Id: I55da67a7dcf5815f7190bd43847a9ad6f7c1b93d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374600
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43767}
2025-01-19 22:33:02 -08:00
Evan Shrubsole
d9593037dd Replace gunit.h macros with WaitUntil in rtc_base/
Bug: webrtc:381524905
Change-Id: I7a78269586ee3556c0b3de63f5add393f12f4fa1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374223
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43757}
2025-01-17 06:44:49 -08:00
Boris Tsirkin
5654f891bb Format /rtc_base folder
Formatting done via:

git ls-files | grep -E '^rtc_base\/.*\.(h|cc|mm)' | xargs clang-format -i

No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: I11c1ae6d6ea49c744a4e60a1a032e3d5ae7bce1f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373906
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43688}
2025-01-08 11:20:49 -08:00
Philipp Hancke
3905b25018 clean up WebRTC-DisableTlsSessionTicketKillswitch
which shipped in M131.

BUG=webrtc:367181089

Change-Id: I967bafbab99bf211b0e6a4454f6598fd52493b26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370080
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43674}
2025-01-08 01:00:56 -08:00
Jonas Oreland
6660e43c30 Forward fix bug in https://webrtc-review.googlesource.com/c/src/+/372201
This patch fixes a scenario in which the ssl_ object was freed.

BUG=webrtc:383141571

Change-Id: I413b028473aff9c3078f9bbab8e1fee718623417
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372340
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43621}
2024-12-20 06:42:27 -08:00
Jonas Oreland
12574a315f DTLS 1.3 - patch 4
This patchs adds a field trial for enabling DTLS1.3, WebRTC-ForceDtls13
- "Enabled" set max version to DTLS1.3
- "Only" set min & max version to DTLS1.3

Wireup a FieldTrialsView so that this does not
use the global string.

Also convert the WebRTC-DisableTlsSessionTicketKillswitch
from global string to FieldTrialsView.

BUG=webrtc:383141571

Change-Id: Ia775efc1dcbffd01bfddb6030490438cb8de89d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372261
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43616}
2024-12-19 07:37:19 -08:00
Jonas Oreland
35f73ddca4 DTLS 1.3 - patch 3
Modify openssl_stream_adapter to check/set
timer regardless of dtls state. This is needed for DTLS1.3
orelse handshake will never complete if last client
packet is lost (e.g if retransmit is not triggered after
writable) as show by TestHandshakeLoseSecondClientPacket.

TestHandshakeLoseSecondClientPacket works with/without this
patch if using DTLS1.2.

BUG=webrtc:383141571

Change-Id: I2757783c9e79686d1fbe0eff12341ab9e3863fdd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/372201
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43610}
2024-12-19 03:36:52 -08:00
Jonas Oreland
ac40185001 DTLS 1.3 - patch 2
- add DTLS1.3 ciphers (without KeyType)
- remove code in dtls_transport.cc that tries to parse DTLS packet
- cleanup some test
- start on test for packet loss during dtls handshake (more to come!)

After this patch is submitted, it is possible
to set max version = dtls1.3 and it will active
but DON'T do it yet.

BUG=webrtc:383141571

Change-Id: I6f9a120c53415ccee7a560ea83bd0c2636702997
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371300
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43595}
2024-12-18 02:26:22 -08:00
Evan Shrubsole
108cde271b Replace use of PrintTo with AbslStringify for RTC stat types
This allows other tests using RTC stats to get pretty printing as well.

Bug: webrtc:381524905
Change-Id: Ib1eb9e1dad36b89e5b1c2ec687fcfeb308f82939
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370761
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43575}
2024-12-16 04:51:37 -08:00
Markus Handell
74ace1a6e3 Remove libevent task queue.
Previous CLs that disabled the rtc_enable_libevent build flag
did not reveal issues. Now continue to remove the source code for
the task queue.

Bug: webrtc:42224654
Change-Id: I0866b4b56f0a8d8b56a5b604c31a426d77ab8d04
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370801
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43550}
2024-12-12 08:43:25 -08:00
Jonas Oreland
dcf0ffa639 dtls-1.3
Add SSLProtocolVersion for TLS13 and DTLS13
Allow setting max version to 13 (for BoringSSL)
Don't change any defaults.
This is a NOP.

BUG=webrtc:383141571

Change-Id: I11303c14e8d79c09d9437d44e44003c67d2fc31b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370900
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43530}
2024-12-10 18:45:36 +00:00
Harald Alvestrand
07d7ca0352 Mark sigslot version as N/A
and include explanation of source access.

Bug: chromium:362397798
Change-Id: I7af673ffe060507b0e9dea95d650ffb0a681727c
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370120
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43484}
2024-12-03 12:17:02 +00:00
Evan Shrubsole
23438deabb Allow enums that have AbslStringify to be logged as text
When an enum has AbslStringify, we log the text coming from stringifying it, not the numeric value.


Drive by changes,
1. Changed the tests to use string matchers rather than
   std::string::find.
2. Fixed test includes.
3. Fix spelling.

Bug: webrtc:381502973
Change-Id: I6bab0afda1b20d72c02629e80ff2ac567650183a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369861
Auto-Submit: Evan Shrubsole <eshr@google.com>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43471}
2024-11-29 11:49:50 +00:00
Philipp Hancke
c75fbe24e6 Clean up legacy variant of DTLS-SRTP key exporter
BUG=webrtc:357776213

Change-Id: Id383c3a2a8627e3d0aceb80da30db14ea689ac93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368181
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43467}
2024-11-28 19:03:50 +00:00
Florent Castelli
1bda6a6a58 Make SSLStreamAdapter::SetPeerCertificateDigest use of const uint8_t
This allows it to accept rtc::CopyOnWriteBuffer.

Bug: webrtc:357776213
Change-Id: I8c9eeb5577e8de902db144aff5ad8eee87e5a530
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369640
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43464}
2024-11-27 15:44:38 +00:00
Philipp Hancke
4060745995 spanify SSLStreamAdapter::SetPeerCertificateDigest
BUG=webrtc:357776213

Change-Id: Ie6189ac21b9f76f7ce5ddb3e4208c08793df73ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368220
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43462}
2024-11-27 06:13:28 +00:00
Per Kjellander
f4ee1a1ef3 Make PercentileFilter usable with DataRate and other types
Return default value T() if no values have been added to the filter.
Together with
https://webrtc-review.googlesource.com/c/src/+/369440, DataRate etc can be used by the filter.

Bug: None
Change-Id: I3d0e1a3e698a91a6197bf434ace2ff8246dc393e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369420
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43461}
2024-11-26 19:52:25 +00:00
Danil Chapovalov
e0a524b5e0 Add default constructor to relative units types
0 is natural default value for types that can be accumulated
Having default constructor simplify usage of these types in templated code.

Bug: None
Change-Id: If005c69018a2a11011bc789502fdbc600cad3278
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369440
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43460}
2024-11-26 17:59:08 +00:00
Johannes Kron
7f775bc94c Ensure accurate FPS calculation for low frame rates
When receiving streams with frame rates around 1 fps, the decode and
render fps were incorrectly reported as 0, even though frames were being
decoded successfully.

This commit addresses the issue by adjusting the calculation in
RateStatistics to better handle streams with frame intervals that are
close to the window size.

1 fps streams are an important special case that occur frequently in
in screen share scenarios.

Fixed: webrtc:354625675
Change-Id: I1362768229a3abab5929220ba4bbd5ccb06a33d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368080
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43417}
2024-11-18 14:17:22 +00:00
Björn Terelius
3ffe94314a Fix lint warnings in TaskQueueStdlib
Bug: None
Change-Id: I4fd89dac39c0585793601d7adb5181a6ac15a64f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368460
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43415}
2024-11-18 11:51:15 +00:00
Mirko Bonadei
79c380c5b7 Always compile rtc_base/trace_categories.{h,cc}.
Instead use the preprocessor to avoid compiling Perfetto related code
when RTC_USE_PERFETTO is not defined.

Bug: None
Change-Id: I85b37cb0287327035ac2e8feb3caf9505486a1e4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368343
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43410}
2024-11-18 09:34:33 +00:00
Guillaume Petit
1dcf202ffe Fixes a linear interpolation bad access
Bug: webrtc:353425611
Change-Id: I9c38428d2463d9d76047ad5be84ed57cba9ebb72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367981
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43408}
2024-11-16 07:16:53 +00:00
Philipp Hancke
f4abc03ca2 Reduce DTLS RSA certificate tests
by going from cartesian product of combinations to an explicit
minimal list.

BUG=webrtc:375552698

Change-Id: I99b9afd7376f19abde54dafd8917954617d8c255
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367504
Reviewed-by: Christoffer Dewerin <jansson@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43373}
2024-11-07 18:45:56 +00:00
Per Kjellander
906deafff4 Add support for sending packets with ECT(1) based on packet options in native WebRTC.
With L4S in WebRTC, only RTP packets are supposed to be send with ECT(1)

Bug: webrtc:42225697
Change-Id: If10bf74a867d3ea04fd1fb931cdc2a6380176270
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367220
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43343}
2024-11-01 07:48:19 +00:00
Harald Alvestrand
aaaeb29ef5 Allow single-argument StrCat
and modify DEPS files accordingly.
This is done in support of the decision to encourage AbslStringify.

Bug: None
Change-Id: I26fee77978d1dd21be6d2ef011c4dfd78a7b43e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367204
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43338}
2024-10-31 15:31:38 +00:00
Philipp Hancke
130bdcea7e Use fake clock for SSLStreamAdapter unit tests
BUG=webrtc:375552698

Change-Id: I2859b6220194ff747637a9a3870c5b8979c83ca8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366940
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Christoffer Dewerin <jansson@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43333}
2024-10-30 14:04:14 +00:00
Philipp Hancke
ddac9f2739 Reduce RSA key size for SSLStreamAdapter test
and remove the testing of the nondefault key size from the "server" parameters to speed up tests

BUG=webrtc:375552698

Change-Id: Ibc1bd491300964aa45826b98962ed3e56c6d4974
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366941
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Christoffer Dewerin <jansson@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43321}
2024-10-29 09:29:36 +00:00
Philipp Hancke
0e5d73510d DTLS: cleanup extension permutation
which shipped in M129.

BUG=webrtc:42225803

Change-Id: I5021c7878069a1cd0eafd078b73fa57c5b9b2155
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364360
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43313}
2024-10-28 10:04:37 +00:00
Jakob Ivarsson
68f4e27794 Add RtpSender OnFirstPacketSent callback.
It works in the same way as the first packet received callback and can be used for latency measurements.

One important detail is that RTCP and probe packets are excluded from triggering the callback.

Bug: b/375148360
Change-Id: I5f99b565f96b622e864669cf227be5534aab0fc7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366644
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43309}
2024-10-25 16:17:04 +00:00
Per K
1d2f85d1ce Implement support for receiving feedback according to RFC 8888
Bug: webrtc:42225697
Change-Id: Ieb270b44da223436d2fd3fa353dc857f378ee88d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365700
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43305}
2024-10-25 09:29:21 +00:00
Tom Sepez
a21152ab85 Use mutable lambda captures in AsyncDnsResolver::Start().
Otherwise, the captured variables are immutable, so a subsequent
std::move() silently degrades to a copy.

-- Add missing () for consistency with other no-arg lambda
   captures.

Bug: webrtc:374845009
Change-Id: I205589ff8047446918a45203a22620846b271187
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366280
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43289}
2024-10-23 10:02:04 +00:00
Danil Chapovalov
eba6831300 Alias instead of reimplement rtc::RefCountedObject
Mentioned reasons for re-implementing it do not apply when simplest form of aliasing is used.

Bug: webrtc:42225969
Change-Id: If8b51f173faf4c66cde74413f4fbc7c72ad87323
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366460
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43285}
2024-10-22 17:00:11 +00:00
Florent Castelli
c2180102e4 Rename rtc::Packet to rtc::VirtualSocketPacket
Bug: webrtc:42222919
Change-Id: I476624e986d4ef9208ec8673d9f6968fe00ea498
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366423
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43283}
2024-10-22 16:28:32 +00:00
Per K
3073c4809c Move rtc_base/network/ecn_marking.h to api/transport
For now, old file forward include api/transport/ecn_marking.h
Done in preparation for more usage of this enum when handling received
RFC8888 feedback.

Bug: webrtc:42225697
Change-Id: I022c2b7f1e7f986b24aa32b8911ad67c6640a5c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366440
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43282}
2024-10-22 15:29:49 +00:00
Dor Hen
6d58a43413 Comment unused variables in implemented functions 3\n
Bug: webrtc:370878648
Change-Id: I40251cc529cc20fbf2b034fa25798965b91dbd88
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364683
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43278}
2024-10-22 11:58:48 +00:00
Philipp Hancke
03b2c9f6fc Let ZeroOnFreeBuffer do the memcpy for DTLS-SRTP key extraction
and use uint8_t instead of unsigned char. Follow-up from
  https://webrtc-review.googlesource.com/c/src/+/365274

BUG=webrtc:357776213

Change-Id: Ibc97e5cc85316ba69b4133b7f3c42e3afbdd7abd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365540
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43263}
2024-10-18 11:18:21 +00:00
Peter Kasting
f29fb25555 Add begin()/end() to CopyOnWriteBuffer.
This allows this type to meet the requirements of e.g.
std::ranges::range, which is necessary for it to work with the std::span
range constructor, or the "non-legacy" constructor for Chromium's
base::span.

Bug: chromium:364987728
Change-Id: I6cb2b9c6d849c97e304719140dcb967a9e2c254c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365780
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43251}
2024-10-16 15:49:09 +00:00
Dor Hen
049b43bd02 [reland] Comment unused variables in implemented functions
Compiling webrtc with `-Werror=unused-parameters` is failling duo to
those parameters.
Also, it shouldn't harm us to put those in comment for code readability as
well.

NOTE: This time I made sure to iterate over the C files in the
audio_processing folder and compile them using gcc.
On the original CL that was reverted - that failed with the same error
Danil mentioned. This time it seems fine.
I'll make sure to run the same script on the rest of my CLs for sanity

Bug: webrtc:370878648
Change-Id: I83cea3a08777e21d26a95bcad503a2d1b74566eb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364537
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Cr-Commit-Position: refs/heads/main@{#43249}
2024-10-16 11:40:33 +00:00
Philipp Hancke
e486aedc16 Fix misaligned read in physical_socket_server
which causes errors under ASAN/UBSAN

BUG=None

Change-Id: I36bf4ff706339b6e3a8fd3764551e98fce111ad7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365249
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43243}
2024-10-16 06:28:07 +00:00
Philipp Hancke
6caca655d8 Reland "Spanify SRTP key export"
This is a reland of commit 65ae3245f9380e46b1d755f3f452ba63ab6cdf8d
with more backward compat which also fixes the off-by-one issue which caused wrong SRTP keys to be extracted.

Original change's description:
> Spanify SRTP key export
>
> and simplify the interface used as this is only used for exporting
> SRTP keys and passing arcane OpenSSL arguments around does not make
> much sense.
>
> BUG=webrtc:357776213
>
> Change-Id: I9e5a94fe368b77975e48b6dd5ab6a2d2575d6382
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364521
> 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@{#43198}

Bug: webrtc:357776213
Change-Id: I5d43dc23f90ef630834fb400751979fcc5e18203
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365180
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43225}
2024-10-11 19:39:28 +00:00
Jeremy Leconte
32590ef877 Revert "Spanify SRTP key export"
This reverts commit 65ae3245f9380e46b1d755f3f452ba63ab6cdf8d.

Reason for revert: breaks downstream compilation

Original change's description:
> Spanify SRTP key export
>
> and simplify the interface used as this is only used for exporting
> SRTP keys and passing arcane OpenSSL arguments around does not make
> much sense.
>
> BUG=webrtc:357776213
>
> Change-Id: I9e5a94fe368b77975e48b6dd5ab6a2d2575d6382
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364521
> 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@{#43198}

Bug: webrtc:357776213
Change-Id: I03ffcda3d6821718f355b243ce78a9c54b4036f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365062
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Owners-Override: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43202}
2024-10-09 08:51:23 +00:00
Philipp Hancke
65ae3245f9 Spanify SRTP key export
and simplify the interface used as this is only used for exporting
SRTP keys and passing arcane OpenSSL arguments around does not make
much sense.

BUG=webrtc:357776213

Change-Id: I9e5a94fe368b77975e48b6dd5ab6a2d2575d6382
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364521
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@{#43198}
2024-10-08 19:05:40 +00:00
Danil Chapovalov
fec6f8d09d Cleanup duplicated log streaming operators
Bug: None
Change-Id: I97c429135c0a11f92a5d0dd44efa207984f9a05e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364881
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43190}
2024-10-08 09:04:35 +00:00
Danil Chapovalov
ebd3732829 Remove support for logging types via ToLogString extension
To have a single way of describing how to log a custom type: AbslStringify

Bug: None
Change-Id: I6a4a6db455685be01bff1b6eeddc121b4ea51b77
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364901
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43189}
2024-10-08 08:52:23 +00:00
Jeremy Leconte
0bff76bb8a SuppressWarnings EnumOrdinal.
This is to fix compile failure following https://chromium-review.googlesource.com/c/chromium/src/+/5901711.

Change-Id: I817813e24c96ec542c0e030e1e2964f8bbd591fc
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364464
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43178}
2024-10-07 09:16:03 +00:00
Danil Chapovalov
f75ab82b46 Support RTC_LOG for types that implement both AbslStringify and ToLogString
To support libraries and dependencies compatible with absl way of debug printing custom types.
In particular gtest can use AbslStringify to produce nice output when unit types are compared with EXPECT macros.

Bug: None
Change-Id: Ie78293a225f61977f256f0234e07d166b1977e2d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364162
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43164}
2024-10-03 13:54:40 +00:00
Danil Chapovalov
678607501c Revert "Comment unused variables in implemented functions"
This reverts commit 05043e1cef47f33e81bc7ba83b4cc2c407111397.

Reason for revert: breaks compilation of .c files

Original change's description:
> Comment unused variables in implemented functions
>
> Compiling webrtc with `-Werror=unused-parameters` is failling duo to
> those parameters.
> Also, it shouldn't harm us to put those in comment for code readability as
> well.
>
> Bug: webrtc:370878648
> Change-Id: I0ab2eafd26e46312e4595f302b92006c9e23d5d2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364340
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43157}

Bug: webrtc:370878648
Change-Id: I4ea50baa2c3d0d162759c8255171e95c6199ed26
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364580
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Owners-Override: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43162}
2024-10-03 11:51:29 +00:00