889 Commits

Author SHA1 Message Date
honghaiz
7252a00b9f Ping the premier connection on each network with higher priority.
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}
2016-11-09 04:04:14 +00:00
ehmaldonado
809f9771b0 Update Visual Studio runtime file copying
Mirror the chromium changes to this list made in
https://codereview.chromium.org/2450933002/

BUG=chromium:497757
NOTRY=True

Review-Url: https://codereview.webrtc.org/2467273002
Cr-Commit-Position: refs/heads/master@{#14924}
2016-11-03 18:26:40 +00:00
kwiberg
9189793d69 Remove webrtc/base/buffer.cc, now that Chromium doesn't claim to need it anymore
BUG=webrtc:5845

Review-Url: https://codereview.webrtc.org/2477693002
Cr-Commit-Position: refs/heads/master@{#14913}
2016-11-03 14:04:27 +00:00
kthelgason
44e0efe0e6 Use queue label as id in SequencedTaskChecker when not running on TaskQueue
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}
2016-11-02 17:28:23 +00:00
kwiberg
8a44e1d87b Let RTC_[D]CHECK_op accept arguments of different signedness
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}
2016-11-01 19:04:32 +00:00
tommi
c5b435dcec Re-enable PostDelayed test for TaskQueue on Windows.
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}
2016-10-31 09:17:17 +00:00
kjellander
6ceab08322 GN: New conventions, default target and refactorings
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}
2016-10-28 12:44:07 +00:00
philipel
a9a1ac2ab8 Moved rtc::Base64 to base approved.
BUG=none
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2454293003 .

Cr-Commit-Position: refs/heads/master@{#14819}
2016-10-28 12:23:25 +00:00
deadbeef
9922016ee4 Fix "IsLoopbackIp" to cover all loopback addresses; not just 127.0.0.1.
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}
2016-10-28 01:30:28 +00:00
kwiberg
32bcaf61f5 Improve RTC_DCHECK_op so that it won't trigger useless compiler warnings
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}
2016-10-27 20:36:08 +00:00
tommi
45d18eb034 Re-enable the PostDelayed TaskQueue test on all platforms except Windows.
BUG=webrtc:6610

