Small refactoring change in delay_estimator.

This CL produce the bit exact output and is a preparing step for an upcoming robust validation scheme.

TESTED=trybots, module_unittest
BUG=None
R=aluebs@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5184 4adac7df-926f-26a2-2b94-8c16560cd09d
Revert 5184 "Small refactoring change in delay_estimator."

> Small refactoring change in delay_estimator.
> 
> This CL produce the bit exact output and is a preparing step for an upcoming robust validation scheme.
> 
> TESTED=trybots, module_unittest
> BUG=None
> R=aluebs@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/4549004

TBR=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5185 4adac7df-926f-26a2-2b94-8c16560cd09d
Refactor Remote Estimators Test into a more reusable form.

BUG=
R=andresp@webrtc.org, mflodman@webrtc.org, stefan@webrtc.org

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

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

TBR=aluebs@webrtc.org
BUG=

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5187 4adac7df-926f-26a2-2b94-8c16560cd09d
Set up SSRCs correctly after switching codec.

Before SSRCs were not set up correctly, as the old VideoEngine API
doesn't support setting additional SSRCs before a codec with as many
streams are set.

No test was in place to catch this, so two tests are added to make sure
that we send the SSRCs that are set, and also that we can switch from
using one to using all SSRCs, even though initially not all of them are
set up.

BUG=
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5188 4adac7df-926f-26a2-2b94-8c16560cd09d
Lock frame in ViECapturer::IncomingFrameI420.

r5160 explicitly assumed that IncomingFrameI420 was never called
sequentially. This assumption was found to be incorrect when some users
were changing beween existing capturers.

BUG=2657
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5189 4adac7df-926f-26a2-2b94-8c16560cd09d
Fixes a crash in the pacer where it fails to find a normal prio packet if there are no high prio packets, given that the queue has grown too large.

BUG=2682
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5190 4adac7df-926f-26a2-2b94-8c16560cd09d
This CL adds an API to enable robust validation of delay estimates.

Added is
- a member variable for turning robust validation on and off.
- API to enable/disable feature.
- API to check if enabled.
- unit tests for these APIs.

Not added is
- the actual functionality (separate CL), hence turning feature on/off has no impact currently.
- calls in AEC and AEC, where the delay estimator is used. This is also done in a separate CL when we know if it should be turned on in both components.

TESTED=trybots, module_unittest
BUG=
R=aluebs@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5191 4adac7df-926f-26a2-2b94-8c16560cd09d
Disable check for all sent SSRCs being valid.

Since the code for setting these up will set the codec before setting
SSRCs for the streams, any frames sent in between will be sent on
random-generated SSRCs.

This part should be added back during work on issue 1695.

BUG=1695
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5192 4adac7df-926f-26a2-2b94-8c16560cd09d
Fixing long lines in apprtc.py.

These long lines causes the presubmit to get angry.

BUG=webrtc:2678
R=braveyao@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5193 4adac7df-926f-26a2-2b94-8c16560cd09d
Apprtc demo: add DSCP support.

BUG=2669
TEST=Manual Test
R=juberti@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5194 4adac7df-926f-26a2-2b94-8c16560cd09d
Fixing NetEq tests for new Opus version

The new version of Opus doesn't generate the same number of bytes encoding the test vectors in audio_decoder_unittest. Therefore the test was updated not to check the length of the encoded packet, to prepare for the coming roll of Opus. Same change was applied to iSAC, which can also generate different number of bytes on different platforms.

BUG=1459
R=henrik.lundin@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5195 4adac7df-926f-26a2-2b94-8c16560cd09d
RTCPeerConnection(objc): avoid leaking ICE candidate on addition.

BUG=2670
R=wu@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5199 4adac7df-926f-26a2-2b94-8c16560cd09d
Do not use recursive calling in NetEq test tools

This CL removes recursive calling in:
- NETEQTEST_DummyRTPpacket::readFromFile,
- NETEQTEST_RTPpacket::readFromFile.

The files currently exist for both NetEq3 and NetEq4, and all are
changed with this CL.

R=turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5200 4adac7df-926f-26a2-2b94-8c16560cd09d
Set local SSRC for VideoReceiveStream.

As a bonus, also removes GenerateRandomSsrc, which only worked on sender
configs. There's no point to generate random SSRCs in tests.

BUG=2691
R=mflodman@webrtc.org, stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5201 4adac7df-926f-26a2-2b94-8c16560cd09d
Change BitrateStats to more generalized RateStatistics

BUG=2656
R=holmer@google.com, mflodman@webrtc.org, stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5202 4adac7df-926f-26a2-2b94-8c16560cd09d
Utility class for reading/writing network-byte-ordered integers.

BUG=
R=holmer@google.com, mflodman@webrtc.org, stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5203 4adac7df-926f-26a2-2b94-8c16560cd09d
Add baseline generation/verification to BWE test framework.

Updating resource file separately, once LGTM. Generates ~628k of files for current tests, highly compressable, once/if we need that.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5204 4adac7df-926f-26a2-2b94-8c16560cd09d
Don't HANDLE_EINTR(close). Use IGNORE_EINTR(close).

It is incorrect to wrap close in HANDLE_EINTR on Linux.

BUG=chromium:269623
R=fischman@webrtc.org

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

Patch from Mark Mentovai <mark@chromium.org>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5206 4adac7df-926f-26a2-2b94-8c16560cd09d
Compile-out functions only used by the bit-exact test.

Causes errors on platforms where the test is unused.

TBR=bjornv

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

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