4673 Commits

Author SHA1 Message Date
kwiberg
d59d3bb117 Replace a DCHECK with static_assert
This requires marking a bunch of compile-time constants "constexpr"
instead of just "const".

Review-Url: https://codereview.webrtc.org/2335483003
Cr-Commit-Position: refs/heads/master@{#14199}
2016-09-13 14:49:41 +00:00
brandtr
6631e8a21b Minor fixes in FEC and RtpSender{,Video}
- Rename GetNumberOfFecPackets -> NumFecPackets and
  PacketOverhead -> MaxPacketOverhead in ForwardErrorCorrection.
- Rename FECPacketOverhead -> FecPacketOverhead in ProducerFec.
- Move ownership of ForwardErrorCorrection from RTPSenderVideo
  to ProducerFec.
- Make MaxPacketOverhead a member function of ForwardErrorCorrection.
  This will allow for changing it, based on FEC header types, later on.

BUG=webrtc:5654

Review-Url: https://codereview.webrtc.org/2275443002
Cr-Commit-Position: refs/heads/master@{#14194}
2016-09-13 10:23:34 +00:00
peah
88ac853e14 The current scheme for setting parameters and specifying the
behavior of the audio processing module is quite complex and hard to
implement in a threadsafe and efficient manner. Therefore a new
scheme for setting the parameters in the audio processing module is
introduced in this CL.

The idea is to roll this scheme out gradually and as a first functionality
in the audio processing module where this is applied the level controller
was chosen. This CL includes the replacement of the Config-based
level controller scheme with the new scheme.

TBR=henrik.lundin@webrtc.org, solenberg@webrtc.org,
BUG=webrtc:5298

Review-Url: https://codereview.webrtc.org/2338493002
Cr-Commit-Position: refs/heads/master@{#14190}
2016-09-12 23:47:32 +00:00
Irfan Sheriff
b2540bb99f Probing: Add support for exponential startup probing
Adds support for exponentially probing the bandwidth at start-up to allow
ramp-up to real capacity of the network.

BUG=webrtc:6332
R=philipel@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14189}
2016-09-12 19:29:05 +00:00
peah
a421ddd60e The buffering of the farend signal is refactored in this CL.
The former buffering scheme was overly complicated and
complex as.
-It buffered twice as many data points as needed.
-It used the ring_buffer C functionality directly inside the
 delay adjustment functionality which makes that
functionality very hard to read.

In order to overcome these problems this CL does
-Change the buffering to buffer only the amount of samples
 needed.
-Wrap the ring_buffer C functionality in a wrapper class
 with methods that are more descriptive in what they do
 to affect the AEC delay.

Additional notes:
-Some minor other name changes/code changes were also
 introduced.
-The ringbuffer C functionality should be removed, but now
 is not the time to do it as the rest of the code is very
 adapted to the wrapping behavior of the ringbuffer. It is
 better to simplify the surrounding code before doing that.

The changes have been tested to be bitexact.

This CL is chained to the CL https://codereview.webrtc.org/2321483002/
and will be followed by another CL.

BUG=webrtc:5298, webrtc:6018

Review-Url: https://codereview.webrtc.org/2319693003
Cr-Commit-Position: refs/heads/master@{#14188}
2016-09-12 18:27:20 +00:00
Erik Språng
78ce619a0c Extract simulcast rate allocation outside of video encoder.
This is a first step to refactor this code.
I'm deprecating https://codereview.webrtc.org/1913073002 and
implementing this in smaller more isolated steps.

BUG=webrtc:5206
R=asapersson@webrtc.org, kjellander@webrtc.org, noahric@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#14186}
2016-09-12 14:04:56 +00:00
peah
8e56521143 The output signal of the AEC needs to be buffered as the
internal block size of the AEC differ from the frame
size in the AEC output.

Before this CL, this buffering was done using ringbuffers
as well as secondary internal AEC buffers that were stored
on the state. The internal buffers were redundant, and the
ringbuffers were so short that the benefit of using
ringbuffers were lost.

This CL addresses the above issues by replacing the
ringbuffers by linear buffers. This has the main advantage
of cleaner code but it should significantly less
computational complex.

Furthermore, as the complexity of the function where the
conversion to external and internal AEC frame sizes is done
increased significantly with the changes in this CL, the
CL also include refactoring the near-end buffer handling
to increase readability and reduce code repetition.

After the changes in this CL it is very clear that the
former buffering of the output was incorrectly done for
the first frames. This CL corrects that but in doing that
it breaks the bitexactness with the former code.
The bitexactness is, however, only broken for the first
1000 samples and it has been verified that for a test suite
the CL maintains bitexactness in the AEC output
after the first 1000 samples.

This CL is chained to the CL https://codereview.webrtc.org/2311833002/ and will be
followed by more CLs that refactor the other buffers
inside the AEC.

BUG=webrtc:5298, webrtc:6018

Review-Url: https://codereview.webrtc.org/2321483002
Cr-Commit-Position: refs/heads/master@{#14184}
2016-09-12 11:49:50 +00:00
Danil Chapovalov
a64a2fbf6d Fix oversized rtp extension parsing.
When size of individual one-byte extension span beyound extension block

BUG=chromium:645201
R=brandtr@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14183}
2016-09-12 09:41:44 +00:00
danilchap
180e4525ca Revert of Make rtcp parsing implementation private in RtcpReceiver (patchset #1 id:1 of https://codereview.webrtc.org/2320603002/ )
Reason for revert:
Breaks fuzzer compilation.

Original issue's description:
> Make rtcp parsing implementation private in RtcpReceiver:
> Function just for Parse and for Callbacks moved to private section.
> All handles moved from protected to private section.
>
> BUG=webrtc:5260
> R=sprang@webrtc.org
>
> Committed: https://crrev.com/faf708e238c7b43a732fbebf79ac9298b4b95a95
> Cr-Commit-Position: refs/heads/master@{#14181}

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

Review-Url: https://codereview.webrtc.org/2332673003
Cr-Commit-Position: refs/heads/master@{#14182}
2016-09-12 08:40:44 +00:00
Danil Chapovalov
faf708e238 Make rtcp parsing implementation private in RtcpReceiver:
Function just for Parse and for Callbacks moved to private section.
All handles moved from protected to private section.

BUG=webrtc:5260
R=sprang@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14181}
2016-09-12 08:31:23 +00:00
kjellander
10f606d8de Revert of Introduced new scheme for controlling the functionality inside the audio processing module (patchset #12 id:260001 of https://codereview.webrtc.org/2292863002/ )
Reason for revert:
Interface change in the mock breaks downstream code.

Original issue's description:
> The current scheme for setting parameters and specifying the behavior
> of the audio processing module is quite complex and hard to implement
> in a threadsafe and efficient manner. Therefore a new scheme for setting
> the parameters in the audio processing module is introduced in this CL.
>
> The idea is to roll this scheme out gradually and as a first functionality
> in the audio processing module where this is applied the level controller
> was chosen. This CL includes the replacement of the Config-based
> level controller scheme with the new scheme.
>
> BUG=webrtc:5298
>
> Committed: https://crrev.com/c8bbe3fe9aad9e9a1189a42dcaa8f5d6c261ecc8
> Cr-Commit-Position: refs/heads/master@{#14171}

TBR=solenberg@webrtc.org,henrik.lundin@webrtc.org,peah@webrtc.org
BUG=webrtc:5298
NOTRY=True

Review-Url: https://codereview.webrtc.org/2334583002
Cr-Commit-Position: refs/heads/master@{#14177}
2016-09-12 06:04:37 +00:00
peah
2ace3f9406 The audio processing module (APM) relies on two for
functionalities  doing sample-rate conversions:
-The implicit resampling done in the AudioBuffer CopyTo,
 CopyFrom, InterleaveTo and DeinterleaveFrom methods.
-The multi-band splitting scheme.

The selection of rates in these have been difficult and
complicated, partly due to that the APM API which allows
for activating the APM submodules without notifying
the APM.

This CL adds functionality that for each capture frame
polls all submodules for whether they are active or not
and compares this against a cached result.
Furthermore, new functionality is added that based on the
results of the comparison do a reinitialization of the APM.

This has several advantages
-The code deciding on whether to analysis and synthesis is
 needed for the bandsplitting can be much simplified and
 centralized.
-The selection of the processing rate can be done such as
 to avoid the implicit resampling that was in some cases
 unnecessarily done.
-The optimization for whether an output copy is needed
 that was done to improve performance due to the implicit
 resampling is no longer needed, which simplifies the
 code and makes it less error-prone in the sense that
 is no longer neccessary to keep track of whether any
 module has changed the signal.

Finally, it should be noted that the polling of the state
for all the submodules was done previously as well, but in
a less obvious and distributed manner.

BUG=webrtc:6181, webrtc:6220, webrtc:5298, webrtc:6296, webrtc:6298, webrtc:6297

Review-Url: https://codereview.webrtc.org/2304123002
Cr-Commit-Position: refs/heads/master@{#14175}
2016-09-10 11:42:36 +00:00
asapersson
1d02d3e5e6 Remove RTC_LOGGED_* macro.
BUG=

Review-Url: https://codereview.webrtc.org/2326843003
Cr-Commit-Position: refs/heads/master@{#14174}
2016-09-10 05:40:34 +00:00
peah
c8bbe3fe9a The current scheme for setting parameters and specifying the behavior
of the audio processing module is quite complex and hard to implement
in a threadsafe and efficient manner. Therefore a new scheme for setting
the parameters in the audio processing module is introduced in this CL.

The idea is to roll this scheme out gradually and as a first functionality
in the audio processing module where this is applied the level controller
was chosen. This CL includes the replacement of the Config-based
level controller scheme with the new scheme.

BUG=webrtc:5298

Review-Url: https://codereview.webrtc.org/2292863002
Cr-Commit-Position: refs/heads/master@{#14171}
2016-09-09 21:17:07 +00:00
noahric
fac0ff022b Change SimulcastEncoderAdapter to allow a 0 for SetRates.
0 means "pause", so forcing it to the min bitrate means we'll never
allow pausing for internal source encoders.

BUG=

Review-Url: https://codereview.webrtc.org/2304603002
Cr-Commit-Position: refs/heads/master@{#14168}
2016-09-09 17:27:20 +00:00
Henrik Kjellander
a41c13e6a2 OWNERS: Make everyone able to change *.gn,*.gni files.
Project-wide change to make it possible for all team members
to do changes to GN files.

NOTRY=True
R=kwiberg@webrtc.org
TBR=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14163}
2016-09-09 12:51:48 +00:00
kwiberg
2b1b7a83ad iSAC fix: Ignore overflow in signed left shift
A left shift by 10 was assumed to never overflow, since "[s]imulation
of the 25 files shows that maximum value in the vector gain_lo_hiQ17[]
is 441344, which means that it is log2((2^31)/441344) = 12.2 shifting
bits from saturation." However, a fuzzer test succeeded in provoking
an overflow, which we ignore in this CL on the theory that only
"abnormal" inputs cause overflow.

Also had to replace a "foo << 1" with "foo * (1 << 1)" in
WEBRTC_SPL_MUL_16_32_RSFT15 because foo could be negative; this
problem showed up as soon as I'd asked UBSan to ignore the overflow
discussed above.

BUG=chromium:615819

Review-Url: https://codereview.webrtc.org/2314413002
Cr-Commit-Position: refs/heads/master@{#14162}
2016-09-09 12:51:38 +00:00
henrika
f06f35a161 Adds logging of native audio levels and UMA stats to track issues.
This changes added a simple measurement of levels "close to the audio hardware"
both for playout and for recording. These levels are logged once each 10 seconds.

It also adds WebRTC.Audio.RecordedOnlyZeros UMA stat and it is updated at
destuction. It will report true iff all reported recording leves are zero.

BUG=NONE
R=peah@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14160}
2016-09-09 12:23:24 +00:00
henrika
073378e79a Avoids crash at device switch on iOS by ensuring that audio parameters can be updated on the fly driven by e.g. switching audio device.
R=henrikg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14158}
2016-09-09 11:15:49 +00:00
philipel
463d3011ce Added ClearTo(seq_num) to RtpFrameReferenceFinder.
In order to be able to clear out any potentially stashed old frames from
the RtpFrameReferenceFinder we can now clear frames that contain packets
older than |seq_num|.

BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2304723004
Cr-Commit-Position: refs/heads/master@{#14156}
2016-09-09 10:32:51 +00:00
kthelgason
d5472246a5 Reland of move all reference to carbon api (patchset #1 id:1 of https://codereview.webrtc.org/2317343003/ )
Reason for revert:
Build issues have now _really_ been fixed

Original issue's description:
> Revert of move all reference to carbon api (patchset #2 id:300001 of https://codereview.webrtc.org/2321493002/ )
>
> Reason for revert:
> Still breaks Chromium mac compile:
> [4542/22193] CXX obj/third_party/webrtc/base/rtc_base/unixfilesystem.o
> FAILED: obj/third_party/webrtc/base/rtc_base/unixfilesystem.o
> /b/c/cipd/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/webrtc/base/rtc_base/unixfilesystem.o.d -DLOGGING=1 -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DDCHECK_ALWAYS_ON=1 -DNO_TCMALLOC -DUSE_EXTERNAL_POPUP_MENU=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DUSE_PROPRIETARY_CODECS -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=280106-1 -DCR_XCODE_VERSION=0511 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_RESTRICT_LOGGING -DEXPAT_RELATIVE_PATH -DENABLE_EXTERNAL_AUTH -DHAVE_OPENSSL_SSL_H -DHAVE_SCTP -DHAVE_SRTP -DHAVE_WEBRTC_VIDEO -DHAVE_WEBRTC_VOICE -DLOGGING_INSIDE_WEBRTC -DSRTP_RELATIVE_PATH -DSSL_USE_OPENSSL -DUSE_WEBRTC_DEV_BRANCH -DSSL_USE_OPENSSL -DHAVE_OPENSSL_SSL_H -DFEATURE_ENABLE_SSL -DLOGGING=1 -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_MAC -DNO_MAIN_THREAD_WRAPPING -I../../third_party/webrtc_overrides -I../../third_party/boringssl/src/include -I../.. -Igen -I../../third_party/jsoncpp/overrides/include -I../../third_party/jsoncpp/source/include -I../../third_party/webrtc_overrides -I../../third_party -I../../third_party/boringssl/src/include -Wno-uninitialized -fno-strict-aliasing -fstack-protector -fcolor-diagnostics -arch x86_64 -O2 -g1 -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.7 -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-conversion -Werror -Wall -Wno-unused-variable -Wpartial-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -fno-threadsafe-statics -fvisibility-inlines-hidden -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -c ../../third_party/webrtc/base/unixfilesystem.cc -o obj/third_party/webrtc/base/rtc_base/unixfilesystem.o
> ../../third_party/webrtc/base/unixfilesystem.cc:375:11: error: variable has incomplete type 'FSRef'
>     FSRef fr;
>           ^
> /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h:467:8: note: forward declaration of 'FSRef'
> struct FSRef;
>        ^
> ../../third_party/webrtc/base/unixfilesystem.cc:376:27: error: use of undeclared identifier 'kUserDomain'
>     if (0 != FSFindFolder(kUserDomain, kApplicationSupportFolderType,
>                           ^
> ../../third_party/webrtc/base/unixfilesystem.cc:376:40: error: use of undeclared identifier 'kApplicationSupportFolderType'
>     if (0 != FSFindFolder(kUserDomain, kApplicationSupportFolderType,
>                                        ^
> ../../third_party/webrtc/base/unixfilesystem.cc:377:27: error: use of undeclared identifier 'kCreateFolder'; did you mean 'CreateFolder'?
>                           kCreateFolder, &fr))
>                           ^~~~~~~~~~~~~
>                           CreateFolder
> ../../third_party/webrtc/base/unixfilesystem.cc:92:22: note: 'CreateFolder' declared here
> bool UnixFilesystem::CreateFolder(const Pathname &path, mode_t mode) {
>
> Original issue's description:
> > Reland of move all reference to carbon api (patchset #1 id:1 of https://codereview.webrtc.org/2316563002/ )
> >
> > Reason for revert:
> > Chromium build issues have been resolved.
> >
> > Original issue's description:
> > > Revert of Remove all reference to carbon api (patchset #2 id:20001 of https://codereview.webrtc.org/2299633002/ )
> > >
> > > Reason for revert:
> > > Breaks chromium build
> > >
> > > Original issue's description:
> > > > Remove all reference to carbon api
> > > >
> > > > BUG=webrtc:6282
> > > >
> > > > Committed: https://crrev.com/dbd8b6bec4143c940b2f2ca8cd85c25d17327964
> > > > Cr-Commit-Position: refs/heads/master@{#14080}
> > >
> > > TBR=magjed@webrtc.org,mflodman@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:6282
> > >
> > > Committed: https://crrev.com/b096aa7fd375a980daab3a986596548ca5de2a1c
> > > Cr-Commit-Position: refs/heads/master@{#14081}
> >
> > TBR=magjed@webrtc.org,mflodman@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:6282
> >
> > Committed: https://crrev.com/a90879b64fd8db57c0274169311d6b51dd59f1a0
> > Cr-Commit-Position: refs/heads/master@{#14125}
>
> TBR=mflodman@webrtc.org,kthelgason@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6282
>
> Committed: https://crrev.com/4e0581f543b026cbc31c3b24cf65c7f51dcd6124
> Cr-Commit-Position: refs/heads/master@{#14133}

TBR=mflodman@webrtc.org,magjed@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6282

Review-Url: https://codereview.webrtc.org/2327573002
Cr-Commit-Position: refs/heads/master@{#14155}
2016-09-09 10:19:54 +00:00
peah
906f403088 This CL refactors the buffering of the incoming near-end signal inside
the AEC. This solves the following issues:
-Even though the buffering was previously done using ringbuffers, those
  were inefficiently used which caused a lot of hidden memcopys.
-The ringbuffers wasted a lot of space in the AEC state as they were too
  long.
-The lowest and two upper bands were decoupled in the buffering, which
  required extra code to handle.
-On top of the ringbuffers there was a second linear buffer that was
  stored in the state which caused even more data to be stored on the
  state.
-The incoming nearend frames were passed to the functions in the form
  of buffers on the state, which made the code harder to read as it was
  not immediately clear where the nearend signal was used, and when it
  was modified.

The CL addresses this by replacing all the buffers by two linear buffers:
-One buffer before the AEC processing for producing nearend
  blocks of size 64 that can be processed by the AEC.
-One inside the AEC processing that buffers the current
  nearend block until the next block is processed.

The changes have been tested to be bitexact.
This CL will be followed by several other CLs, that refactor the other
buffers in the AEC.

BUG=webrtc:5298, webrtc:6018

Review-Url: https://codereview.webrtc.org/2311833002
Cr-Commit-Position: refs/heads/master@{#14141}
2016-09-08 16:49:50 +00:00
henrika
0f8ea0da53 Avoids crash in WebRtcAudioTrack.initPlayout (part II)
I had reversed a condition in https://codereview.webrtc.org/2315363004/ and we always failed. Fixing that here.

TBR=magjed

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

Cr-Commit-Position: refs/heads/master@{#14136}
2016-09-08 14:11:47 +00:00
magjed
4e0581f543 Revert of move all reference to carbon api (patchset #2 id:300001 of https://codereview.webrtc.org/2321493002/ )
Reason for revert:
Still breaks Chromium mac compile:
[4542/22193] CXX obj/third_party/webrtc/base/rtc_base/unixfilesystem.o
FAILED: obj/third_party/webrtc/base/rtc_base/unixfilesystem.o
/b/c/cipd/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/webrtc/base/rtc_base/unixfilesystem.o.d -DLOGGING=1 -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DDCHECK_ALWAYS_ON=1 -DNO_TCMALLOC -DUSE_EXTERNAL_POPUP_MENU=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DUSE_PROPRIETARY_CODECS -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=280106-1 -DCR_XCODE_VERSION=0511 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_RESTRICT_LOGGING -DEXPAT_RELATIVE_PATH -DENABLE_EXTERNAL_AUTH -DHAVE_OPENSSL_SSL_H -DHAVE_SCTP -DHAVE_SRTP -DHAVE_WEBRTC_VIDEO -DHAVE_WEBRTC_VOICE -DLOGGING_INSIDE_WEBRTC -DSRTP_RELATIVE_PATH -DSSL_USE_OPENSSL -DUSE_WEBRTC_DEV_BRANCH -DSSL_USE_OPENSSL -DHAVE_OPENSSL_SSL_H -DFEATURE_ENABLE_SSL -DLOGGING=1 -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_MAC -DNO_MAIN_THREAD_WRAPPING -I../../third_party/webrtc_overrides -I../../third_party/boringssl/src/include -I../.. -Igen -I../../third_party/jsoncpp/overrides/include -I../../third_party/jsoncpp/source/include -I../../third_party/webrtc_overrides -I../../third_party -I../../third_party/boringssl/src/include -Wno-uninitialized -fno-strict-aliasing -fstack-protector -fcolor-diagnostics -arch x86_64 -O2 -g1 -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.7 -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-conversion -Werror -Wall -Wno-unused-variable -Wpartial-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -fno-threadsafe-statics -fvisibility-inlines-hidden -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -c ../../third_party/webrtc/base/unixfilesystem.cc -o obj/third_party/webrtc/base/rtc_base/unixfilesystem.o
../../third_party/webrtc/base/unixfilesystem.cc:375:11: error: variable has incomplete type 'FSRef'
    FSRef fr;
          ^
/Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h:467:8: note: forward declaration of 'FSRef'
struct FSRef;
       ^
../../third_party/webrtc/base/unixfilesystem.cc:376:27: error: use of undeclared identifier 'kUserDomain'
    if (0 != FSFindFolder(kUserDomain, kApplicationSupportFolderType,
                          ^
../../third_party/webrtc/base/unixfilesystem.cc:376:40: error: use of undeclared identifier 'kApplicationSupportFolderType'
    if (0 != FSFindFolder(kUserDomain, kApplicationSupportFolderType,
                                       ^
../../third_party/webrtc/base/unixfilesystem.cc:377:27: error: use of undeclared identifier 'kCreateFolder'; did you mean 'CreateFolder'?
                          kCreateFolder, &fr))
                          ^~~~~~~~~~~~~
                          CreateFolder
../../third_party/webrtc/base/unixfilesystem.cc:92:22: note: 'CreateFolder' declared here
bool UnixFilesystem::CreateFolder(const Pathname &path, mode_t mode) {

Original issue's description:
> Reland of move all reference to carbon api (patchset #1 id:1 of https://codereview.webrtc.org/2316563002/ )
>
> Reason for revert:
> Chromium build issues have been resolved.
>
> Original issue's description:
> > Revert of Remove all reference to carbon api (patchset #2 id:20001 of https://codereview.webrtc.org/2299633002/ )
> >
> > Reason for revert:
> > Breaks chromium build
> >
> > Original issue's description:
> > > Remove all reference to carbon api
> > >
> > > BUG=webrtc:6282
> > >
> > > Committed: https://crrev.com/dbd8b6bec4143c940b2f2ca8cd85c25d17327964
> > > Cr-Commit-Position: refs/heads/master@{#14080}
> >
> > TBR=magjed@webrtc.org,mflodman@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=webrtc:6282
> >
> > Committed: https://crrev.com/b096aa7fd375a980daab3a986596548ca5de2a1c
> > Cr-Commit-Position: refs/heads/master@{#14081}
>
> TBR=magjed@webrtc.org,mflodman@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:6282
>
> Committed: https://crrev.com/a90879b64fd8db57c0274169311d6b51dd59f1a0
> Cr-Commit-Position: refs/heads/master@{#14125}

TBR=mflodman@webrtc.org,kthelgason@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6282

Review-Url: https://codereview.webrtc.org/2317343003
Cr-Commit-Position: refs/heads/master@{#14133}
2016-09-08 12:35:00 +00:00
henrik.lundin
22c8d5a3e0 Revert of Setting up an RTP input fuzzer for NetEq (patchset #2 id:20001 of https://codereview.webrtc.org/2315633002/ )
Reason for revert:
Broke all Chromium libFuzzer builds
https://bugs.chromium.org/p/chromium/issues/detail?id=645069

Original issue's description:
> Setting up an RTP input fuzzer for NetEq
>
> This CL introduces a new fuzzer target neteq_rtp_fuzzer that
> manipulates the RTP header fields before inserting the packets into
> NetEq. A few helper classes are also introduced.
>
> BUG=webrtc:5447
> NOTRY=True
>
> Committed: https://crrev.com/2d273f1e97cd5030ed1686f27ce1118291b66395
> Cr-Commit-Position: refs/heads/master@{#14103}

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

Review-Url: https://codereview.webrtc.org/2328483002
Cr-Commit-Position: refs/heads/master@{#14131}
2016-09-08 12:00:41 +00:00
ossu
17e3fa1fb4 Removed sync packet support from NetEq.
I could not find a single place it was used, outside of the unittests
for the sync packet support itself.

Review-Url: https://codereview.webrtc.org/2309303002
Cr-Commit-Position: refs/heads/master@{#14130}
2016-09-08 11:53:00 +00:00
henrika
2c993ce505 Avoids crash in WebRtcAudioTrack.initPlayout
BUG=NONE
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14129}
2016-09-08 11:36:41 +00:00
kwiberg
5b356f46bb FilePlayer: Remove backwards compatibility stuff that we no longer need
This includes renaming NewFilePlayer to CreateFilePlayer.

Review-Url: https://codereview.webrtc.org/2319123003
Cr-Commit-Position: refs/heads/master@{#14128}
2016-09-08 11:32:40 +00:00
kthelgason
a90879b64f Reland of move all reference to carbon api (patchset #1 id:1 of https://codereview.webrtc.org/2316563002/ )
Reason for revert:
Chromium build issues have been resolved.

Original issue's description:
> Revert of Remove all reference to carbon api (patchset #2 id:20001 of https://codereview.webrtc.org/2299633002/ )
>
> Reason for revert:
> Breaks chromium build
>
> Original issue's description:
> > Remove all reference to carbon api
> >
> > BUG=webrtc:6282
> >
> > Committed: https://crrev.com/dbd8b6bec4143c940b2f2ca8cd85c25d17327964
> > Cr-Commit-Position: refs/heads/master@{#14080}
>
> TBR=magjed@webrtc.org,mflodman@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6282
>
> Committed: https://crrev.com/b096aa7fd375a980daab3a986596548ca5de2a1c
> Cr-Commit-Position: refs/heads/master@{#14081}

TBR=magjed@webrtc.org,mflodman@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6282

Review-Url: https://codereview.webrtc.org/2321493002
Cr-Commit-Position: refs/heads/master@{#14125}
2016-09-08 10:34:45 +00:00
magjed
71eb61cf37 Reland of Ignore Camera and Flip bits in CVO when parsing video rotation (patchset #1 id:1 of https://codereview.webrtc.org/2300323002/ )
Reason for revert:
Downstream build is fixed.

Original issue's description:
> Revert of Ignore Camera and Flip bits in CVO when parsing video rotation (patchset #3 id:80001 of https://codereview.webrtc.org/2280703002/ )
>
> Reason for revert:
> Breaks downstream build.
>
> Original issue's description:
> > Ignore Camera and Flip bits in CVO when parsing video rotation
> >
> > Currently, if WebRTC receives a CVO byte where the Camera or Flip bit is
> > set, then rotation is incorrectly parsed as 0. This CL fixes that issue.
> > The Camera and Flip bit is still unimplemented and will just be ignored
> > though.
> >
> > BUG=webrtc:6120
> > R=danilchap@webrtc.org, pthatcher@webrtc.org, tommi@webrtc.org
> >
> > Committed: f9e1b922ef
>
> TBR=pthatcher@webrtc.org,danilchap@webrtc.org,tommi@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6120
>
> Committed: https://crrev.com/97667c7746282704acccd896e26175decee349c0
> Cr-Commit-Position: refs/heads/master@{#14035}

TBR=pthatcher@webrtc.org,danilchap@webrtc.org,tommi@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6120

Review-Url: https://codereview.webrtc.org/2320913003
Cr-Commit-Position: refs/heads/master@{#14124}
2016-09-08 10:25:05 +00:00
henrik.lundin
243c0e8066 Fixing NetEqReplacementInput for reordered and missing packets
With this CL, the NetEqReplacementInput class handles reordered and
missing packets in a better way than before, by storing the last
confirmed packet size and using that when the next packet size cannot
be calculated.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2319553003
Cr-Commit-Position: refs/heads/master@{#14122}
2016-09-08 09:14:34 +00:00
aleloi
a4c2106120 This CL contains the following small changes:
1. Use of const in all variable declarations where it is possible
2. Variable names and function arguments changed from CamelCase to match code style
3. A few stale comments removed.
4. Chromium clang plugin check added (now possible thanks to kwiberg@'s work on common.h)
5. Disallow constructor macros added.

NOTRY=true

Review-Url: https://codereview.webrtc.org/2294263002
Cr-Commit-Position: refs/heads/master@{#14120}
2016-09-08 08:25:50 +00:00
asapersson
14f1250f47 Do not report bucket delay for stats when pacer is paused (zero returned).
Avoids reporting a growing delay (i.e. time b/w current time and oldest packet in the pacer).

BUG=webrtc:6253

Review-Url: https://codereview.webrtc.org/2279283002
Cr-Commit-Position: refs/heads/master@{#14118}
2016-09-08 06:14:56 +00:00
minyue
7610f85a2b Adding AudioNetworkAdaptor interfaces.
AudioNetworkAdaptor is supposed to facilitate AudioEncoder to adapt to varying network conditions.

This is the first of a sequence of CLs that are to add one implementation of AudioNetworkAdaptor.

This CL illustrates the interfaces of the AudioNetworkAdaptor.

BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2308573002
Cr-Commit-Position: refs/heads/master@{#14115}
2016-09-07 20:51:59 +00:00
zijiehe
0f49daccbe Reland of [WebRTC] A real ScreenCapturer test (patchset #1 id:1 of https://codereview.webrtc.org/2310953002/ )
Reason for revert:
Resubmit capturer tests

Original issue's description:
> Revert of [WebRTC] A real ScreenCapturer test (patchset #8 id:240001 of https://codereview.webrtc.org/2268093002/ )
>
> Reason for revert:
> ScreenCapturerTest.CaptureUpdatedRegion fails on Win DrMemory Full.
>
> Original issue's description:
> > [WebRTC] A real ScreenCapturer test
> >
> > We do not have a real ScreenCapturer test before. And after CL 2210443002, a new
> > ScreenDrawer interface is added to the code base to draw various shapes on the
> > screen. This change is to use ScreenDrawer to test ScreenCapturer. Besides test
> > cases, some other changes are included,
> >
> > 1. A WaitForPendingPaintings() function in ScreenDrawer, to wait for a
> > ScreenDrawer to finish all the pending draws. This function now only sleeps 50
> > milliseconds on X11 and 100 milliseconds on Windows.
> >
> > 2. A Color structure to help handle a big-endian or little-endian safe color and
> > provide functions to compare with DesktopFrame::data(). Both ScreenDrawer and
> > DesktopFrameGenerator (in change 2202443002) can use this class to create colors
> > and compare with or paint to a DesktopFrame.
> >
> > 3. ScreenDrawer now uses Color structure instead of uint32_t.
> >
> > BUG=314516
> >
> > TBR=kjellander@chromium.org
> >
> > Committed: https://crrev.com/9d1c54ace0dc9f68da0152aa1ded2a8dba0a43ae
> > Cr-Commit-Position: refs/heads/master@{#14058}
>
> TBR=sergeyu@chromium.org,jamiewalch@chromium.org,kjellander@chromium.org,zijiehe@chromium.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=314516
>
> Committed: https://crrev.com/4c44202dc348613695a4b529bbd7c9bdab6195ec
> Cr-Commit-Position: refs/heads/master@{#14071}

TBR=sergeyu@chromium.org,jamiewalch@chromium.org,kjellander@chromium.org,asapersson@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=644130

Review-Url: https://codereview.webrtc.org/2313653003
Cr-Commit-Position: refs/heads/master@{#14113}
2016-09-07 18:52:28 +00:00
aleloi
652ac89c09 Simplifications of the mixing algorithm.
Methods are named more consistently and have a more consistent
signatures. The call structure of mixing is slightly
simplified. Anonymous participants are also ramped up.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2298163002
Cr-Commit-Position: refs/heads/master@{#14110}
2016-09-07 14:42:23 +00:00
solenberg
88499ecaca Moving/renaming webrtc/common.h.
This file defines webrtc::Config which was mostly used by modules/audio_processing. The files webrtc/common.h, webrtc/common.cc and webrtc/test/common_unittests.cc are moved to modules/audio_processing and the few remaining uses of webrtc::Config are replaced with simpler code.

- For NetEq and pacing configuration, a VoEBase::ChannelConfig is passed to VoEBase::CreateChannel().
- Removes the need for VoiceEngine::Create(const Config& config). No need to store the webrtc::Config in VoE shared state.

BUG=webrtc:5879

Review-Url: https://codereview.webrtc.org/2307533004
Cr-Commit-Position: refs/heads/master@{#14109}
2016-09-07 14:34:45 +00:00
aleloi
311525e715 Several lock acquisitions and one of the two lock members are removed. ENSURE_LOCKS_REQUIRED and CalledOnValidThread annotations are added.
NOTRY=True

Review-Url: https://codereview.webrtc.org/2286343002
Cr-Commit-Position: refs/heads/master@{#14106}
2016-09-07 13:13:16 +00:00
Danil Chapovalov
08b0351ddd Implement PlayoutDelay extension as a trait
to be used with rtp::Packet class

BUG=webrtc:1994
R=isheriff@chromium.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14105}
2016-09-07 13:08:20 +00:00
henrik.lundin
2d273f1e97 Setting up an RTP input fuzzer for NetEq
This CL introduces a new fuzzer target neteq_rtp_fuzzer that
manipulates the RTP header fields before inserting the packets into
NetEq. A few helper classes are also introduced.

BUG=webrtc:5447
NOTRY=True

Review-Url: https://codereview.webrtc.org/2315633002
Cr-Commit-Position: refs/heads/master@{#14103}
2016-09-07 12:57:34 +00:00
Danil Chapovalov
9881cb2874 Merge min_ms and max_ms accessors in PlayoutDelayOracle
to reduce CriticalSection enterencies and
avoid potentional synchronisation issues.

R=isheriff@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#14101}
2016-09-07 11:30:00 +00:00
Stefan Holmer
126ee727a0 Only parse PPS up to PPS and SPS ids in the depacketizater.
BUG=
R=danilchap@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14100}
2016-09-07 10:46:32 +00:00
Stefan Holmer
60e4346955 Add time line for acked bitrate.
R=philipel@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14098}
2016-09-07 07:58:31 +00:00
skvlad
b460fd8b16 Increase timeout for flaky tests for ProcessThreadImpl
These tests were waiting for a thread to start in 100 ms. This seems to
be not enough on some Windows bots, as there were multiple failures
recently:
https://build.chromium.org/p/client.webrtc/builders/Win32%20Debug/builds/9188/steps/modules_unittests/logs/stdio
https://build.chromium.org/p/client.webrtc/builders/Win64%20Debug/builds/8794/steps/modules_unittests/logs/stdio

I have increased the timeout to 500 ms. This will not make successful
test runs slower, but will reduce the chance of a spurious failure.

R=perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14096}
2016-09-06 21:34:41 +00:00
Alejandro Luebs
37062ed16f Fix chromium-style errors in IntelligibilityEnhancer
BUG=
R=henrik.lundin@webrtc.org, peah@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14094}
2016-09-06 18:25:50 +00:00
kwiberg
d52bef7d64 iSAC float: Handle errors in upper band decoding
We hit a fuzzer bug that caused numDecodedBytesLB + numDecodedBytesUB
> lenEncodedBytes, which is obviously bogus. Check for that, and for
the case whhere the UB decoder itself realized that something was
wrong. (The code already makes the corresponding check for the LB
decoder.)

BUG=chromium:637899

Review-Url: https://codereview.webrtc.org/2315693002
Cr-Commit-Position: refs/heads/master@{#14091}
2016-09-06 13:16:09 +00:00
Danil Chapovalov
857a8fb861 Remove dedicated unittest file for remb format
RembStatus moved to RtcpSender unittest where it fits better
Creating remb in Compound/ReducedSize modes already covered by RtcpSender unittests.
Parsing remb already covered by RtcpReceiverTest.ReceivesRemb

R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14088}
2016-09-06 09:41:52 +00:00
hbos
c928453fd0 Significantly increased max_num_buffers_ of Vp9FrameBufferPool.
Changed from 10 to 68.

This is to avoid a flake where the limit is exceeded, see
crbug.com/638554. Our performance tests should flag performance
regressions, we shouldn't rely on crashing because the number of
referenced buffers is not tiny to detect this. However, if a really big
number of buffers (>68) are referenced without being dereferenced it is
likely that we have a bug and frames are leaking in which case we can
DCHECK-crash.

BUG=chromium:638554

Review-Url: https://codereview.webrtc.org/2280593002
Cr-Commit-Position: refs/heads/master@{#14084}
2016-09-06 08:38:34 +00:00
henrik.lundin
d4ec970a79 neteq_rtpplay: Add an error message for unmatched SSRC
If neteq_rtpplay is invoked with the --ssrc option to select packets
matching a specific SSRC, but no matching packets are found, this CL
provides a meaningful error message.

BUG=webrtc:2692
NOTRY=True
TBR=ivoc@webrtc.org

Review-Url: https://codereview.webrtc.org/2318503002
Cr-Commit-Position: refs/heads/master@{#14083}
2016-09-06 08:22:51 +00:00
kthelgason
b096aa7fd3 Revert of Remove all reference to carbon api (patchset #2 id:20001 of https://codereview.webrtc.org/2299633002/ )
Reason for revert:
Breaks chromium build

Original issue's description:
> Remove all reference to carbon api
>
> BUG=webrtc:6282
>
> Committed: https://crrev.com/dbd8b6bec4143c940b2f2ca8cd85c25d17327964
> Cr-Commit-Position: refs/heads/master@{#14080}

TBR=magjed@webrtc.org,mflodman@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6282

Review-Url: https://codereview.webrtc.org/2316563002
Cr-Commit-Position: refs/heads/master@{#14081}
2016-09-06 07:44:03 +00:00