Add interface to signal a network down event.

- In real-time mode encoding will be paused until the network is back up.
- In buffering mode the encoder will keep encoding, and packets will be
  buffered at the sender. When the buffer grows above the target delay
  encoding will be paused.
- Fixes a couple of issues related to pacing which was found with the new test.
- Introduces different max bitrates for pacing and for encoding. This allows
  the pacer to faster get rid of the queue after a network down event.

(Work based on issue 1237004)

BUG=1524
TESTS=trybots,vie_auto_test

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3730 4adac7df-926f-26a2-2b94-8c16560cd09d
WebRTCDemo: remove unnecessary stop & start during orientation change which isn't necessary since API v14.
(required bumping minSdkVersion to 14)

This fixes a RuntimeException thrown on GalaxyNexus (but not N7, N4, or NS)
during startPreview() after the sequence of Start(), Stop(), Start(); seemingly
GN's OMX stack can't deal with parallel startPreview() & setPreviewDisplay() in
this situation.

Also:
- Only set the surface in the camera when valid
- Remove duplicate assignment
- Fix error check on voiceChannel allocation to account for multiple channel creation due to orientation change causing onDestroy()/onCreate() on the app, and rampant use of process-static holders for VoE data.

BUG=1537

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3731 4adac7df-926f-26a2-2b94-8c16560cd09d
Fix flakiness in network up/down event tests when running under memcheck.

TBR=pwestin@webrtc.org

BUG=1524

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3732 4adac7df-926f-26a2-2b94-8c16560cd09d
NetEq4 fails if the first packets inserted in are out-of-band DTMFs.

I had to take few steps to solve this issue. I have comments on places I made cahanges to clarify why I did the change.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3733 4adac7df-926f-26a2-2b94-8c16560cd09d
G722-stereo has been missing when creating AudioDecoder.
Review URL: https://webrtc-codereview.appspot.com/1266004

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

The problem was introduced in 3712, no need to external transport in
real test app, revert the change.

TBR=pwestin@webrtc.org
BUG=1539
Review URL: https://webrtc-codereview.appspot.com/1266005

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3735 4adac7df-926f-26a2-2b94-8c16560cd09d
Removed CPU APIs from VoEHardware. Code is now only used by test applications.

BUG=8404677

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3736 4adac7df-926f-26a2-2b94-8c16560cd09d
Revert 3736 "Removed CPU APIs from VoEHardware. Code is now only..."

> Removed CPU APIs from VoEHardware. Code is now only used by test applications.
> 
> BUG=8404677
> 
> Review URL: https://webrtc-codereview.appspot.com/1238004

TBR=henrike@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1267004

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3737 4adac7df-926f-26a2-2b94-8c16560cd09d
Removed all code enclosed in WEBRTC_SRTP #ifdefs, and the unsupported VoE SRTP APIs. Test stubs are left in place as we still have the (De)RegisterExternalEncryption() APIs, although they are currently untested.

Today I had to figure out this code was legacy. Now next person doesn't have to.

BUG=

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3738 4adac7df-926f-26a2-2b94-8c16560cd09d
Removed CPU APIs from VoEHardware. Code is now only used by test applications.

Recommitting https://code.google.com/p/webrtc/source/detail?r=3736 after fixing build break.

BUG=8404677
TBR=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3739 4adac7df-926f-26a2-2b94-8c16560cd09d
Fixes build break in previous cl (https://code.google.com/p/webrtc/source/detail?r=3739) found by Android bots.

TBR=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3740 4adac7df-926f-26a2-2b94-8c16560cd09d
Fix for issue: https://code.google.com/p/webrtc/issues/detail?id=1549
Review URL: https://webrtc-codereview.appspot.com/1270004

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3741 4adac7df-926f-26a2-2b94-8c16560cd09d
Updated Webrtc version to 3.28
Review URL: https://webrtc-codereview.appspot.com/1272006

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3745 4adac7df-926f-26a2-2b94-8c16560cd09d
For VGA (640x360), currently 1 thread is used.  This change increases it to 2 threads.  For HD, 4 threads are enabled.
BUG=none
TEST=run a hangout and screencast high framerate, high resolution windows of youtube.  Observe that 1 cpu is insufficient to maintain high framerate with complex content.
Review URL: https://webrtc-codereview.appspot.com/1203006

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3747 4adac7df-926f-26a2-2b94-8c16560cd09d
Fix opus bitrate truncated to 16-bit int. This prevented setting bitrates higher
than 2^16kbps.
Review URL: https://webrtc-codereview.appspot.com/1275004

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3748 4adac7df-926f-26a2-2b94-8c16560cd09d
Fixes data race in WebRTCAudioDeviceTest.Construct reported by ThreadSanitizer

BUG=159112

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3750 4adac7df-926f-26a2-2b94-8c16560cd09d
Two more sleep calls converted to use SleepMs().

BUG=603

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

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

TBR=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3752 4adac7df-926f-26a2-2b94-8c16560cd09d
Webrtc_Word32 => int32_t in video_coding/main/

BUG=

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3753 4adac7df-926f-26a2-2b94-8c16560cd09d
Remove UDP transport API from ViE
Review URL: https://webrtc-codereview.appspot.com/1232004

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