Add more sanity checks to workaround the unidentified problem that CaptureThread is still running while related resouces are destroyed already.

BUG=
TEST=auto test
R=henrika@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn@7590 4adac7df-926f-26a2-2b94-8c16560cd09d
Disable PeerConnectionEndToEndTest.CreateDataChannelAfterNegotiate under MSan

This test is flaky on MSan bots.

BUG=3980
TBR=jiayl@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn@7591 4adac7df-926f-26a2-2b94-8c16560cd09d
Add stats for video:
- number of sent/received RTCP NACK/FIR/PLI per minute
- percentage of unique sent/received NACK requests
- percentage of discarded/duplicated packets by the jitter buffer
- permille of sent/received key frames

BUG=crbug/419657
R=mflodman@webrtc.org, stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn@7592 4adac7df-926f-26a2-2b94-8c16560cd09d
Add UMA metrics for the initial (after two seconds) packet loss, round-trip time and bandwidth estimate of a WebRTC call.

BUG=crbug/425925
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn@7593 4adac7df-926f-26a2-2b94-8c16560cd09d
Implement external decoder support in WebRtcVideoEngine2.

R=stefan@webrtc.org
BUG=1788

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

git-svn-id: http://webrtc.googlecode.com/svn@7594 4adac7df-926f-26a2-2b94-8c16560cd09d
Add Opus support to neteq_rtpplay

BUG=2416
R=tina.legrand@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn@7595 4adac7df-926f-26a2-2b94-8c16560cd09d
replace inline assembly WebRtcNsx_AnalysisUpdate by intrinsics.

The modification only uses the unique part of the analysis_update
 function. Pass byte to byte conformance test on both ARMv7 and AArch64,
 and the single function performance is similar with original assembly
 version on different platforms. If not specified, the code is compiled
 by GCC 4.6. The result is the "X version / C version" ratio, and the
 less is better.

| run 100k times             | cortex-a7 | cortex-a9 | cortex-a15 |
| use C as the base on each  |  (1.2Ghz) |  (1.0Ghz) |   (1.7Ghz) |
| CPU target                 |           |           |            |
|----------------------------+-----------+-----------+------------|
| Neon asm                   |    15.61% |    20.15% |     14.89% |
| Neon inline asm (LLVM 3.4) |    25.98% |    33.96% |     18.18% |
| Neon intrinsics (GCC 4.6)  |    22.06% |    27.01% |     19.24% |
| Neon intrinsics (GCC 4.8)  |    17.28% |    18.23% |     18.55% |
| Neon intrinsics (LLVM 3.4) |    21.02% |    19.98% |     16.76% |

BUG=
R=andrew@webrtc.org

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

Patch from Zhongwei Yao <zhongwei.yao@arm.com>.

git-svn-id: http://webrtc.googlecode.com/svn@7596 4adac7df-926f-26a2-2b94-8c16560cd09d
Restore the void return type on WriteWavHeader.

Karl pointed out that the user can check the validity of the input
parameters with CheckWavParameters prior to calling.

TBR=kwiberg

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

git-svn-id: http://webrtc.googlecode.com/svn@7597 4adac7df-926f-26a2-2b94-8c16560cd09d
Roll chromium_revision: 28d1981..d3db2ff

Pick up the libvpx roll: https://codereview.chromium.org/674753002

Summary of changes (https://chromium.googlesource.com/chromium/src/+/28d1981..d3db2ff/DEPS):
* third_party/android_tools 36bf7ac..ea50ccc
* third_party/boringssl 7ea8481..751e889
* third_party/icu 8ac906f..d8b2a9d
* third_party/libvpx efe9712..2e5ced5
* third_party/usrsctp/usrsctplib
* tools/gyp 1990:1991
* tools/swarming_client a57d7db..bcb3bc3

Clang is not updated in this roll.

Made the change getchar() --> getc(stdin) as seems like getchar() isn't supported on android anymore.
(getchar() was causing the error: undefined reference to '__srget')

Update rate control parameter in vp9 test.

R=andrew@webrtc.org
TBR=ajm@google.com

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

git-svn-id: http://webrtc.googlecode.com/svn@7598 4adac7df-926f-26a2-2b94-8c16560cd09d
Update rate control parameter in vp9 test.

TBR=hellner@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn@7599 4adac7df-926f-26a2-2b94-8c16560cd09d
Add format members to AudioConverter for DCHECKing.

And use a std::min. Post-commit fixes after:
https://review.webrtc.org/30779004/

TBR=kwiberg

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

git-svn-id: http://webrtc.googlecode.com/svn@7600 4adac7df-926f-26a2-2b94-8c16560cd09d
Android AppRTCDemo improvements:
- Add a room list to ConnectActivity with buttons to add/remove rooms.
- Add loopback call button.
- Add option to toggle full screen / letterbox video.
- Add camera fps settings.
- Fix device to landscape orientation for HD video until issue 3936
will be fixed.
- Fix a few crashes by avoiding calling peer connection and
GAE signaling function while connection is closing.
- Better handling GAE channel error - catch channel exceptions and
display dialog with error messages.

BUG=3939, 3935
R=kjellander@webrtc.org, pthatcher@webrtc.org, tkchin@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn@7601 4adac7df-926f-26a2-2b94-8c16560cd09d
(Auto)update libjingle 79104430-> 79104922

git-svn-id: http://webrtc.googlecode.com/svn@7602 4adac7df-926f-26a2-2b94-8c16560cd09d
Improving error message from neteq_rtpplay

If a packet with unknown RTP payload type is inserted, this CL
will make sure that the error message is a little more detailed
and gives a better understadning of what to do.

BUG=2692
R=tina.legrand@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn@7603 4adac7df-926f-26a2-2b94-8c16560cd09d
Enables AIMD control by default.

BUG=1788
R=pbos@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn@7604 4adac7df-926f-26a2-2b94-8c16560cd09d
Prepare for removal of PeerConnectionObserver::OnError.
Prepare for removal of constraints to PeerConnection::AddStream.

OnError has never been implemented and has been removed from the spec.
Also, constraints to PeerConnection::AddStream has also been removed from the spec and have never been implemented.

R=pbos@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn@7605 4adac7df-926f-26a2-2b94-8c16560cd09d
Remove the codec_type_ member from AudioDecoder

It isn't actually required, as evidenced by the comparative ease with
which it can be removed.

R=henrik.lundin@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn@7606 4adac7df-926f-26a2-2b94-8c16560cd09d
Change the PeerConnection proxy templates to use blocking method calls instead of using Thread::Send.
The problem with Thread::Send is that it processes incoming pending messages and for the proxies,
this can mean that multiple incoming calls can concurrently run on the same thread, resulting in unexpected behavior.

See e.g. crbug.com/429740 (and more)

R=perkj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn@7607 4adac7df-926f-26a2-2b94-8c16560cd09d
ReAdd PeerConnectionInterface::AddStream to fix Chrome build.
AddStream(MediaStreamInterface* stream, const MediaConstraintsInterface* constraints);
This will be removed once Chrome has been updated.

R=tommi@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn@7608 4adac7df-926f-26a2-2b94-8c16560cd09d
Remove the useless dummy state parameter to WebRtcG711_*

R=henrik.lundin@webrtc.org

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

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