Commit graph

593 commits

Author SHA1 Message Date
Mirko Bonadei
fc57037462 Revert "Split digest methods from ssl target into digest target"
This reverts commit 47bfe39ecf.

Reason for revert: Breaks downstream project.

Original change's description:
> Split digest methods from ssl target into digest target
>
> in an attempt to break up the monolithic ssl target.
>
> BUG=None
>
> Change-Id: I38f5b3e2828742d5d918460db1af0a5797d6a5c2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349764
> 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@{#42249}

Bug: None
Change-Id: Ice6f901cd8c2aecf4cf44d3728ec76568b19a7ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350180
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@{#42255}
2024-05-08 06:42:32 +00:00
Philipp Hancke
47bfe39ecf Split digest methods from ssl target into digest target
in an attempt to break up the monolithic ssl target.

BUG=None

Change-Id: I38f5b3e2828742d5d918460db1af0a5797d6a5c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349764
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@{#42249}
2024-05-07 16:52:48 +00:00
Evan Shrubsole
cd09858f4a Convert decoder TRACE_EVENT to flows
This is the first new style trace event so this CL adds and updates
WebRTCs Perfetto configuration.

* Changes all #includes to target "third_party/perfetto". Added this
to DEPS.
* Expose the Perfetto public config in the "tracing" group using
an all_dependent_configs statement. This means the config is included
in all parts that include the "//:tracing" group. However, direct
perfetto includes are banned per DEPS.
* In order to expose Perfetto types (ie Flow/TerminatingFlow) the
perfetto headers are a dependancy on all targets. This should not
affect binary size as these are not used when perfetto is not enabled
and will not be linked.

Bug: b/42226290
Change-Id: I5711d81dae95ee907cbcd41bf1ee9b55d2ec595c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349161
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#42197}
2024-04-30 08:47:29 +00:00
Tommi
7e41c06d25 Deprecate the StreamInterface::SignalEvent sigslot
In its stead, there's now a SetEventCallback() method.

Bug: webrtc:11943
Change-Id: If936d6e1e23e8a584f06feb123ecf2d450ea4145
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319040
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42187}
2024-04-28 21:30:18 +00:00
philipel
b85b4c0f29 Reland "New video encoder API."
This reverts commit 56e6309749.

Reason for revert: Preparing for reland

Original change's description:
> Revert "New video encoder API."
>
> This reverts commit 42f12d5183.
>
> Reason for revert: tests fails downstream
>
> Original change's description:
> > New video encoder API.
> >
> > Also initial implementation wrapping the libaom AV1 encoder.
> >
> > Note that for now this is intended for prototype purposes.
> >
> > Bug: none
> > Change-Id: Iac42ca4aecb6a204601c9f00bfb300e3eda3c4f4
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306181
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#42108}
>
> Bug: none
> Change-Id: I927260353afb91df6c7650364baee4f13a098efd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347883
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Owners-Override: Philip Eliasson <philipel@webrtc.org>
> Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42111}

Bug: none
Change-Id: Ib72ef5359ead697d27301e2ca2408e8b27165931
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349001
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42172}
2024-04-25 08:19:16 +00:00
Evan Shrubsole
db50b03553 Add perfetto build config
This adds Perfetto support to WebRTC with a GN flag rtc_use_perfetto.
The configuration of perfetto depends on whether or not webrtc is
build within Chrome or not. When in Chrome, WebRTC will depend on
//third_party/perfetto:libperfetto. When building standalone, specific includes required for Perfetto are exposed with the library webrtc_libperfetto.

The perfetto trace API is exposed with a header export in
trace_event.h which is used instead of the legacy API.

