190 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
tfarina
fa5d0dbd1e cleanup: get rid of basicdefs.h include
The ARRAY_SIZE macro it defines is not used anymore, as all the usages
were converted to arraysize macro from arraysize.h.

BUG=None
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10640}
2015-11-13 22:37:43 +00:00
Karl Wiberg
be57983f4b Rename Maybe to Optional
And add examples of good and bad usage to the documentation.

R=aluebs@webrtc.org, henrik.lundin@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10588}
2015-11-10 21:34:32 +00:00
Karl Wiberg
e2a83eee73 Introduce rtc::ArrayView<T>, which keeps track of an array that it doesn't own
The main intended use case is as a function argument, replacing the
harder-to-read and harder-to-use separate pointer and size arguments.
It's easier to read because it's just one argument instead of two, and
with clearly defined semantics; it's easier to use because it has
iterators, and will automatically figure out the size of arrays.

BUG=webrtc:5028
R=andrew@webrtc.org, solenberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10415}
2015-10-26 18:51:42 +00:00
Karl Wiberg
6e587200db Introduce rtc::Maybe<T>, which either contains a T or not.
It's a simple std::experimental::optional-wannabe. For simplicity and
portability, it still secretly contains a (default-constructed) T when
it's supposedly empty. This restriction is fine for simple types.

One important application is for the return type of functions. For
example, a function which either returns a size_t or fails can return
rtc::Maybe<size_t>.

BUG=webrtc:5028
R=andrew@webrtc.org, mgraczyk@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#10353}
2015-10-21 10:44:17 +00:00
honghaiz
023f3ef029 Create network change notifier and pass the event to NetworkManager
BUG=

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

