WebRtcIsac_Encode and WebRtcIsacfix_Encode: Type encoded stream as uint8_t

We have to fix both at once, since there's a macro that calls one of
them or the other.

BUG=909
R=andrew@webrtc.org, bjornv@webrtc.org, henrik.lundin@webrtc.org, minyue@webrtc.org

Committed: https://code.google.com/p/webrtc/source/detail?r=7266

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7285 4adac7df-926f-26a2-2b94-8c16560cd09d
audioproc: Now also writes to output file in simulation mode

After changing to use wav as default file format no output was written in simulation mode.

BUG=3359
TESTED=locally
R=aluebs@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7286 4adac7df-926f-26a2-2b94-8c16560cd09d
Moved the filter calculation from analyze to process in ns_core

It makes sense to have it there if the analyze and process methods are called in different stages.
Tested over the entire QA set for bit exactness.

BUG=webrtc:3811
R=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7287 4adac7df-926f-26a2-2b94-8c16560cd09d
Reduce jitter delay for low fps streams.
Enabled by finch flag.

BUG=
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7288 4adac7df-926f-26a2-2b94-8c16560cd09d
Call NS AnalyzeCaptureAudio before AEC

This attenuates the noise pumping generated from the NS adapting to the AEC comfort noise.

When there is echo present the AEC suppresses it and adds comfort noise. This is underestimated on purpose to avoid adding more than the original background noise. The NS has to be called after the AEC, because every non-linear processing before it can ruin its performance. Therefore the noise estimation can adapt to this comfort noise, making it less aggressive and generating noise pumping.

By putting the noise estimation analysis stage from the NS before the AEC, this effect can be avoided. This has been tested manually on recordings where noise pumping was present: Two long recordings done in our team by bjornv and kwiberg plus the most noisy (5) recordings in the QA set.

On the other hand, one risk of doing this is to not adapt to the comfort noise and therefore suppress too much. As verified in the tested files, this is not a problem in practice.

BUG=webrtc:3763
R=andrew@webrtc.org, bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7289 4adac7df-926f-26a2-2b94-8c16560cd09d
Fix a problem in Thread::Send.
Previously if thread A->Send is called on thread B, B->ReceiveSends will be called, which enables an arbitrary thread to invoke calls on B while B is wait for A->Send to return. This caused mutliple problems like issue 3559, 3579.
The fix is to limit B->ReceiveSends to only process requests from A.
Also disallow the worker thread invoking other threads.

BUG=3559
R=juberti@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7290 4adac7df-926f-26a2-2b94-8c16560cd09d
Add missing DesktopConfigurationMonitor Unlock in webrtc::ScreenCapturerMac

BUG=3837
R=jiayl@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7291 4adac7df-926f-26a2-2b94-8c16560cd09d
Enable render downmixing to mono in AudioProcessing.

In practice, we have been doing this since time immemorial, but have
relied on the user to do the downmixing (first voice engine then
Chromium). It's more logical for this burden to fall on AudioProcessing,
however, who can be expected to know that this is a reasonable approach
for AEC. Permitting two render channels results in running two AECs
serially.

Critically, in my recent change to have Chromium adopt the float
interface:
https://codereview.chromium.org/420603004
I removed the downmixing by Chromium, forgetting that we hadn't yet
enabled this feature in AudioProcessing. This corrects that oversight.

The change in paths hit by production users is very minor. As commented
it required adding downmixing to the int16_t path to satisfy
bit-exactness tests.

For reference, find the ApmTest.Process errors here:
https://paste.googleplex.com/6372007910309888

BUG=webrtc:3853
TESTED=listened to the files output from the Process test, and verified
that they sound as expected: higher echo while the AEC is adapting, but
afterwards very close.

R=aluebs@webrtc.org, bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7292 4adac7df-926f-26a2-2b94-8c16560cd09d
Call SSL_shutdown in OpenSSLStreamAdapter::Cleanup.

BUG=crbug/414211
R=juberti@webrtc.org

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

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