472 Commits

Author SHA1 Message Date
honghaiz
db8cf50c59 Fix two problems in network.cc:
1. It signals network changed events whenever there are more than one IP address in a network.
2. It does not signal network changed events if a network disconnects and connects again.
Also changed DumpNetworks for better debugging.

BUG=webrtc:5096

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

Cr-Commit-Position: refs/heads/master@{#11107}
2015-12-21 21:08:54 +00:00
kjellander
2f042f26a3 Roll chromium_revision 1b6c421..db567a8 (365999:366304)
I had to disable some Dtls12Both tests failing under MSan (see bug).
Notice those errors started happening in the range of
https://boringssl.googlesource.com/boringssl.git/+log/afd565f..9f897b2
while this CL brings in an even newer BoringSSL (that still has the same problem).

Change log: 1b6c421..db567a8
Full diff: 1b6c421..db567a8

Changed dependencies:
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/afd565f..afe57cb
* src/third_party/libyuv: 1019e45..1ccbf8f
* src/third_party/nss: a676aa0..aee1b12
DEPS diff: 1b6c421..db567a8/DEPS

No update to Clang.

NOTRY=True
BUG=webrtc:5381
TBR=torbjorng@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11095}
2015-12-20 20:25:17 +00:00
tfarina
c155b16b22 remove deprecated StringToIP() methods from SocketAddress API
This patch removes StringToIP() methods as fixes the TODO there and
there are no callers at the moment for these methods.

BUG=None
R=perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11088}
2015-12-18 16:13:16 +00:00
Peter Boström
455a252453 Fix pointer compare-and-swap on Windows.
Incorrect argument order, also added unittest which should've been there
in the first place.

Also renames AtomicLoadPtr to AcquireLoadPtr to match non-ptr version.

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11086}
2015-12-18 16:00:35 +00:00
tfarina
c1cd566cc6 delete basictypes.h header
We have updated the uses of ARRAY_SIZE to arraysize in past patches:

5237aaf243
fa5d0dbd1e

BUG=None
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11085}
2015-12-18 15:33:09 +00:00
jbauch
095ae15d6b Keep listening if "accept" returns an invalid socket.
There is an issue in PhysicalSocket::Accept where the flag to continue
listening is not set in "enabled_events_" if "accept" returns an error.
This CL fixes this (initial idea by silviu.cpp@gmail.com).

BUG=webrtc:2030

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