The addition of Perfetto means there are 4 compilation modes for
tracing in WebRTC,
1. No tracing implementation.
2. Legacy tracing (AddTraceEvent/GetCategoryEnabled).
3.a. Perfetto statically linked (webrtc_libperfetto).
3.b. Perfetto in Chrome (Chrome's libperfetto).

This CL removes the tracing expectations from
rtc_stats_integrationtest.cc because those directly used the old API.

Integration into Chrome is a follow up CL which depends on
https://chromium-review.googlesource.com/c/chromium/src/+/5471691.

Tested: Ran Chrome with Perfetto and traces appear. WebRTC Unit test tracing working: https://ui.perfetto.dev/#!?s=04ea2613ea36b814394639a1ec4b60be5b5097527f1a485995ecc13469885468
Bug: webrtc:15917
Change-Id: I537d79dc247c2b759689910c621087286a4d8fdc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347880
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mikhail Khokhlov <khokhlov@google.com>
Cr-Commit-Position: refs/heads/main@{#42166}
2024-04-24 20:53:23 +00:00
Tommi
af3dfd8c35 Make WeakPtr slightly cheaper to allocate and use
This changes Flag to not inherit from a virtual interface.
Also fixing iwyu and build dependencies.

Bug: none
Change-Id: Iba6e095ec771d8975a32059041185270d32e51be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348940
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42162}
2024-04-24 10:28:02 +00:00
Tommi
d200488646 Introduce StreamInterface::FireEvent for firing stream events
This is a step towards removing StreamInterface::SignalEvent.
Downstream dependency will need to be updated to call FireEvent()
before further changes can land in webrtc.

Bug: webrtc:11943
Change-Id: Ia7d3f1c43fda52b7cf5bfa082aef3f462553cd67
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347884
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42143}
2024-04-23 02:33:12 +00:00
Tommi
f54e0133d7 Remove deprecated ProxyInfo code
Bug: none
Change-Id: I82d3ee97927031d974e2ef657312101dd910eff4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42136}
2024-04-22 08:38:36 +00:00
Danil Chapovalov
56e6309749 Revert "New video encoder API."
This reverts commit 42f12d5183.

Reason for revert: tests fails downstream

Original change's description:
> New video encoder API.
>
> Also initial implementation wrapping the libaom AV1 encoder.
>
> Note that for now this is intended for prototype purposes.
>
> Bug: none
> Change-Id: Iac42ca4aecb6a204601c9f00bfb300e3eda3c4f4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306181
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42108}

Bug: none
Change-Id: I927260353afb91df6c7650364baee4f13a098efd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347883
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Owners-Override: Philip Eliasson <philipel@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42111}
2024-04-18 13:06:36 +00:00
philipel
42f12d5183 New video encoder API.
Also initial implementation wrapping the libaom AV1 encoder.

Note that for now this is intended for prototype purposes.

Bug: none
Change-Id: Iac42ca4aecb6a204601c9f00bfb300e3eda3c4f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306181
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42108}
2024-04-18 08:24:18 +00:00
Tommi
0e662c8b0c Remove unused http_common build target (and source files)
Bug: none
Change-Id: Ibe20ee834afa6d893d24ce0241bbb891cddd9b35
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343787
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41977}
2024-03-29 22:37:35 +00:00
Tommi
81be7b2394 Remove unused+unmaintained PROXY_HTTPS code.
Bug: none
Change-Id: I09cfe14c2990d25343fd06a6d3bde7d651d7d46c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342041
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41966}
2024-03-26 10:25:42 +00:00
Tommi
bdb867f163 Move SocketStream to test.
The class is now only used by one test class.

Bug: none
Change-Id: Ib7714469254bd507d027385d2825b1c14bd63c94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343123
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41917}
2024-03-18 11:00:42 +00:00
Per K
8df31c915a Propagate ECN information on posix sockets to rtc::ReceivedPacket
Two new socket options are introduced OPT_SEND_ECN used for setting ECN bits. OPT_RECV_ECN used for reading the ECN bits.

If ECN bits are set on received IP packets,  ECT(1) and CE is propagated via rtc::ReceivedPacket.

Bug: webrtc:15368
Change-Id: I3ac335007e2f7d30564569bbc80ce47fa541bef1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332380
Reviewed-by: Jonas Oreland <jonaso@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41885}
2024-03-12 11:12:56 +00:00
Danil Chapovalov
dcc1534764 Delete rtc::TaskQueue
All usage was updated to use TaskQueueBase interface directly bypassing rtc::TaskQueue wrapper

Bug: webrtc:14169
Change-Id: I1808afd363b50448d4014d8d8402fce41b16a3ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341082
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41834}
2024-02-28 10:22:49 +00:00
Per K
2fafcec0c5 Remove unused AsyncPacketSocket::NotifyPacketReceived
Bug: webrtc:15368
Change-Id: Icb1d566670442604172fa1c03fc77e75ab9fde1f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340144
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41789}
2024-02-23 08:12:28 +00:00
Harald Alvestrand
b5f2b17fd8 Remove SOCKS5 support
Bug: webrtc:15726
Change-Id: Icd3aca433966f76e1b200b0f4790013cce12095a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331820
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41655}
2024-02-01 14:43:30 +00:00
Per K
056782c4b5 Implement Socket::RecvFrom(ReceiveBuffer& buffer) in PhysicalSocketServer
And RTC_CHECK(NOTREACHED) Socket::RecvFrom(void* pv..)

