This cl/ passes field trials all the way from c++
to the android NetworkMonitorAutoDetect.java
Bug: webrtc:10335
Change-Id: Ic6842612eed36b684340f0f78f4087bee249cc50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257081
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36498}
The two GN templates are nearly identical, so merge them to reduce
maintenance.
Bug: webrtc:13949
Change-Id: I5f53ade5f9d09ce6f23a6cb29c9d39df4485a237
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258380
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#36495}
Move global state into a singleton class. Eliminates use of
GlobalMutex. Also use std::atomic rather than volatile, for improved
thread safety.
Bug: webrtc:11567
Change-Id: I305d16ed2f4a9a6497df119e66d9bba08337339a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258120
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36475}
The goal of this CL is to make the CFDictionaryRef not dependent
on a fixed number of properties, which will facilitate future work.
No behavior change intended.
Bug: None
Change-Id: I32261d81eaa9b77380cecbdaefcbaeafde300f9a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257920
Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#36449}
This CL replaces those references with the smallest set of targets
that can satisfy the linker dependencies revealed by building the
"all" target.
Bug: webrtc:13634
Change-Id: Ia778630b18e1164138c41d245c3c8effed67f8e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257282
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36445}
This cl/ fixes a race condition with the recent additions
to NetworkMonitorAutoDetect (getAllNetworksFromCache).
The getAllNetworksFromCache-feature uses the by the Android team preferred way of
enumerating networks, i.e to register network listeners.
This however introduces a unpleasant race condition like this:
1) network.cc discover rmnet0
2) BasicPortAllocator tries to create UDP port on rmnet0
- This fails as BindSocketToNetwork requires a android handle.
3) NetworkMonitorAutoDetect gets callback with rmnet0
4) BasicPortAllocator tries to create TCP port on rmnet0
- This succeeds.
5) Since rmnet0 has one working port, there will not be
any new ports created on that network
=> We end up with a TCP only connection :(
---
By impl. IsAdapterAvailable, we make sure that the network
will not be used by BasicPortAllocator (or anyone else!)
until we support binding to it.
The IsAdapterAvailable was implemented for IOS,
and has test coverage using FakeNetworkManager.
This cl/ is default enabled with the kill-switch
WebRTC-AndroidNetworkMonitor-IsAdapterAvailable.
Bug: webrtc:13741
Change-Id: I7c2cb7789660fd2e082c214d00e50c894666b07c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257400
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36406}
* tools_webrtc/PRESUBMIT.py is only checking the licence which is already done here:
38f35db4d4:PRESUBMIT.py;l=913;bpv=1;bpt=0;drc=4fc9bd9f69a0d88889d86d0cc9f8e27406e8a342
* sdk/android/PRESUBMIT.py was added before 'git cl format' was required from the root PRESUBMIT.py:
https://codereview.webrtc.org/2377113003
Bug: webrtc:13895
Change-Id: Ia5ea2529c36ceebfd7d4e6a6a72352bd30c573b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257280
Reviewed-by: Christoffer Jansson <jansson@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#36391}
Ironic :( The "field trial guy" constructing a invalid string,
if only there would have been a builder instead...
I tested the code several times...but not with debug build...
Bug: webrtc:13741
Change-Id: If3caad0f5533fc150ffd6a34a89ab84f3f0264aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256979
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36370}
This explores the theory that targets that have no files, just
dependencies, are unnecessary.
Bug: webrtc:13805
Change-Id: I1feb50cf3886128031af8970eae361e35fb052c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256974
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36363}
convert rtc_base/network and collateral.
This also remove last usage of system_wrappers/field_trials
in p2p/...Yay!
Bug: webrtc:10335
Change-Id: Ie8507b1f52bf7f3067e9b4bf8c81a825e4644fda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256640
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36357}
The only caveat is that a name attribute for the `@Parameters`
annotation is required, as otherwise the test infrastructure
doesn’t find test results.
Bug: webrtc:13662
Change-Id: Ib3e2a6671d1045b0e19746ce78dd434fbee78b87
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256462
Reviewed-by: Linus Nilsson <lnilsson@webrtc.org>
Auto-Submit: Xavier Lepaul <xalep@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36322}
This migrates all tests that work by just changing their runner.
This excludes tests using `@RunWith(ParameterizedRunner.class)`, and a
few other non-parameterized tests that fail with the default runner.
Bug: webrtc:13662
Change-Id: Ia0b7c80e04a6a6b7a51348b3a7f587d10061b58e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256367
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Xavier Lepaul <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36298}
This is part of a large-scale effort to increase adoption of
absl::string_view across the WebRTC code base.
This CL converts the majority of "const std::string&"s in function
parameters under rtc_base/ to absl::string_view.
Bug: webrtc:13579
Change-Id: I2b1e3776aa42326aa405f76bb324a2d233b21dca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254081
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Xavier Lepaul <xalep@webrtc.org>
Reviewed-by: Anders Lilienthal <andersc@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36239}
This is part of a large scale effort to increase adoption of
absl::string_view across the WebRTC code base.
This CL adds absl::string_view versions of the OnLogMessage functions in
rtc::LogSink. The const std::string& versions are kept for now since
downstream clients use subclasses of LogSink and need to be migrated
before these are removed.
Bug: webrtc:13579
Change-Id: I57bb72ad503805ff0ca16f1d7aece2d44c65cb73
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253980
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Xavier Lepaul <xalep@webrtc.org>
Owners-Override: Xavier Lepaul <xalep@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36189}
This is in preparation to introduce new java buildtargets that will use the `libaom_av1_encoder` buildtarget instead.
bug: webrtc:13573
Change-Id: I23e80653943ede576657acc17bcc5602cb0a4d5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254540
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36171}
When loading the library fails, the user will be faced with this error:
java.lang.UnsatisfiedLinkError: No implementation found for void org.webrtc.PeerConnectionFactory.nativeInitializeAndroidGlobals()
With no context, however.
Bug: webrtc:13619
Change-Id: I88565f085773ad1e8c2f5742d7fdba96fb6043d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253960
Reviewed-by: Christoffer Jansson <jansson@google.com>
Reviewed-by: Xavier Lepaul <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36150}
WebRTC’s minSdk is 21, so all those checks are dead code.
Change-Id: I26497fd92259b66d9e5ac6afbb393adf4d904c77
Bug: webrtc:13780
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253124
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Linus Nilsson <lnilsson@webrtc.org>
Commit-Queue: Xavier Lepaul <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36140}
This change adds a cache for networks in the SimpleNetworkCallback that
is already registered, allowing the cache to be used preferentially as
opposed to the deprecated getAllNetworks call.
This is a fork of https://webrtc-review.googlesource.com/c/src/+/251401
- adds field trials for new behavior
- removes test that did not work
- add (poor) test of field trials
- remove the "network_monitor_java" build target (that I could
not find any reference to...)
Bug: webrtc:13741
Change-Id: I2829c2f1940d4b42455d8e1a2217cf15c133e22b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252284
Reviewed-by: Xavier Lepaul <xalep@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36121}
On Android, MediaCodec can request a specific layout of the input buffer.
One can use the stride and slice height to calculate the layout from
the Encoder's MediaFormat. The current code assumes
a specific layout, which is a problematic in Android 12.
Fix this by honoring the stride and slice-height.
Bug: webrtc:13427
Change-Id: I2d3e429309e3add3ae668e0390460b51e6a49eb9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/240680
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#36033}
This is a reland of 325789c457
Original change's description:
> Mark all bool conversion operators as explicit
>
> An explicit bool conversion operator will still be used implicitly
> when an expression appears in "bool context", e.g., as the condition
> in an if statement, or as argument to logical operators. The
> `explicit` annotation prevents conversion in other contexts, e.g.,
> converting both a and b to bool in an expression like `a == b`.
>
> Bug: None
> Change-Id: I79ef35b1ea831e6011ae472900375ae8a3e617ab
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250664
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35927}
Bug: None
Change-Id: Ie057dfc8c0b5c498e2c8daff7620172c89f0e011
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251380
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35962}
These two files turn out to be entangled with each other. Keeping
them together for now.
This is a simpler approach than the one attempted in
https://webrtc-review.googlesource.com/c/src/+/251060
but leaves cleanup of the relationship to a later work item.
Bug: webrtc:13634
Change-Id: I2b38f86c0c510332dc24a6b83531aee143a5df10
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251240
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35942}
Add timestamps to audio_record_jni DataIsRecorded() function, and make
WebRtcAudioRecord find and send the time stamp to that function.
This CL is an continuation of
https://webrtc-review.googlesource.com/c/src/+/249085
Bug: webrtc:13609
Change-Id: I63ab89f1215893cbe1d11d9d8948f5639fc5cdfe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249951
Reviewed-by: Xavier Lepaul <xalep@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Minyue Li <minyue@google.com>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#35933}
This reverts commit 325789c457.
Reason for revert: Breaks downstream clients.
Original change's description:
> Mark all bool conversion operators as explicit
>
> An explicit bool conversion operator will still be used implicitly
> when an expression appears in "bool context", e.g., as the condition
> in an if statement, or as argument to logical operators. The
> `explicit` annotation prevents conversion in other contexts, e.g.,
> converting both a and b to bool in an expression like `a == b`.
>
> Bug: None
> Change-Id: I79ef35b1ea831e6011ae472900375ae8a3e617ab
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250664
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35927}
TBR=mbonadei@webrtc.org,nisse@webrtc.org,tommi@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I392cd0c7bd96c90e0db20831864418adb7d58bc3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251080
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@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@{#35929}
An explicit bool conversion operator will still be used implicitly
when an expression appears in "bool context", e.g., as the condition
in an if statement, or as argument to logical operators. The
`explicit` annotation prevents conversion in other contexts, e.g.,
converting both a and b to bool in an expression like `a == b`.
Bug: None
Change-Id: I79ef35b1ea831e6011ae472900375ae8a3e617ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250664
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35927}