Cr-Commit-Position: refs/heads/master@{#11080}
2015-12-18 09:40:03 +00:00
guoweis
efb047d2dd Compilation failed with openssl.
Missing a cast.

BUG=webrtc:5365

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

Cr-Commit-Position: refs/heads/master@{#11074}
2015-12-17 21:45:03 +00:00
kwiberg
9390f84a4a Use std::nullptr_t instead of decltype(nullptr)
Review URL: https://codereview.webrtc.org/1531173003

Cr-Commit-Position: refs/heads/master@{#11068}
2015-12-17 14:20:32 +00:00
kwiberg
0eb15ed7b8 Don't call the Pass methods of rtc::Buffer, rtc::scoped_ptr, and rtc::ScopedVector
We can now use std::move instead!

This CL leaves the Pass methods in place; a follow-up CL will add deprecation annotations to them.

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

Cr-Commit-Position: refs/heads/master@{#11064}
2015-12-17 11:04:24 +00:00
torbjorng
a08925791c Cleanup use of "do { ... } while (0)".
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11061}
2015-12-17 02:38:34 +00:00
kjellander
7cae30cbe1 Disable warnings failing when using Clang on Windows.
This makes it possible to build WebRTC using Clang on Windows.
Depends on https://codereview.webrtc.org/1524703006/

BUG=webrtc:5360, webrtc:5366
NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#11058}
2015-12-16 22:05:36 +00:00
kjellander@webrtc.org
361888c324 OWNERS: Add * to .gyp{i,} everywhere.
Also convert DOS->Unix line endings in two of the OWNERS files.

NOTRY=True
NOPRESUBMIT=True
R=niklas.enbom@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11056}
2015-12-16 19:44:39 +00:00
kwiberg
45fd9fe92c New macro: RTC_DEPRECATED (for annotating deprecated functions)
Review URL: https://codereview.webrtc.org/1494133003

Cr-Commit-Position: refs/heads/master@{#11042}
2015-12-16 09:09:25 +00:00
henrikg
ac921d7365 Add "x"s in the end of a stripped IPv6 address string.
This makes it clearer that the IP address has been stripped.

BUG=chromium:254329

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

Cr-Commit-Position: refs/heads/master@{#11005}
2015-12-14 10:07:08 +00:00
hjon
aa32c3e537 Update API for Objective-C RTCIceServer
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11000}
2015-12-14 03:58:19 +00:00
Tommi
f888bb58da Support for unmixed remote audio into tracks.
BUG=chromium:121673
R=solenberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10995}
2015-12-12 00:37:14 +00:00
Peter Boström
43e4e23eeb Remove thread-id wraparounds in event tracing.
Prints tid as a DWORD on Windows and an int on other systems.

BUG=
R=thakis@chromium.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10992}
2015-12-11 19:29:47 +00:00
hans
55bcf0f087 Fix -Wformat error in Win-Clang build (take 2)
I managed to cast the wrong parameter in #10982 :-(

BUG=82385

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

Cr-Commit-Position: refs/heads/master@{#10983}
2015-12-11 03:49:30 +00:00
Niklas Enbom
013e83b31c Fix -Wformat error in Win-Clang build
rtc::PlatformThreadId is pid_t (32-bit signed int) on Linux and Mac,
but DWORD (32-bit unsigned int) on Windows.

Using the %d printf specifier is therefore not correct on Windows,
and Clang would warn about it:

..\..\third_party\webrtc\base\event_tracer.cc(124,46) :  error: format specifies
type 'int' but the argument has type 'rtc::PlatformThreadId' (aka 'unsigned
long') [-Werror,-Wformat]
                e.phase, e.timestamp, e.pid, e.tid);
                                             ^~~~~

This commit fixes the problem by explicitly casting to int before printing.

BUG=82385

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

Cr-Commit-Position: refs/heads/master@{#10982}
2015-12-11 00:17:03 +00:00
thakis
61a90f94b6 clang/win: Fix -Wextra warnings in webrtc.
Fixes one sign mismatch warning, and one "const has no effect and is
ignored" warning.

BUG=chromium:567877

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

Cr-Commit-Position: refs/heads/master@{#10976}
2015-12-10 18:50:36 +00:00
terelius
84e78f9102 Rewrote the PRNG using an xorshift* algorithm and moved the files from test/ to base/.
Created a simple unit test for the new random number generator. (It mostly tests
that the generated numbers are consistent with the intended distribution, e.g. uniform.
It is not a comprehensive test of the quality of the random numbers.)

Several assertions in OveruseDetectorTest seem to depend on the exact sequence of random numbers. I updated those numbers to work with the new PRNG.

Compute the standard deviation of the expected result in TestReorderFilter instead of passing an uncertainty parameter.

BUG=webrtc:5177

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

Cr-Commit-Position: refs/heads/master@{#10965}
2015-12-10 09:51:02 +00:00
Guo-wei Shieh
ee4082137b WebRTC: Update set of known root certificates
Also included the script which generates this file.

TBR=juberti@webrtc.org
BUG=526258

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

Cr-Commit-Position: refs/heads/master@{#10957}
2015-12-09 19:25:44 +00:00
hbos
3980d46960 RTCCertificate::Expires() and ::HasExpired() implemented using SSLCertificate::CertificateExpirationTime().
This is a re-upload of https://codereview.webrtc.org/1494103003 which was reverted and now re-landing.

BUG=chromium:544894

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

Cr-Commit-Position: refs/heads/master@{#10951}
2015-12-09 13:26:54 +00:00
haysc
d02b0fab76 Add oldest rotation type option to RTCFileLogger
BUG=

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

Cr-Commit-Position: refs/heads/master@{#10945}
2015-12-08 21:59:11 +00:00
haysc
edd8fefa9b Add new view that renders local video using AVCaptureLayerPreview.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#10940}
2015-12-08 19:08:44 +00:00
hbos
cd6f539a08 Revert of RTCCertificate::Expires() and ::HasExpired() implemented (patchset #5 id:140001 of https://codereview.webrtc.org/1494103003/ )
Reason for revert:
RTCCertificate's expires_timestamp_ns was renamed to Expires but the old function is still used in one place in Chromium...
https://uberchromegw.corp.google.com/i/chromium.webrtc.fyi/builders/Mac%20Builder/builds/7405

Original issue's description:
> RTCCertificate::Expires() and ::HasExpired() implemented using SSLCertificate::CertificateExpirationTime().
>
> NOPRESUBMIT=true
> BUG=chromium:544894
>
> Committed: https://crrev.com/20ef654174e245b3a06c9e9045bb97be9acd90cf
> Cr-Commit-Position: refs/heads/master@{#10930}

TBR=torbjorng@webrtc.org,hta@webrtc.org,kjellander@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:544894

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

Cr-Commit-Position: refs/heads/master@{#10933}
2015-12-08 10:32:19 +00:00
hbos
20ef654174 RTCCertificate::Expires() and ::HasExpired() implemented using SSLCertificate::CertificateExpirationTime().
NOPRESUBMIT=true
BUG=chromium:544894

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

Cr-Commit-Position: refs/heads/master@{#10930}
2015-12-08 09:42:46 +00:00
pbos
46ad5426b0 Revert of "Create rtc::AtomicInt POD struct." (patchset #3 id:40001 of https://codereview.webrtc.org/1498953002/ )
Reason for revert:
Broke downstream compile step, possibly relandable when using a MSVC version that has constexpr, other than that I'm out of ideas.

.../webrtc/base/atomicops.h:71:8: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const rtc::AtomicInt&'

Original issue's description:
> Reland of "Create rtc::AtomicInt POD struct."
>
> Relands https://codereview.webrtc.org/1420043008/ with brace initializers
> instead of constructors hoping that they won't introduce static
> initializers.
>
> BUG=
> R=tommi@webrtc.org
>
> Committed: https://crrev.com/84f0970d100e67a1dc4fe9a1b16b7d293302044e
> Cr-Commit-Position: refs/heads/master@{#10920}

TBR=tommi@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#10922}
2015-12-07 22:29:21 +00:00
Peter Boström
6f28cf0b95 Implement standalone event tracing in AppRTCDemo.
Logs tracing events (TRACE_EVENT0 and friends) to storage in a format
compatible with chrome://tracing which can be used for performance
evaluation, finding lock contention and other sweet things). Tracing is
still basic and doesn't contain thread metadata or logging of tracing
arguments.

BUG=webrtc:5158
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10921}
2015-12-07 22:17:26 +00:00
Peter Boström
84f0970d10 Reland of "Create rtc::AtomicInt POD struct."
Relands https://codereview.webrtc.org/1420043008/ with brace initializers
instead of constructors hoping that they won't introduce static
initializers.

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10920}
2015-12-07 22:07:11 +00:00
Torbjorn Granlund
46c9cc0190 Provide method for returning certificate expiration time stamp.
We convert ASN1 time via std::tm to int64_t representing milliseconds-since-epoch. We do not use time_t since that cannot store milliseconds, and expires for 32-bit platforms in 2038 also for seconds.

Conversion via std::tm might might seem silly, but actually doesn't add any complexity.

One would expect tm -> seconds-since-epoch to already exist on the standard library. There is mktime, but it uses localtime (and sets an environment variable, and has the 2038 problem).

The ASN1 TIME parsing is limited to what is required by RFC 5280.

BUG=webrtc:5150
R=hbos@webrtc.org, nisse@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10854}
2015-12-01 12:06:46 +00:00
perkj
14f4144a82 Add helper KeepRefUntilDone.
The callback keeps a reference to an object until the callback goes out of scope.

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

Cr-Commit-Position: refs/heads/master@{#10847}
2015-12-01 06:15:53 +00:00
Peter Boström
def58203a1 Default to LS_INFO logging for release builds.
Increases default loglevel for test targets to LS_INFO, which is a no-op
for debug builds but increases logging on release builds.

This is to present better debug info on buildbots when test runs fail.

BUG=
R=henrikg@webrtc.org, kjellander@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10826}
2015-11-27 16:53:31 +00:00
tkchin
42f580e490 Leaving all original files in talk/app/webrtc/objc until we can officially tell clients about the new locations.
Also changes presubmit script to not run cpplint on objc dirs.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#10815}
2015-11-27 07:18:28 +00:00
Peter Boström
8c38e8b9b9 Clean up PlatformThread.
* Move PlatformThread to rtc::.
* Remove ::CreateThread factory method.
* Make non-scoped_ptr from a lot of invocations.
* Make Start/Stop void.
* Remove rtc::Thread priorities, which were unused and would collide.
* Add ::IsRunning() to PlatformThread.

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10812}
2015-11-26 16:45:57 +00:00
Peter Boström
fd5dae395b Build/use constructormagic.h unconditionally.
These macros no longer collide with Chromium since they are prefixed
with RTC_.

BUG=
R=henrikg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10801}
2015-11-26 11:54:32 +00:00
Peter Boström
cdb38e5397 Strip IP addresses in NDEBUG (release) builds.
Also removes the ability to override (set) this.

BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10796}
2015-11-25 23:36:20 +00:00
Guo-wei Shieh
a34c39e549 GetDefaultLocalAddress should return false when the address is invalid
BUG=
R=pthatcher@webrtc.org

Committed: https://crrev.com/67c6df6153b7b6dceb2b569daf683a498b2fc13c
Cr-Commit-Position: refs/heads/master@{#10779}

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

Cr-Commit-Position: refs/heads/master@{#10794}
2015-11-25 21:12:34 +00:00
Peter Boström
11e022904d Move Chromium logging into rtc_base_approved.
The corresponding set of overrides weren't moved when logging.cc etc.
was moved over. This wasn't noticed because all existing targets before
webrtc fuzzers used to link both rtc_base and rtc_base_approved in
Chromium. Also adding //base:base as a dependency, this used to be
linked in by other targets either way before but generated build errors
when a target solely depends on rtc_base_approved.

BUG=webrtc:4771
R=kjellander@webrtc.org
TBR=henrikg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10792}
2015-11-25 20:40:13 +00:00
deadbeef
fac0655fd7 Reland of Adding the ability to create an RtpSender without a track.
(patchset #8 id:140001 of https://codereview.webrtc.org/1413713003/ )

Relanding after fixing CallAndModifyStream to account for new
procedures for adding/removing a track from a stream.

Original issue's description:
> Adding the ability to create an RtpSender without a track.
>
> This CL also changes AddStream to immediately create a sender, rather
> than waiting until the track is seen in SDP. And the PeerConnection now
> builds the list of "send streams" from the list of senders, rather than
> the collection of local media streams.
>
> Committed: https://crrev.com/ac9d92ccbe2b29590c53f702e11dc625820480d5
> Cr-Commit-Position: refs/heads/master@{#10414}

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

Cr-Commit-Position: refs/heads/master@{#10790}
2015-11-25 19:26:08 +00:00
Guo-wei Shieh
953eabc027 Revert "GetDefaultLocalAddress should return false when the address is invalid"
This reverts commit 67c6df6153b7b6dceb2b569daf683a498b2fc13c.

TBR=pthatcher@webrtc.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#10780}
2015-11-24 20:00:38 +00:00
Guo-wei Shieh
67c6df6153 GetDefaultLocalAddress should return false when the address is invalid
BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10779}
2015-11-24 19:59:26 +00:00
Peter Boström
7d842d660e Move thread_ conditional back under defines.
Unbreaks Windows builds.

BUG=
TBR=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10778}
2015-11-24 17:23:29 +00:00
Peter Boström
c661213a63 Skip setting thread priorities in NaCl.
Fixes Chromium build since PlatformThread is now built under NaCl.

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10777}
2015-11-24 17:10:36 +00:00
kwiberg
c3ddb3e127 Improve documentation for ArrayView
Review URL: https://codereview.webrtc.org/1468183003

Cr-Commit-Position: refs/heads/master@{#10775}
2015-11-24 16:59:40 +00:00
Peter Boström
97c821dc56 Inline ConvertToSystemPriority.
Unused function when building Chromium, triggered build errors when
importing webrtc.

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10768}
2015-11-24 12:48:20 +00:00
kjellander
70bed7d415 GN: Fix iOS error in audio_device and rtc_base
With this in, the only compilation errors left seems
related to yasm and libjpeg_turbo.
Notice the below example builds x86 builds (not ARM) since if
specifying target_cpu="arm", the gn step fails (separate issue).

BUG=webrtc:5213, webrtc:5195, chromium:459705
TESTED=Passing compilation with:
gn gen --args="target_os=\"ios\"" out/Default
ninja -C out/Default rtc_base audio_device

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

Cr-Commit-Position: refs/heads/master@{#10763}
2015-11-24 01:23:47 +00:00
pbos
12411ef40e Move ThreadWrapper to ProcessThread in base.
Also removes all virtual methods. Permits using a thread from
rtc_base_approved (namely event tracing).

BUG=webrtc:5158
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10760}
2015-11-23 22:48:01 +00:00
kwiberg
74e35f1d62 Remove the special case for std::vector in rtc::ArrayView
We don't need it anymore now that we can use std::vector::data().

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

Cr-Commit-Position: refs/heads/master@{#10755}
2015-11-23 14:54:56 +00:00
deadbeef
5def7b9fde Revert of Adding the ability to create an RtpSender without a track. (patchset #3 id:300001 of https://codereview.webrtc.org/1413983004/ )
Reason for revert:
Still breaking CallAndModifyStream. Chromium CL intended to fix it (https://codereview.chromium.org/1435713002/) wasn't sufficient, because I forgot to call addStream/removeStream on the second connection.

Original issue's description:
> Reland of Adding the ability to create an RtpSender without a track. (patchset #1 id:1 of https://codereview.webrtc.org/1426443007/ )
>
> Reason for revert:
> Relanding, after changing the expectations of WebRtcBrowserTest.CallAndModifyStream.
>
> Original issue's description:
> > Revert of Adding the ability to create an RtpSender without a track. (patchset #8 id:140001 of https://codereview.webrtc.org/1413713003/ )
> >
> > Reason for revert:
> > Causing a compiler warning, and causing WebRtcBrowserTest.CallAndModifyStream to fail.
> >
> > Original issue's description:
> > > Adding the ability to create an RtpSender without a track.
> > >
> > > This CL also changes AddStream to immediately create a sender, rather
> > > than waiting until the track is seen in SDP. And the PeerConnection now
> > > builds the list of "send streams" from the list of senders, rather than
> > > the collection of local media streams.
> > >
> > > Committed: https://crrev.com/ac9d92ccbe2b29590c53f702e11dc625820480d5
> > > Cr-Commit-Position: refs/heads/master@{#10414}
> >
> > TBR=pthatcher@webrtc.org,pthatcher@chromium.org
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> >
> > Committed: https://crrev.com/8f46c63f6f764254892f4111b54aa1cc8f32eeeb
> > Cr-Commit-Position: refs/heads/master@{#10417}
>
> TBR=pthatcher@webrtc.org,pthatcher@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/6834fa10f142bf5e2275142acb834898911d09ae
> Cr-Commit-Position: refs/heads/master@{#10730}

TBR=pthatcher@webrtc.org,pthatcher@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#10732}
2015-11-20 19:43:27 +00:00