Cr-Commit-Position: refs/heads/master@{#10325}
2015-10-19 16:39:38 +00:00
torbjorng
172f009be2 Get rid of SCHANNEL code.
BUG=webrtc:5045

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

Cr-Commit-Position: refs/heads/master@{#10199}
2015-10-07 11:58:00 +00:00
henrikg
990d57dc65 Fix file order in base.gyp.
Review URL: https://codereview.webrtc.org/1386613003

Cr-Commit-Position: refs/heads/master@{#10164}
2015-10-05 08:22:32 +00:00
henrikg
9dff0ba8c1 Fix MSVS project files generation.
BUG=5044
TBR=kjellander@webrtc.org
TEST=Runhooks with GYP_GENERATORS=msvs-ninja

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

Cr-Commit-Position: refs/heads/master@{#10151}
2015-10-02 17:07:58 +00:00
henrikg
ee2bf41a79 Update build files to use webrtc_overrides in Chromium instead of overrides.
This re-lands https://codereview.webrtc.org/1354933002/

This is a part of moving the overrides to Chromium. See bug comment #65 for all steps.

Depends on https://codereview.chromium.org/1345873004/

BUG=chromium:468375

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

Cr-Commit-Position: refs/heads/master@{#10115}
2015-09-30 10:49:11 +00:00
torbjorng
07d09364b0 Purge nss files and dependencies.
This replaces https://codereview.webrtc.org/1313233005
which was reverted after triggering Chromium issues.
The only difference is that we're cleaned up dependencies
on use_openssl from the gyp file.

Since https://codereview.chromium.org/1358913003 landed,
this CL should cause no Chromium issues.

BUG=webrtc:4497

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

Cr-Commit-Position: refs/heads/master@{#10019}
2015-09-22 18:58:13 +00:00
henrikg
40bf493754 Revert of Update build files to use webrtc_overrides in Chromium instead of overrides. (patchset #2 id:20001 of https://codereview.webrtc.org/1354933002/ )
Reason for revert:
Breaks FYI bots.

ninja: error: '../../third_party/webrtc_overrides/webrtc/base/logging.cc', needed by 'obj/third_party/webrtc_overrides/webrtc/base/rtc_base.logging.o', missing and no known rule to make it

Original issue's description:
> Update build files to use webrtc_overrides in Chromium instead of overrides.
>
> This is a part of moving the overrides to Chromium. See bug comment #65 for all steps.
>
> BUG=chromium:468375
>
> Committed: https://crrev.com/baae0a8a6c873ddf812a5687b84638359b2e7e5b
> Cr-Commit-Position: refs/heads/master@{#9996}

TBR=kjellander@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:468375

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

Cr-Commit-Position: refs/heads/master@{#9998}
2015-09-21 10:29:31 +00:00
henrikg
baae0a8a6c Update build files to use webrtc_overrides in Chromium instead of overrides.
This is a part of moving the overrides to Chromium. See bug comment #65 for all steps.

BUG=chromium:468375

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

Cr-Commit-Position: refs/heads/master@{#9996}
2015-09-21 09:53:05 +00:00
henrikg
71df77bba0 Remove overridden basictypes.h.
* Use (u)intxx_t for (u)intxx typedefs for all platforms.
* Always include stdint.h.
* Add RTC_ prefix to ARCH_XXX macros.

Chromium did the (u)intxx_t change in
https://codereview.chromium.org/117323010 and
https://codereview.chromium.org/639293007

BUG=chromium:468375
TBR=perkj@webrtc.org (for trivial talk/* changes)
NOTRY=true
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#9983}
2015-09-18 08:48:39 +00:00
deadbeef
9eb1365939 Revert of purge nss files and dependencies (patchset #1 id:1 of https://codereview.webrtc.org/1313233005/ )
Reason for revert:
It looks like this broke the FYI bots. I tried updating libjingle_nacl.gyp, but the IOS build still failed because in Chrome it's configured to use NSS. See https://codereview.chromium.org/1316863012/.

Original issue's description:
> purge nss files and dependencies
>
> BUG=webrtc:4497
>
> Committed: https://crrev.com/5647a2cf3db888195c928a1259d98f72f6ecbc15
> Cr-Commit-Position: refs/heads/master@{#9862}

TBR=tommi@webrtc.org,kjellander@webrtc.org,torbjorng@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4497

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

Cr-Commit-Position: refs/heads/master@{#9867}
2015-09-05 11:39:24 +00:00
torbjorng
5647a2cf3d purge nss files and dependencies
BUG=webrtc:4497

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

Cr-Commit-Position: refs/heads/master@{#9862}
2015-09-04 15:12:00 +00:00
Peter Thatcher
d415629de7 Remove AsyncHttpRequest, AutoPortAllocator, ConnectivityChecker, and HttpPortAllocator.
BUG=webrtc:4149, webrtc:4456
R=deadbeef@webrtc.org, pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9857}
2015-09-04 11:21:14 +00:00
tommi
efefda6062 Move SystemInfo to rtc_base_approved and delete unused code.
This cl removes a lot of unused functionality in SystemInfo and reduces dependencies.
There's duplicate functionality in this class and WebRTC's CpuInfo class, so I'm consolidating the two implementations.
The CpuInfo interface will still exist since it's being used from Chrome to initialize the core count before the sandbox is engaged.
With this change, the SystemInfo class will get the benefit too of this initialization.

NOTRY=true
(using no try due to a dead android try bot)

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

Cr-Commit-Position: refs/heads/master@{#9743}
2015-08-20 12:04:18 +00:00
Henrik Boström
41b3a384f4 Adds RTCCertificate, a reference counted object indirectly owning an SSLCertificate (by owning the SSLIdentity).
BUG=webrtc:4927
R=tommi@chromium.org, tommi@webrtc.org, torbjorng@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9741}
2015-08-20 10:16:04 +00:00
tommi
048e80caca Revert of Revert "Remove CpuMonitor and related, unused, code." (patchset #1 id:1 of https://codereview.webrtc.org/1287913004/ )
Reason for revert:
(retrying with my webrtc account...)
The reason for reverting is: Re-landing the change that removes the CpuMonitor class after having fixed the build issue in Chromium..

Original issue's description:
> Revert "Remove CpuMonitor and related, unused, code."
>
> This reverts commit 1a24012680f25440aa1d117373df2af14cdc2fc1.
>
> TBR=tommi@webrtc.org,pthatcher@webrtc.org
> BUG=
>
> This breaks
> http://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux/builds/20148/steps/compile/logs/stdio
>
> Committed: a472e968c9

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

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

Cr-Commit-Position: refs/heads/master@{#9733}
2015-08-19 11:00:04 +00:00
Tommi
c844ca425e Move scoped_ptr.h to rtc_base_approved.
This is more a formality than anything since scoped_ptr.h is already being included from rtc_base_approved code.

BUG=
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9732}
2015-08-19 08:51:31 +00:00
Guo-wei Shieh
a472e968c9 Revert "Remove CpuMonitor and related, unused, code."
This reverts commit 1a24012680f25440aa1d117373df2af14cdc2fc1.

TBR=tommi@webrtc.org,pthatcher@webrtc.org
BUG=

This breaks
http://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux/builds/20148/steps/compile/logs/stdio

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

Cr-Commit-Position: refs/heads/master@{#9730}
2015-08-19 00:08:50 +00:00
Tommi
1a24012680 Remove CpuMonitor and related, unused, code.
BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9727}
2015-08-18 20:14:45 +00:00
tkchin
934119111e Provides log sinks for rotating logs. Intended for use on mobile devices to record call logs.
BUG=4838

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

Cr-Commit-Position: refs/heads/master@{#9615}
2015-07-22 19:12:22 +00:00
Zeke Chin
2d3b7e2173 AppRTCDemo file logging.
Adds logging macros to log logs to a file. Undeletes CircularFileStream
for that purpose.

BUG=
R=jiayl@webrtc.org, pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9582}
2015-07-14 19:55:56 +00:00
Peter Boström
2ee2439a1f Merge video_engine_core into webrtc target.
Merges the two video targets since video_engine is no longer usable
standalone.

BUG=webrtc:1695
R=mflodman@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9479}
2015-06-22 05:57:26 +00:00
Guo-wei Shieh
dc13abc331 Initially when the design was to do this experiment in browser, which doesn't have webrtc code, it requires some glue code to bridge the difference between what's available in webrtc::base and browser process. Now since we're moving to renderer process, we could reuse a lot of existing interfaces instead of rolling our own.
BUG=webrtc:4576
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9466}
2015-06-18 21:44:46 +00:00
Tommi
23edcff7a9 Move base/logging.* to rtc_base_approved.
BUG=
R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/47299004

Cr-Commit-Position: refs/heads/master@{#9272}
2015-05-25 08:45:51 +00:00
Joachim Bauch
6f2ef74b42 Keep track of DTLS packet sizes to prevent partial reads.
The current use of rtc::FifoBuffer can lead to reading across DTLS packet
boundaries which could cause packets to not being processed correctly.

This CL introduces the new class rtc::BufferQueue and changes the
StreamInterfaceChannel to use it instead of the rtc::FifoBuffer.

BUG=chromium:447431
R=juberti@google.com

Review URL: https://webrtc-codereview.appspot.com/52509004

Cr-Commit-Position: refs/heads/master@{#9254}
2015-05-21 15:51:41 +00:00
Yuriy Shevchuk
02ff9117b5 Feature merge request:
Add support for iOS http proxy detection

R=pthatcher@webrtc.org, tkchin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/45439004

Patch from Yuriy Shevchuk <youwrk@gmail.com>.

Cr-Commit-Position: refs/heads/master@{#9250}
2015-05-21 11:50:41 +00:00
Donald E Curtis
5ece00f7fa remove filelock which is now unused
R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51859004

Cr-Commit-Position: refs/heads/master@{#9222}
2015-05-19 18:07:02 +00:00
Tommi
bebc69010d Add platform_thread source files and move types from thread_checker_impl to there.
BUG=
R=henrika@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/52529004

Cr-Commit-Position: refs/heads/master@{#9201}
2015-05-18 07:51:16 +00:00
Henrik Kjellander
4cd6940e49 Enable -Wformat-security warning and cleanup GYP.
Enable the -Wformat-security and -Wformat warnings for talk/.

Remove *.def and *.h.pump files from webrtc/base/base.gyp since they're not supported by some tools.

BUG=4242
R=henrika@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/49969004

Cr-Commit-Position: refs/heads/master@{#9191}
2015-05-15 07:10:32 +00:00
Peter Boström
ff019b0b55 Move rtc::AtomicOps to webrtc/base/atomicops.h.
Removes FixedSizeLockFreeQueue which isn't used anymore. This enabled
moving rtc::AtomicOps to webrtc/base/atomicops.h where they should be.

BUG=4330
R=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51789004

Cr-Commit-Position: refs/heads/master@{#9120}
2015-04-30 12:16:14 +00:00
Tommi
494f20977e Move CriticalSection into rtc_base_approved.
This class is being used from both libjingle and webrtc but we recently had a regression when we added dependency on libjingle's Thread class. This cleans that up and moves the implementation of CriticalSection and helper classes into the source file.

I'm also improving debugging facilities and constness.

BUG=
R=magjed@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51769004

Cr-Commit-Position: refs/heads/master@{#9089}
2015-04-27 15:39:00 +00:00
Noah Richards
915590e41f Moved ByteBuffer/BitBuffer into rtc_base_approved.
Also pulls in constructormagic.h, byteorder.h, and basictypes.h.

BUG=
R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/49069004

Cr-Commit-Position: refs/heads/master@{#9062}
2015-04-22 22:42:53 +00:00
Noah Richards
bbf7c864ad Add a new BitBuffer class to webrtc base.
Provides a read-only interface for reading byte and bit-sized data from
an underlying buffer in network/big-endian order. Also provides a method
for reading exponential golomb encoded values, which will be useful in
H.264 packet parsing (separate CL).

BUG=
R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/49719004

Cr-Commit-Position: refs/heads/master@{#9046}
2015-04-21 23:29:53 +00:00
Karl Wiberg
9478437fde rtc::Buffer improvements
1. Constructors, SetData(), and AppendData() now accept uint8_t*,
     int8_t*, and char*. Previously, they accepted void*, meaning that
     any kind of pointer was accepted. I think requiring an explicit
     cast in cases where the input array isn't already of a byte-sized
     type is a better compromise between convenience and safety.

  2. data() can now return a uint8_t* instead of a char*, which seems
     more appropriate for a byte array, and is harder to mix up with
     zero-terminated C strings. data<int8_t>() is also available so
     that callers that want that type instead won't have to cast, as
     is data<char>() (which remains the default until all existing
     callers have been fixed).

  3. Constructors, SetData(), and AppendData() now accept arrays
     natively, not just decayed to pointers. The advantage of this is
     that callers don't have to pass the size separately.

  4. There are new constructors that allow setting size and capacity
     without initializing the array. Previously, this had to be done
     separately after construction.

  5. Instead of TransferTo(), Buffer now supports swap(), and move
     construction and assignment, and has a Pass() method that works
     just like std::move(). (The Pass method is modeled after
     scoped_ptr::Pass().)

R=jmarusic@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/42989004

Cr-Commit-Position: refs/heads/master@{#9033}
2015-04-20 12:03:00 +00:00
Henrik Kjellander
ca047f76a3 Stop building NSS on Windows.
Since the GYP variables use_openssl and build_ssl are both
enabled by default on Windows today, I believe we should be able
to clean up the GYP paths that build NSS for Windows.

BUG=4497
TESTED=Passing tryjobs with --clobber specified.
R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/50559004

Cr-Commit-Position: refs/heads/master@{#8945}
2015-04-08 06:54:13 +00:00
Thiago Farina
0dd58026a8 Update callers to include messagedigest.h.
And remove pass-through stringdigest.h include.

This should fix the TODO in stringdigest.h that were that saying to update the callers to the new location.

BUG=None
TEST=ninja -C out/Debug still works fine
R=henrika@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/48779004

Patch from Thiago Farina <tfarina@chromium.org>.

Cr-Commit-Position: refs/heads/master@{#8920}
2015-04-02 07:03:28 +00:00
Jiayang Liu
bef8d2d020 Add a lock to NSSContext to fix data race
BUG=crbug/466784
R=juberti@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/44669005

Cr-Commit-Position: refs/heads/master@{#8871}
2015-03-26 21:38:53 +00:00
tommi@webrtc.org
7c64ed2e0c Move trace_event and associated files to webrtc/base.
Also starting to use TRACE_EVENT from thread.cc in webrtc/base, to track Invoke() calls.

BUG=
R=magjed@webrtc.org, tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/42769004

Cr-Commit-Position: refs/heads/master@{#8755}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8755 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-17 14:26:15 +00:00
kwiberg@webrtc.org
dad85aa53b Chromium build fix: Include new .cc files in rtc_base
r8656 added a couple of new .cc files to rtc_base. Two of them turned
out to mistakenly be in the set excluded from the Chromium build.

TBR=kjellander@webrtc.org, tommi@webrtc.org
BUG=163

Review URL: https://webrtc-codereview.appspot.com/44589004

Cr-Commit-Position: refs/heads/master@{#8659}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8659 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-10 01:00:17 +00:00