This cl also change usage of PhysicalSocket to use PhysicalSocket::RecvFrom(ReceivedBuffer&) in Nat and tests.
Note that Socket::RecvFrom(ReceiveBuffer& buffer) is already used in AsyncUdpSocket.( https://webrtc-review.googlesource.com/c/src/+/332200)
AsyncTCPSocket uses Socket::Recv(). Therefore, there should be no production usage left of Socket::RecvFrom(void* pv..) in open source webrtc.

Follow up cls should remove usage of Socket::RecvFrom(void* pv..) in implementations of rtc:AsyncSocketAdapter such as FirewallSocketAdapter.

Change-Id: I597dc32b14be98e954a3dc419723f043e8a7e19e

Bug: webrtc:15368
Change-Id: I597dc32b14be98e954a3dc419723f043e8a7e19e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332341
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41635}
2024-01-30 16:15:04 +00:00
Danil Chapovalov
0206a971f5 Uninherit TaskQueueForTest from legacy rtc::TaskQueue
rtc::TaskQueue is not used in any api and thus TaskQueueForTest no longer need to provide implementation for it.
TaskQueueForTest still helpful for code that expects TaskQueueBase.

Bug: webrtc:14169
Change-Id: I64ee2691ddeb0ff3a72cd4dd192730c06260f61f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335323
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41577}
2024-01-19 15:28:49 +00:00
Philipp Hancke
5aaa9ed41e Remove custom AssertStartsWith and AssertStringContains matchers
in favor of stock StartsWith and HasSubstr matchers provided by gmock.

BUG=None

Change-Id: Ib7e9a0ac73d506c349b8ec102dd4236767077d61
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334460
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41531}
2024-01-16 08:30:37 +00:00
Per K
4e3b101bc9 Export rtc::Socket for Chromium component builds
As of https://webrtc-review.googlesource.com/c/src/+/332200, socket is
no longer pure virtual and needs to be exported for Chromium component
build tests.

Bug: webrtc:15368
Change-Id: I3d2fcd329bc859d07106ae740eb2791eccaea1f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334060
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41504}
2024-01-11 10:24:03 +00:00
Per K
f81af2f8fd Introduce Socket::ReceiveBuffer and RecvFrom(ReceiveBuffer& buffer)
Intention is to gradually stop using raw pointers and make it easier to introduce
new meta data types.
A  default implementation is added that  use existing int RecvFrom(void*
pv,..)
In this cl, async_udp_socket.cc use the new method. There should be no
behaviour change.

Bug: webrtc:15368
Change-Id: I8f9773a65d24ab5bbac3534dcc37ee1ed874a2c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332200
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41497}
2024-01-10 09:52:57 +00:00
Per K
c202f9635e Remove AsyncPacketSocket::SignalReadPacket
Bug: webrtc:11943
Change-Id: I064a5252ed08e7d06695d03364326fa7f4c562a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331301
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41385}
2023-12-14 14:31:06 +00:00
Harald Alvestrand
24510d43dc Delete deprecated AsyncResolver and related classes
To be submitted after downstream usage has been removed, but no earlier than December 1, 2023.

Bug: webrtc:12598
Change-Id: Id9acbac591c48c0c5883fe8f06cf6a68471b70f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323004
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41290}
2023-11-30 15:36:55 +00:00
Per K
14630a7e37 Use rtc::ReceivedPacket in Stun and TurnServer
StunServer is updated to ensure registring for receiving packet from the socket is happening on the same thread as where the packets are recevied.

Bug: webrtc:15368, webrtc:11943
Change-Id: I94cc3a47278d5489de7f170c8d43015d1551c437
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328120
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41219}
2023-11-23 10:40:56 +00:00
Per K
cf2e08b798 Add ByteBufferReader constructor for ArrayView
Bug: webrtc:14870
Change-Id: I0643af4a44bb2bc26581df971221766316124996
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327520
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41182}
2023-11-17 12:07:05 +00:00
Per K
d07900c848 UDP socket and TCP socket use AsyncPacketSocket::NotifyPacketReceived
This is done instead of directly using AsyncPacketSocket::SignalReceived.


