When the selected connection becomes not receiving and there are many connections,
If we use a round-robin fashion to ping all connections, none of the connections will
be in receiving state for sufficient long time to ensure switching connections promptly.
Triggered check will help in this situation to some extent but it may still fail to switch promptly when there are a lot of connections.
With this CL, if the selected connection is weak, once we find a writable connection on a network we start to ping it with a higher priority to keep it in receiving state.
Plus, if the selected connection is weak, we choose a shorter ping interval (900ms) for all writable connections.
BUG=b/32022719
Review-Url: https://codereview.webrtc.org/2369963004
Cr-Commit-Position: refs/heads/master@{#14991}
This is intended to make SequencedTaskChecker work for native dispatch queues
on iOS and macOS. These labels can be compared by their pointers to determine
if a task is running on the same queue.
BUG=webrtc:6643
Review-Url: https://codereview.webrtc.org/2464383002
Cr-Commit-Position: refs/heads/master@{#14900}
With this change, instead of
RTC_DCHECK_GE(unsigned_var, 17u);
we can simply write
RTC_DCHECK_GE(unsigned_var, 17);
or even
RTC_DCHECK_GE(unsigned_var, -17); // Always true.
and the mathematically sensible thing will happen.
Perhaps more importantly, we can replace checks like
// index is size_t, num_channels is int.
RTC_DCHECK(num_channels >= 0
&& index < static_cast<size_t>(num_channels));
or, even worse, just
// Surely num_channels isn't negative. That would be absurd!
RTC_DCHECK_LT(index, static_cast<size_t>(num_channels));
with simply
RTC_DCHECK_LT(index, num_channels);
In short, you no longer have to keep track of the signedness of the arguments, because the sensible thing will happen.
BUG=webrtc:6645
Review-Url: https://codereview.webrtc.org/2459793002
Cr-Commit-Position: refs/heads/master@{#14878}
The requirements have been relaxed a little bit which should allow the test to pass on our VMs that run the tests.
BUG=6610
Review-Url: https://codereview.webrtc.org/2458713005
Cr-Commit-Position: refs/heads/master@{#14836}
Introduce a convention on categorizing GN targets:
1. Production code
2. Tests
3. Examples
4. Tools
The first two have targets spread out all over the tree,
while the latter are isolated to examples/ and tools/ directories.
Another new convention: Each directory's BUILD.gn file shall contain
a target named similar to the directory name. This target shall
contain the 'most common' production code, i.e. so that most
consumers of the directory can depend on only the directory
(which implicitly means that target in GN).
//webrtc:webrtc_tests is changed to depend on all WebRTC tests.
From now on, it's necessary to add new test targets to this dependency
tree in order to get them compiled.
Two new group targets are created:
//webrtc/modules/audio_coding:audio_coding_tests
//webrtc/modules/audio_processing:audio_processing_tests
to reduce the long list of tests in //webrtc:webrtc_tests.
Visibility on //webrtc:webrtc and //webrtc:webrtc_tests is restricted
to the root target, to avoid circular dependencies due to the monolithic
property of these targets (a problem we've had in the past).
The 'root' target at the top level is renamed to 'default', which means GN will
build this target instead of _all_ generated targets
(see https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/faq.md#Can-I-control-what-targets-are-built-by-default).
This target now depends on everything we want to build, meaning all targets now
explicitly needs to be wired up from the root target in order to get build.
Having this, the number of compiled objects on Android is decreased from 8855 to 6276. It also gives us better control over our build.
BUG=webrtc:6440
TESTED=git cl try --clobber
NOTRY=True
Review-Url: https://codereview.webrtc.org/2441383002
Cr-Commit-Position: refs/heads/master@{#14821}
The loopback range is 127.0.0.0/8, which is everything from 127.0.0.0 to
127.255.255.255.
BUG=chromium:649118
Review-Url: https://codereview.webrtc.org/2445933003
Cr-Commit-Position: refs/heads/master@{#14807}
Before this change, with DCHECKs switched off, this sort of check
size_t index = ...;
RTC_DCHECK_GE(index, 0u);
would cause GCC (but no other compiler that we use) to complain
that unsigned values are always greater than or equal to 0. With
this change, it no longer complains.
(It was and remains the case that there was no complaints if
DCHECKs were switched on, or if you used RTC_CHECK_op.)
The reason for doing this change is that it isn't useful for the
compiler to force us to remove DCHECKs just because their
condition can be verified statically. That causes us to remove
the checks, and once that's happened, future code changes are free
to violate the removed checks and no one will know...
BUG=webrtc:6620
Review-Url: https://codereview.webrtc.org/2455943002
Cr-Commit-Position: refs/heads/master@{#14805}
The LOGGING define is only used in a single location in our whole codebase:
$ git gs "f LOGGING"
webrtc/base/physicalsocketserver.cc:1584:#if LOGGING
$ git gs "defined(LOGGING"
(no hits)
The above commands also give no hits in Chromium's code base.
BUG=webrtc:6412
NOTRY=True
Review-Url: https://codereview.webrtc.org/2442743002
Cr-Commit-Position: refs/heads/master@{#14799}
It turns out that that audio network adaptor can always be created with knowledge of receiver frame length range. There is no need to keep some infrastructure that is used for runtime setting of receiver frame length ranges.
BUG=webrtc:6303
Review-Url: https://codereview.webrtc.org/2429503002
Cr-Commit-Position: refs/heads/master@{#14748}
The main reason for doing this is to allow refcounted objects to accept rvalue references in ctor and be able to std::move ctor rvalue arguments.
Also, refcounted.h is now generated using pump.py instead of manually creating each ctor version.
BUG= none
Review-Url: https://codereview.webrtc.org/2425683003
Cr-Commit-Position: refs/heads/master@{#14687}
Currently,
https://build.chromium.org/p/chromium.fyi/builders/CrWinAsan%28dll%29/builds/...
is broken because of
Writing """\
clang_use_chrome_plugins = false
is_asan = true
is_clang = true
is_component_build = true
is_debug = false
llvm_force_head_revision = true
symbol_level = 2
target_cpu = "x86"
v8_enable_verify_heap = true
""" to C:\b\c\b\CrWinAsan_dll_\src\out\Release\args.gn.
C:\b\c\b\CrWinAsan_dll_\src\buildtools\win\gn.exe gen //out/Release --check
--runtime-deps-list-file=C:\b\c\b\CrWinAsan_dll_\src\out\Release\runtime_deps
-> returned 1
ERROR at //third_party/webrtc/base/BUILD.gn:276:21: Undefined identifier in string expansion.
data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_rt.asan_dynamic-i386.dll" ]
^--------------
"clang_base_path" is not currently in scope.
See //content/test/BUILD.gn:307:7: which caused the file to be included.
"//third_party/webrtc/base:rtc_base",
^-----------------
NOTRY=True
NOPRESUBMIT=True
R=kjellander@webrtc.org, thakis@chromium.org
BUG=chromium:497757
TBR=kjellander
Review-Url: https://codereview.webrtc.org/2422223002
Cr-Commit-Position: refs/heads/master@{#14653}
Gestalt has been deprecated since macOS 10.8, and it's always been overkill for
finding the macOS version anyways. uname works fine.
BUG=webrtc:6027
Review-Url: https://codereview.webrtc.org/2391633004
Cr-Commit-Position: refs/heads/master@{#14589}
Some runtime dependencies on MSVC were missing and had to be added to rtc_base_approved.
BUG=chromium:497757
NOTRY=True
Review-Url: https://codereview.webrtc.org/2389133002
Cr-Commit-Position: refs/heads/master@{#14562}
Reason for revert:
This change broke a downstream application.
Original issue's description:
> Delete transformadapter.cc and transformadapter.h.
>
> BUG=webrtc:6424
>
> Committed: https://crrev.com/2c3c3e27321e4b616bd1222857b2882befc485e3
> Cr-Commit-Position: refs/heads/master@{#14541}
TBR=perkj@webrtc.org,pthatcher@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6424
Review-Url: https://codereview.webrtc.org/2400443003
Cr-Commit-Position: refs/heads/master@{#14543}
The replacement methods had already been added to applefilesystem.mm, they just
weren't being used on macOS.
BUG=webrtc:6028
Review-Url: https://codereview.webrtc.org/2395593002
Cr-Commit-Position: refs/heads/master@{#14535}
These tests were checking the behavior of thread synchronization
primitives using nothing but carefully timed sleeps. This was very
unreliable and prone to flakes.
This CL replaces the sleeps with waiting on synchronization events.
There is still the need to wait for timeouts when testing for negative
outcomes, but it's greatly reduced. I've run these tests for thousands
of iterations on MSan without a single failure.
BUG=webrtc:5824
R=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/2393023002 .
Cr-Commit-Position: refs/heads/master@{#14534}
Reason for revert:
This CL breaks some downstream dependencies (contact me for more info).
Original issue's description:
> Delete unused code httprequest, httpclient, and socketpool.
>
> BUG=webrtc:6424
>
> Committed: https://crrev.com/4a255be3790a040cae2f6182ed70b7dd38c6839e
> Cr-Commit-Position: refs/heads/master@{#14514}
TBR=perkj@webrtc.org,pthatcher@webrtc.org,nisse@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6424
Review-Url: https://codereview.webrtc.org/2397673002
Cr-Commit-Position: refs/heads/master@{#14518}
The test was heavily dependent on wall clock timing, so it ended up
being disabled in some build configurations. This CL switches it to use
a fake clock instead.
BUG=webrtc:5947
Review-Url: https://codereview.webrtc.org/2392613003
Cr-Commit-Position: refs/heads/master@{#14507}