Rebase webrtc/base with r6682 version of talk/base:
cls ported: r6671, r6672, r6679 (reverts and unreverts in r6680, r6682).
svn diff -r 6656:6682 http://webrtc.googlecode.com/svn/trunk/talk/base >
6682.diff
sed -i.bak "s/talk_base/rtc/g" 6682.diff
sed -i.bak "s/#ifdef WIN32/#if defined(WEBRTC_WIN)/g" 6682.diff
sed -i.bak "s/#if defined(WIN32)/#if defined(WEBRTC_WIN)/g" 6682.diff
patch -p0 -i 6682.diff

BUG=3379
TBR=tommi@webrtc.org,jiayl@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6683 4adac7df-926f-26a2-2b94-8c16560cd09d
Remove the VPM denoiser.

The VPM denoiser give bad results, is slow and has not been used in
practice. Instead we use the VP8 denoiser. Testing this denoiser takes
up a lot of runtime on linux_memcheck (about 4 minutes) which we can do
without.

BUG=
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6688 4adac7df-926f-26a2-2b94-8c16560cd09d
rtc::Fatal output: Print space between # and message

R=henrika@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6689 4adac7df-926f-26a2-2b94-8c16560cd09d
Eliminate unnecessary #include

R=henrika@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6690 4adac7df-926f-26a2-2b94-8c16560cd09d
Make RTCP sender report send media bytes.

r6654 changed RtpSender::Bytes() to return the number of bytes sent
instead of number of media bytes. This is used by VideoEngine for stats.
This change broke RTCP which sends this same count as the number of
payload bytes sent (excluding headers and padding).

BUG=
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6691 4adac7df-926f-26a2-2b94-8c16560cd09d
Fix breakage introduced by r6691.

ModuleRtpRtcpImpl returned incorrectly on RemoteNTP as the
RTCPReceiver::NTP changed return type.

BUG=
TBR=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6693 4adac7df-926f-26a2-2b94-8c16560cd09d
Improvements to the pacer where it lost some budget due to truncation errors.

With this CL the resolution is increased to microseconds and proper rounding
is done in the Process() function. This means that we will be allowed to send
more than prior to r6664 as we previously truncated away parts of our budget.

We will also not lose budget due to inaccurate calculations in
TimeUntilNextProcess(), which was a regression in r6664.

BUG=cr/393950
TEST=out/Debug/webrtc_perf_tests --gtest_filter=RampUpTest.Simulcast
R=pbos@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6694 4adac7df-926f-26a2-2b94-8c16560cd09d
Remove Thread::RunningForChannelManager().

I haven't heard of this failing, so it should be safe to remove. Let me know if this isn't the case.

BUG=3388
R=andrew@webrtc.org, wu@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6695 4adac7df-926f-26a2-2b94-8c16560cd09d
After an audio interruption the audio unit no longer invokes its render callback, which results in a loss of audio. Restarting the audio unit post interruption fixes the issue.

CL also replaces deprecated AudioSession calls with equivalent AVAudioSession ones.

BUG=3487
R=glaznev@webrtc.org, noahric@chromium.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6697 4adac7df-926f-26a2-2b94-8c16560cd09d
Fix an invalid memory access due to typo in win/cursor.cc.

BUG=crbug/391468
R=sergeyu@chromium.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6698 4adac7df-926f-26a2-2b94-8c16560cd09d
nrsh1 is written before tmp321 is read, so needs to be earlyclobber

Otherwise, the compiler is allowed to put them in the same register
under the assumption that all inputs are read before any
(non-earlyclobber) output is written, which in this case would result
in nrsh2 being corrupted.

BUG=3439
R=aluebs@webrtc.org, ljubomir.papuga@gmail.com

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6700 4adac7df-926f-26a2-2b94-8c16560cd09d
Define convenient FATAL_ERROR() and FATAL_ERROR_IF() macros

R=henrike@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6701 4adac7df-926f-26a2-2b94-8c16560cd09d
int16<->float conversions: Use size_t for array length argument, not int

size_t is more appropriate for array lengths, since int might
theoretically be too small for a really large array. But more
importantly, if the caller's value is naturally of type size_t and the
function requires an int, VC++ will trigger warning C4267
(http://msdn.microsoft.com/en-us/library/6kck0s93.aspx) because the
implicit cast might be lossy, forcing the caller to do a manual cast.
Typing the function with size_t in the first place resolves the
problem.

R=aluebs@webrtc.org, andrew@webrtc.org, minyue@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6702 4adac7df-926f-26a2-2b94-8c16560cd09d
Remove old padding path in RTPSender.

Removing RTPSender::SendPaddingAccordingToBitrate() as well as a couple
of arguments from SendPadData().

BUG=
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6703 4adac7df-926f-26a2-2b94-8c16560cd09d
Print an info log instead of return an error if an external encoder is de-registered, but no corresponding internal encoder can be registered automatically.

This is not an error case if for instance an external h.264 encoder is registered, but no internal implementation exists.

R=pbos@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6704 4adac7df-926f-26a2-2b94-8c16560cd09d
Compile-time guard for iOS7 specific property.

BUG=3487
R=glaznev@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6706 4adac7df-926f-26a2-2b94-8c16560cd09d
Raw packet loss rate reported by RTP_RTCP module may vary too drastically over time. This CL is to add a filter to the value in VoE before lending it to audio coding module.

The filter is an exponential filter borrowed from video coding module.

The method is written in a new class called PacketLossProtector (not sure if the name is nice), which can be used in the future for more sophisticated logic.

BUG=
R=henrika@webrtc.org, stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6709 4adac7df-926f-26a2-2b94-8c16560cd09d
r6709 lacks a change in BUILD.gn

BUG=
R=marpan@google.com, marpan@webrtc.org, pbos@webrtc.org, wu@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6710 4adac7df-926f-26a2-2b94-8c16560cd09d
Fixes up rtc so that it compiles on iOS 8 SDK.
Adds support for UIInterfaceOrientationUnknown (new with in SDK) and makes it the same as
UIInterfaceOrientationPortrait.

R=noahric@google.com, tkchin@webrtc.org

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

Patch from David Maclachlan <dmaclach@chromium.org>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6712 4adac7df-926f-26a2-2b94-8c16560cd09d
Add unit test for MediaFile WAV file writing

R=aluebs@webrtc.org, andrew@webrtc.org, minyue@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6713 4adac7df-926f-26a2-2b94-8c16560cd09d