Review-Url: https://codereview.webrtc.org/2457763002
Cr-Commit-Position: refs/heads/master@{#14803}
2016-10-27 16:04:25 +00:00
nisse
da35f3e3ce Delete unused features of rtc::FilesystemInterface and related classes.
Deleted methods:

DirectoryIterator::FileSize
DirectoryIterator::IsDots
DirectoryIterator::OlderThan

FilesystemInterface::CleanAppTempFolder
FilesystemInterface::CopyFileOrFolder
FilesystemInterface::CopyFolder
FilesystemInterface::CreatePrivateFile
FilesystemInterface::DeleteFileOrFolder
FilesystemInterface::GetAppPathname
FilesystemInterface::GetCurrentDirectory
FilesystemInterface::MoveFileOrFolder
FilesystemInterface::MoveFolder

Filesystem::CleanAppTempFolder
Filesystem::CopyFolder
Filesystem::CreatePrivateFile
Filesystem::CreateUniqueFile
Filesystem::DeleteEmptyFolder
Filesystem::GetAppPathname
Filesystem::GetCurrentDirectory
Filesystem::MoveFolder

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2445733002
Cr-Commit-Position: refs/heads/master@{#14800}
2016-10-27 11:44:43 +00:00
kjellander
a101e560b9 Remove LOGGING=1 define.
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}
2016-10-27 09:34:40 +00:00
terelius
91c2d43ced Disable TaskQueueTest.PostDelayed because of flakiness
BUG=webrtc:6610
NOTRY=True
TBR=tommi

Review-Url: https://codereview.webrtc.org/2456523002
Cr-Commit-Position: refs/heads/master@{#14790}
2016-10-26 16:04:35 +00:00
nisse
fcba8feeb8 Delete left-over file profiler_unittest.cc.
Was overlooked in cl https://codereview.webrtc.org/2374033002/

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2427283005
Cr-Commit-Position: refs/heads/master@{#14758}
2016-10-25 07:33:44 +00:00
minyue
a6f495c7c2 Simplifying audio network adaptor by moving receiver frame length range to ctor.
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}
2016-10-24 16:19:22 +00:00
danilchap
01404084aa Add tests and fix thread annotations
BUG=None
NOTRY=true

Review-Url: https://codereview.webrtc.org/2435293002
Cr-Commit-Position: refs/heads/master@{#14742}
2016-10-24 13:07:33 +00:00
nisse
d3c40089fa Delete always-zero ByteBufferWriter::start_.
Likely a left-over since cl https://codereview.webrtc.org/1821083002

BUG=None

Review-Url: https://codereview.webrtc.org/2440083002
Cr-Commit-Position: refs/heads/master@{#14732}
2016-10-24 08:06:23 +00:00
danilchap
97abf244ca Use variadic templates instead of pump for RefCountedObject
BUG=None

Review-Url: https://codereview.webrtc.org/2438013003
Cr-Commit-Position: refs/heads/master@{#14714}
2016-10-20 22:19:36 +00:00
jbroman
b9eaeba71f Return nullptr from RTCCertificate::FromPEM on failure.
BUG=webrtc:6488

Review-Url: https://codereview.webrtc.org/2424093002
Cr-Commit-Position: refs/heads/master@{#14710}
2016-10-20 17:27:27 +00:00
danilchap
e037060161 Add to rtc::Optional equality/unequality comparisions with object
BUG=None

Review-Url: https://codereview.webrtc.org/2432393002
Cr-Commit-Position: refs/heads/master@{#14690}
2016-10-20 07:58:31 +00:00
perkj
0489e498eb Change RefCountedObject to use perfect forwarding.
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}
2016-10-20 07:24:06 +00:00
danilchap
9e83c97e9f Add rtc::Optional::emplace
BUG=None

Review-Url: https://codereview.webrtc.org/2424063002
Cr-Commit-Position: refs/heads/master@{#14659}
2016-10-18 11:07:25 +00:00
ehmaldonado
5c639895fb Import build/config/clang/clang.gni in webrtc/base/BUILD.gn
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}
2016-10-17 19:28:48 +00:00
danilchap
c4fd23cdda Add rtc::Optional::reset
BUG=None

Review-Url: https://codereview.webrtc.org/2426473004
Cr-Commit-Position: refs/heads/master@{#14651}
2016-10-17 14:16:57 +00:00
kjellander
e40a7ee007 GN: Exclude suppressions of Chromium Clang warnings for Chromium builds.
These suppressions are causing GN errors when Chromium targets are depending
directly on WebRTC targets (needed for https://codereview.chromium.org/2413103004)

BUG=webrtc:4256
NOTRY=True

Review-Url: https://codereview.webrtc.org/2408133008
Cr-Commit-Position: refs/heads/master@{#14644}
2016-10-17 06:56:20 +00:00
erikchen
e606a172d4 Remove deprecated Gestalt methods.
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}
2016-10-10 18:19:22 +00:00
nisse
c7901c6491 Delete macsocketserver.h and related files.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2369013002
Cr-Commit-Position: refs/heads/master@{#14571}
2016-10-07 12:57:26 +00:00
ehmaldonado
2334b70851 Add support for component builds on Windows Swarming. Attempt 2
Some run time dependencies on MSVC were missing and had to be added to rtc_base_approved.

TBR=kjellander@webrtc.org
BUG=chromium:497757
NOTRY=True

Review-Url: https://codereview.webrtc.org/2402613002
Cr-Commit-Position: refs/heads/master@{#14566}
2016-10-07 09:47:45 +00:00
ehmaldonado
23345594e0 Revert of Add support for component builds on Windows Swarming. (patchset #2 id:100001 of https://codereview.webrtc.org/2389133002/ )
Reason for revert:
Causes compile errors.
https://build.chromium.org/p/client.webrtc/builders/Mac64%20Debug/builds/8646/steps/generate_build_files/logs/stdio

Original issue's description:
> Add support for component builds on Windows Swarming.
>
> Some runtime dependencies on MSVC were missing and had to be added to rtc_base_approved.
>
> BUG=chromium:497757
> NOTRY=True
>
> Committed: https://crrev.com/66d4ce93244d17eb52a409dde036fe9114937651
> Cr-Commit-Position: refs/heads/master@{#14562}

TBR=kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:497757

Review-Url: https://codereview.webrtc.org/2400953002
Cr-Commit-Position: refs/heads/master@{#14563}
2016-10-07 07:32:02 +00:00
ehmaldonado
66d4ce9324 Add support for component builds on Windows Swarming.
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}
2016-10-07 07:27:13 +00:00
nisse
8e7577c468 Revert of Delete transformadapter.cc and transformadapter.h. (patchset #2 id:20001 of https://codereview.webrtc.org/2368243002/ )
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}
2016-10-06 08:37:42 +00:00
nisse
2c3c3e2732 Delete transformadapter.cc and transformadapter.h.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2368243002
Cr-Commit-Position: refs/heads/master@{#14541}
2016-10-06 08:23:17 +00:00
erikchen
2ca8d5c430 Remove deprecated FSRef-manipulation methods.
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}
2016-10-05 23:04:39 +00:00
skvlad
efc5ae94f9 Fixed flaky SharedExclusiveLock tests.
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}
2016-10-05 22:58:18 +00:00
Magnus Jedvert
62b1c35d30 Android: Move layout measure code from SurfaceViewRenderer to RendererCommon
BUG=webrtc:6470
R=sakal@webrtc.org

Review URL: https://codereview.webrtc.org/2386253003 .

Cr-Commit-Position: refs/heads/master@{#14526}
2016-10-05 13:56:17 +00:00
ivoc
1f5a368978 Readded a check to see if STRICT_HTTP_ERROR is defined before using it's value.
NOTRY=true
BUG=webrtc:6424
TBR=perkj@webrtc.org,pthatcher@webrtc.org,nisse@webrtc.org

Review-Url: https://codereview.webrtc.org/2391133003
Cr-Commit-Position: refs/heads/master@{#14521}
2016-10-05 08:58:19 +00:00
nisse
81e007aee9 Delete profiler.h.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2374033002
Cr-Commit-Position: refs/heads/master@{#14519}
2016-10-05 08:45:59 +00:00
ivoc
3324cf751a Revert of Delete unused code httprequest, httpclient, and socketpool. (patchset #3 id:40001 of https://codereview.webrtc.org/2366333002/ )
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}
2016-10-05 08:23:21 +00:00
nisse
8a72369c2a Delete multipart.h.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2374013003
Cr-Commit-Position: refs/heads/master@{#14517}
2016-10-05 08:16:34 +00:00
nisse
4a255be379 Delete unused code httprequest, httpclient, and socketpool.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2366333002
Cr-Commit-Position: refs/heads/master@{#14514}
2016-10-05 06:29:55 +00:00
nisse
91e1a1abef Delete winfirewall.h.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2365363003
Cr-Commit-Position: refs/heads/master@{#14511}
2016-10-05 06:26:31 +00:00
nisse
2de66fe1c9 Delete unused file versionparsing.h.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2373003002
Cr-Commit-Position: refs/heads/master@{#14510}
2016-10-05 06:25:05 +00:00
kwiberg
5377bc77cc Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
The former is always defined (by webrtc/base/checks.h) to either 0 or
1, whereas the latter isn't necessarily defined.

This is a re-land of https://codereview.webrtc.org/2384693002, which
broke Chromium. We re-land without changing this CL at all, because
the thing that needed fixing was in Chromium:
https://codereview.chromium.org/2384263004.

NOTRY=true
TBR=ossu@webrtc.org
BUG=webrtc:6451

Review-Url: https://codereview.webrtc.org/2389943003
Cr-Commit-Position: refs/heads/master@{#14508}
2016-10-04 20:47:02 +00:00
skvlad
cd97b2b943 Switched flaky ProfilerTest to use fake clock
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}
2016-10-04 19:33:00 +00:00
nisse
409f573f8e Delete posix.h (RunAsDaemon).
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2367403002
Cr-Commit-Position: refs/heads/master@{#14502}
2016-10-04 14:52:02 +00:00
nisse
cacee524c1 Delete referencecountedsingletonfactory.h.
Unused since cl https://codereview.webrtc.org/1715043002

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2368123003
Cr-Commit-Position: refs/heads/master@{#14501}
2016-10-04 14:21:56 +00:00
nisse
085ec0e4b1 Delete sec_buffer.h.
Unused since cl https://codereview.webrtc.org/1383253002

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2373483002
Cr-Commit-Position: refs/heads/master@{#14500}
2016-10-04 13:46:00 +00:00
nisse
038a0851df Delete unused base/worker.{cc,h}.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2370793002
Cr-Commit-Position: refs/heads/master@{#14499}
2016-10-04 13:16:36 +00:00
nisse
312303340c Delete bandwidthsmoother.h.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2367213004
Cr-Commit-Position: refs/heads/master@{#14498}
2016-10-04 12:58:35 +00:00