Bug: webrtc:15368, webrtc:11943
Change-Id: I5671e66b270355188b1252138eced8e6c78ba7ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327521
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41180}
2023-11-17 11:26:53 +00:00
Sergey Silkin
ebc4d3edd5 Move StrJoin to rtc_base/strings
A similar function was defined in rtc_base/openssl_adapter. Moving it from net/dcsctp/common/ to rtc_base/strings/. I'm planning to use StrJoin in a video codec test (a follow-up change).

Bug: webrtc:14852
Change-Id: Ie657c03e7f9fb52c189c127af6f66ec505b512ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327322
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41166}
2023-11-15 12:10:28 +00:00
Per K
4ac371883e AsyncPacketSocket::RegisterReceivedPacketCallback
This cl introduce RegisterReceivedPacketCallback and
DeregisterReceivedPacketCallback that will be used to replace AsyncPacketSocket::SignalReadPacket

A "proof of concept" cl is here: https://webrtc-review.googlesource.com/c/src/+/327324

Bug: webrtc:15368
Change-Id: I07e4f564dc8420d78e542991689778d8531225df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327325
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41164}
2023-11-15 11:17:53 +00:00
Markus Handell
9c69c4625b Revert "Measure wall clock time of capture and encode processing."
This reverts commit 8039cdbe48.

Reason for revert: remove functionality after measurement complete

Original change's description:
> Measure wall clock time of capture and encode processing.
>
> (NOTE: This and dependent CLs will be reverted in a few days after
> data collection from the field is complete.)
>
> This change introduces a new task queue concept, Voucher. They
> are associated with a currently running task tree. Whenever
> tasks are posted, the current voucher is inherited and set as
> current in the new task.
>
> The voucher exists for as long as there are direct and indirect
> tasks running that descend from the task where the voucher was
> created.
>
> Vouchers aggregate application-specific attachments, which perform
> logic unrelated to Voucher progression. This particular change adds
> an attachment that measures time from capture to all encode operations
> complete, and places it into the WebRTC.Video.CaptureToSendTimeMs UMA.
>
> An accompanying Chrome change crrev.com/c/4992282 ensures survival of
> vouchers across certain Mojo IPC.
>
> Bug: chromium:1498378
> Change-Id: I2a27800a4e5504f219d8b9d33c56a48904cf6dde
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325400
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Markus Handell <handellm@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41061}

Bug: chromium:1498378
Change-Id: I9503575fbc52f1946ca26fc3c17b623ea75cd3c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327023
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41135}
2023-11-11 18:03:40 +00:00
Harald Alvestrand
78f905e5cc Move some users to use webrtc::RefCountInterface
Bug: webrtc:15622
Change-Id: I2d4c20c726af1a052e161b7689a73d1e5e3eb191
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325526
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41067}
2023-11-02 14:45:57 +00:00
Markus Handell
8039cdbe48 Measure wall clock time of capture and encode processing.
(NOTE: This and dependent CLs will be reverted in a few days after
data collection from the field is complete.)

This change introduces a new task queue concept, Voucher. They
are associated with a currently running task tree. Whenever
tasks are posted, the current voucher is inherited and set as
current in the new task.

The voucher exists for as long as there are direct and indirect
tasks running that descend from the task where the voucher was
created.

Vouchers aggregate application-specific attachments, which perform
logic unrelated to Voucher progression. This particular change adds
an attachment that measures time from capture to all encode operations
complete, and places it into the WebRTC.Video.CaptureToSendTimeMs UMA.

An accompanying Chrome change crrev.com/c/4992282 ensures survival of
vouchers across certain Mojo IPC.

Bug: chromium:1498378
Change-Id: I2a27800a4e5504f219d8b9d33c56a48904cf6dde
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325400
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41061}
2023-11-01 16:10:17 +00:00
Harald Alvestrand
d6bac61b64 Move RefCountInterface to api/ and webrtc: namespace
This CL just moves the definition and adds a forward.
Actually using the new definition is left for later CLs.

Bug: webrtc:15622
Change-Id: I6d97ef45b98f9eb193c59dd7f8a89c99cfe0ba9a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325381
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41048}
2023-10-31 14:02:50 +00:00
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
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
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
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
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
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
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
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
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