Commit Graph

1425 Commits

Author SHA1 Message Date
02ed201182 AcmReceiver: Make a member variable const
This is a minor clean-up made possible by simplifications done in the
past.

Bug: none
Change-Id: Id0ea167572f8da36db5de949441f67a2a18555be
Reviewed-on: https://chromium-review.googlesource.com/528073
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18490}
2017-06-08 09:18:14 +00:00
7a2862a933 Fix a bug in RtcEventLogSource
A recent change (https://codereview.webrtc.org/2855143002/) introduced
a bug in RtcEventLogSource::NextPacket(). The rtp_packet_index_ must
be incremented when a valid packet is found and delivered. Otherwise,
the same packet will be delivered over and over again.

The recent change also altered the way that audio packets are sifted out. Now, the RTP header is always parsed before discarding any non-audio packets. This means that RtpHeaderParser::Parse is always called, also with video packets, which sometimes contain padding. When header-only dumps (such as RtcEventLogs) are created, the payload is stripped, and the payload length is equal to
the RTP header length. However, if the original packet was padded, the
RTP header will carry information about this padding length, and the
parser will check that the pyaload length is at least the header +
padding. This is not the case for header-only dumps, and the parser will return an error. In this CL, we ignore that error when a header-only packet has padding length larger than 0.

BUG=webrtc:7538

Review-Url: https://codereview.webrtc.org/2912323003
Cr-Commit-Position: refs/heads/master@{#18385}
2017-06-01 14:41:11 +00:00
7926c12933 Delete unneeded includes of system_wrappers/include/sleep.h
BUG=None

Review-Url: https://codereview.webrtc.org/2915903003
Cr-Commit-Position: refs/heads/master@{#18380}
2017-06-01 12:34:08 +00:00
3edccb999c Reland of Enabling gn check on webrtc/test (patchset #1 id:1 of https://codereview.webrtc.org/2920763002/ )
Reason for revert:
Fixing and re-landing.

Original issue's description:
> Revert of Enabling `gn check` on webrtc/test (patchset #9 id:160001 of https://codereview.webrtc.org/2911203002/ )
>
> Reason for revert:
> ERROR at //webrtc/test/testsupport/fileutils_unittest.cc:20:11: Can't include this header from here.
> #include "webrtc/base/checks.h"
>           ^-------------------
> The target:
>   //webrtc/test:fileutils_unittests
> is including a file from the target:
>   //webrtc/base:rtc_base_approved
>
> It's usually best to depend directly on the destination target.
> In some cases, the destination target is considered a subcomponent
> of an intermediate target. In this case, the intermediate target
> should depend publicly on the destination to forward the ability
> to include headers.
>
> Dependency chain (there may also be others):
>   //webrtc/test:fileutils_unittests -->
>   //webrtc/test:fileutils --[private]-->
>   //webrtc/base:rtc_base_approved
>
>
> Original issue's description:
> > Enabling `gn check` on webrtc/test
> >
> > BUG=webrtc:6828
> > NOTRY=True
> >
> > Review-Url: https://codereview.webrtc.org/2911203002
> > Cr-Commit-Position: refs/heads/master@{#18372}
> > Committed: db5bb404b0
>
> TBR=kjellander@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6828
>
> Review-Url: https://codereview.webrtc.org/2920763002
> Cr-Commit-Position: refs/heads/master@{#18375}
> Committed: 1a6f143d07

TBR=kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6828

Review-Url: https://codereview.webrtc.org/2918793002
Cr-Commit-Position: refs/heads/master@{#18376}
2017-06-01 11:47:20 +00:00
1a6f143d07 Revert of Enabling gn check on webrtc/test (patchset #9 id:160001 of https://codereview.webrtc.org/2911203002/ )
Reason for revert:
ERROR at //webrtc/test/testsupport/fileutils_unittest.cc:20:11: Can't include this header from here.
#include "webrtc/base/checks.h"
          ^-------------------
The target:
  //webrtc/test:fileutils_unittests
is including a file from the target:
  //webrtc/base:rtc_base_approved

It's usually best to depend directly on the destination target.
In some cases, the destination target is considered a subcomponent
of an intermediate target. In this case, the intermediate target
should depend publicly on the destination to forward the ability
to include headers.

Dependency chain (there may also be others):
  //webrtc/test:fileutils_unittests -->
  //webrtc/test:fileutils --[private]-->
  //webrtc/base:rtc_base_approved

Original issue's description:
> Enabling `gn check` on webrtc/test
>
> BUG=webrtc:6828
> NOTRY=True
>
> Review-Url: https://codereview.webrtc.org/2911203002
> Cr-Commit-Position: refs/heads/master@{#18372}
> Committed: db5bb404b0

TBR=kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6828

Review-Url: https://codereview.webrtc.org/2920763002
Cr-Commit-Position: refs/heads/master@{#18375}
2017-06-01 11:25:40 +00:00
db5bb404b0 Enabling gn check on webrtc/test
BUG=webrtc:6828
NOTRY=True

Review-Url: https://codereview.webrtc.org/2911203002
Cr-Commit-Position: refs/heads/master@{#18372}
2017-06-01 11:07:12 +00:00
108904cba1 Use overloaded UpdateNetworkMetrics()
Use an overloaded version of UpdateNetworkMetrics() which does not require us to explicitly pass in an rtc::Optional.

BUG=None

Review-Url: https://codereview.webrtc.org/2899313004
Cr-Commit-Position: refs/heads/master@{#18347}
2017-05-31 09:46:00 +00:00
cff9dfdc4a FecControler disables FEC when *below* threshold
(This CL concerns both the PLR-based as well as the RPLR-based versions of FecController.)
1. Make FecController disable only when below the disabling-threshold, so as to prevent toggling when the enabling-curve and the disabling-curve are identical.
2. Extend unit-test coverage accordingly.

BUG=None

Review-Url: https://codereview.webrtc.org/2906663002
Cr-Commit-Position: refs/heads/master@{#18337}
2017-05-30 21:44:50 +00:00
12de077b14 Avoiding check on reordering configs in ANA if there is no controller has scoring point.
BUG=webrtc:7729

Review-Url: https://codereview.webrtc.org/2910193002
Cr-Commit-Position: refs/heads/master@{#18331}
2017-05-30 15:56:08 +00:00
678d2ee651 Cosmetic change in ANA: renaming characteristic points for consistency.
BUG=none

Review-Url: https://codereview.webrtc.org/2907153004
Cr-Commit-Position: refs/heads/master@{#18329}
2017-05-30 14:36:20 +00:00
77cd58e140 This cl removes RtcEventLog deps to call:call_interfaces. The purpose is to be able to use the event log from the upcoming RtpTransport.
Biggest change is to Remove MediaType as argument to RtcEventLog::LogRtpHeader and RtcEventLog::LogRtcpHeader.
Since the type is used by tools, these tools are rewritten to figure out the media type from the configurations instead.

BUG=webrtc:7538
TBR=solenberg@webrtc.org // For call.cc and voiceengine.cc

Review-Url: https://codereview.webrtc.org/2855143002
Cr-Commit-Position: refs/heads/master@{#18324}
2017-05-30 10:52:10 +00:00
edd6eea542 Rename elad.alon to eladalon, to avoid confusion between repositories.
BUG=None
NOTRY=true

Review-Url: https://codereview.webrtc.org/2899303002
Cr-Commit-Position: refs/heads/master@{#18264}
2017-05-25 07:15:35 +00:00
0afb13014b AudioEncoderPcm16B: Number of bits/sample is 16, not 2
Clearly, this was a case of bit/byte confusion.

BUG=none

Review-Url: https://codereview.webrtc.org/2904883002
Cr-Commit-Position: refs/heads/master@{#18254}
2017-05-24 11:09:52 +00:00
3696f7efc4 Remove unneeded gmock header from RPLR UT
BUG=None

Review-Url: https://codereview.webrtc.org/2898193002
Cr-Commit-Position: refs/heads/master@{#18250}
2017-05-24 07:13:25 +00:00
e3fc11464e Fixed NetEq overflow bug.
Negating an int can result in a value that cannot be represented as an int. This is fixed here by using a 64 bit variable.

BUG=chromium:663611

Review-Url: https://codereview.webrtc.org/2879863002
Cr-Commit-Position: refs/heads/master@{#18167}
2017-05-16 14:13:15 +00:00
9baa77981f Moving compile_assert_c.h to webrtc/base
This header was not tracked by a GN target and in the discussion on
https://bugs.chromium.org/p/webrtc/issues/detail?id=7617 we decided
to also move it under webrtc/base.

I checked in chromium code search and it seems safe to move it
without creating a stub header in webrtc/system_wrappers.

BUG=webrtc:7617

Review-Url: https://codereview.webrtc.org/2882673002
Cr-Commit-Position: refs/heads/master@{#18151}
2017-05-15 15:06:47 +00:00
a8e2c63a99 Add untracked header files to GN targets in audio_coding
BUG=webrtc:7619

Review-Url: https://codereview.webrtc.org/2875033002
Cr-Commit-Position: refs/heads/master@{#18101}
2017-05-11 14:18:06 +00:00
b8c55b15a3 Handle padded audio packets correctly
RTP packets can be padded with extra data at the end of the payload. The usable
payload length of the packet should then be reduced with the padding length,
since the padding must be discarded. This was not the case; instead, the entire
payload, including padding data, was forwarded to the audio channel and in the
end to the decoder.

A special case of padding is packets which are empty except for the padding.
That is, they carry no usable payload. These packets are sometimes used for
probing the network and were discarded in
RTPReceiverAudio::ParseAudioCodecSpecific. The result is that NetEq never sees
those empty packets, just the holes in the sequence number series; this can
throw off the target buffer calculations.

With this change, the empty (after removing the padding) packets are let through,
all the way down to NetEq, to a new method called NetEq::InsertEmptyPacket. This
method notifies the DelayManager that an empty packet was received.

BUG=webrtc:7610, webrtc:7625

Review-Url: https://codereview.webrtc.org/2870043003
Cr-Commit-Position: refs/heads/master@{#18083}
2017-05-10 14:38:01 +00:00
2979f55f95 NetEq: Fix a bug in expand_rate and speech_expand_rate calculation
After a Merge operation, the statistics for number of samples
generated using Expand must be corrected, and the correction can in
fact be negative. However, a bug was introduced in
https://codereview.webrtc.org/1230503003 which uses a size_t to
represent the correction, which leads to wrap-around of the negative
value. This is not a problem in itself, since this value is added to
another size_t, with the effect that the desired subtraction happens
anyway.

The actual problem arises if the statistics are polled/reset before a
subtraction happens -- that is, between an Expand and a Merge
operation. This will lead to an actual wrap-around of the stats value,
and large expand_rate (16384) is reported.

BUG=webrtc:7554

Review-Url: https://codereview.webrtc.org/2859483005
Cr-Commit-Position: refs/heads/master@{#18029}
2017-05-05 12:04:16 +00:00
02739d9149 NetEqTest: Extend the callback structure
This change allows more callbacks to be registered to the test object.
The callbacks are used to give the user of the test object the ability
to instrument the test object. This CL specifically adds
instrumentation points just after a packet is inserted into NetEq, and
just after audio is pulled out of NetEq.

BUG=webrtc:7467

Review-Url: https://codereview.webrtc.org/2851383004
Cr-Commit-Position: refs/heads/master@{#18014}
2017-05-04 13:09:06 +00:00
eb1fde4a26 Injectable audio encoders: Moved audio encoder, factory and builtin factory to api/.
Plumbed AudioEncoderFactory up into CreatePeerConnectionFactory.

BUG=webrtc:5806

Review-Url: https://codereview.webrtc.org/2799033006
Cr-Commit-Position: refs/heads/master@{#17977}
2017-05-02 13:46:30 +00:00
0d6195dd15 Hooked up Opus CBR support when configured manually or through an SdpAudioFormat.
BUG=webrtc:7394

Review-Url: https://codereview.webrtc.org/2798403003
Cr-Commit-Position: refs/heads/master@{#17931}
2017-04-28 14:33:18 +00:00
148d5a2dca Reland of Enable GN check for webrtc/base (patchset #3 id:230001 of https://codereview.webrtc.org/2838683002/ )
Reason for revert:
Fourth attempt to land.

Waiting for https://codereview.webrtc.org/2845013003 to
avoid conflicts on webrtc/modules/audio_coding:neteq_unittest_tools.

Original issue's description:
> Revert of Enable GN check for webrtc/base (patchset #13 id:240001 of https://codereview.webrtc.org/2717083002/ )
>
> Reason for revert:
> Breaks Chromium because in Chromium we import WebRTC with rtc_include_tests=false (https://bugs.chromium.org/p/chromium/issues/detail?id=713179#c6).
>
> Chromium uses webrtc/test/fuzzers and this CL adds test dependencies to neteq_rtc_fuzzer.
>
> Original issue's description:
> > Enable GN check for webrtc/base
> >
> > It's not possible to enable it for the rtc_base_approved
> > target but since a larger refactoring is ongoing for webrtc/base
> > this CL doesn't attempt to fix that.
> >
> > Changes made:
> > * Move webrtc/system_wrappers/include/stringize_macros.h into
> >   webrtc/base:rtc_base_approved_unittests (and corresponding
> >   unit test to rtc_base_approved_unittests).
> > * Move md5digest.* from rtc_base_approved to rtc_base_test_utils target.
> > * Move webrtc/system_wrappers/include/stringize_macros.h (+test) into
> >   webrtc/base.
> > * Remove unused use include of webrtc/base/fileutils.h in
> >   webrtc/base/pathutils.cc
> >
> > BUG=webrtc:6828, webrtc:3806, webrtc:7480
> > NOTRY=True
> >
> > Review-Url: https://codereview.webrtc.org/2717083002
> > Cr-Commit-Position: refs/heads/master@{#17766}
> > Committed: ed754e71ae
>
> TBR=perkj@webrtc.org,tommi@webrtc.org,nisse@webrtc.org,kjellander@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:6828, webrtc:3806, webrtc:7480
> NOTRY=True
>
> Review-Url: https://codereview.webrtc.org/2838683002
> Cr-Commit-Position: refs/heads/master@{#17849}
> Committed: 11ed366c48

TBR=perkj@webrtc.org,tommi@webrtc.org,nisse@webrtc.org,kjellander@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6828, webrtc:3806, webrtc:7480

Review-Url: https://codereview.webrtc.org/2852663002
Cr-Commit-Position: refs/heads/master@{#17927}
2017-04-28 12:24:50 +00:00
7a38fd2628 Add NetEqInput::PacketData::ToString method
This new method prints information about the packet.

BUG=webrtc:7467

Review-Url: https://codereview.webrtc.org/2844283002
Cr-Commit-Position: refs/heads/master@{#17922}
2017-04-28 08:35:53 +00:00
b637a94b63 NetEq tests: BUILD target reorg
In this CL, the neteq_unittest_tools target is split in two separate
targets. One still called neteq_tools which does not set
testonly=true and that includes code related to audio input,
replacement audio and fake decoding. The other target called
neteq_test_tools contains the remaining files, and is
still under testonly=true.

Other renames:
neteq_test_tools -> neteq_test_tools_deprecated
neteq_test_minimal -> neteq_tools_minimal

Cyclic dependencies were also cleaned up.

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_rel_ng,linux_chromium_compile_dbg_ng
BUG=webrtc:7467,webrtc:6828

Review-Url: https://codereview.webrtc.org/2845013003
Cr-Commit-Position: refs/heads/master@{#17921}
2017-04-28 07:59:45 +00:00
20a4b3fb2a Injectable audio encoders: WebRtcVoiceEngine and company
These are the changes made to WebRtcVoiceEngine and surrounding
code. It still contains some things that are inelegant, like how
AudioCodecSpec and AudioFormatInfo is ferried around in
SendCodecSpec. This should probably be resolved before landing.

There are also a few test still that are disabled. They should be
removed or fixed, as the case may be.

I've put this CL up to get a better overview of the changes made and
how reviewable they are.

BUG=webrtc:5806

Review-Url: https://codereview.webrtc.org/2705093002
Cr-Commit-Position: refs/heads/master@{#17904}
2017-04-27 09:08:52 +00:00
66753c34ad Normalize codec names to those used by AcmCodecDatabase.
With the upcoming changes to WebRtcVoiceEngine due to injectable audio
encoders, codec names will no longer be normalized against the ACM's
codec database. This not only breaks a couple of downstream tests
(which I've written fixes for) but also runs the risk of breaking
other external usage, like SDP mangling etc.

Eventually, we should change to using the spelling from the relevant
RFCs, although not as part of this other, large change.

BUG=webrtc:5806

Review-Url: https://codereview.webrtc.org/2845603002
Cr-Commit-Position: refs/heads/master@{#17903}
2017-04-27 08:47:13 +00:00
a05d3c8efe NetEq: Add a VoidAudioSink tool
This is to be used in tests where the audio output is not interesting.

BUG=webrtc:7467

Review-Url: https://codereview.webrtc.org/2842033003
Cr-Commit-Position: refs/heads/master@{#17893}
2017-04-26 16:32:07 +00:00
65881de6c8 NetEq: Limit payload size for replacement audio input
With this fix, the size of the fake encoded payload is limited to 120
ms at 48000 samples/second.

BUG=webrtc:7467

Review-Url: https://codereview.webrtc.org/2838353002
Cr-Commit-Position: refs/heads/master@{#17891}
2017-04-26 15:23:35 +00:00
114c1b3afa NetEq: Add functionality to assist with delay analysis and tooling
This CL adds a few methods to the NetEq API that will be used for
delay analysis and plotting.

BUG=webrtc:7467

Review-Url: https://codereview.webrtc.org/2839163002
Cr-Commit-Position: refs/heads/master@{#17889}
2017-04-26 14:47:32 +00:00
1140f97e48 Reland of Creating webrtc/modules:module_api (patchset #1 id:1 of https://codereview.webrtc.org/2839963005/ )
Reason for revert:
Fixing the Gn error and try to reland.

Original issue's description:
> Revert of Creating webrtc/modules:module_api (patchset #5 id:80001 of https://codereview.webrtc.org/2838873002/ )
>
> Reason for revert:
> Causes build problem: https://build.chromium.org/p/client.webrtc/builders/iOS64%20Sim%20Debug%20%28iOS%209.0%29/builds/1630/steps/generate%20build%20files%20%28mb%29/logs/stdio
>
> Original issue's description:
> > Creating webrtc/modules:module_api
> >
> > This target keeps track of .h the files under webrtc/modules/include/
> > that are not part of any target.
> > If a .h file is not part of a target the 'gn check' utility is not
> > able to spot if a target is missing a dependency because even if
> > it parses '#include' directives it is not able to find a target that
> > contains these headers.
> >
> > BUG=webrtc:7513
> > NOTRY=True
> >
> > Review-Url: https://codereview.webrtc.org/2838873002
> > Cr-Commit-Position: refs/heads/master@{#17880}
> > Committed: 5a1a092ed0
>
> TBR=kjellander@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7513
>
> Review-Url: https://codereview.webrtc.org/2839963005
> Cr-Commit-Position: refs/heads/master@{#17881}
> Committed: bb08c3e296

TBR=kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=kjellander@webrtc.org
BUG=webrtc:7513

Review-Url: https://codereview.webrtc.org/2843913002
Cr-Commit-Position: refs/heads/master@{#17884}
2017-04-26 10:38:35 +00:00
bb08c3e296 Revert of Creating webrtc/modules:module_api (patchset #5 id:80001 of https://codereview.webrtc.org/2838873002/ )
Reason for revert:
Causes build problem: https://build.chromium.org/p/client.webrtc/builders/iOS64%20Sim%20Debug%20%28iOS%209.0%29/builds/1630/steps/generate%20build%20files%20%28mb%29/logs/stdio

Original issue's description:
> Creating webrtc/modules:module_api
>
> This target keeps track of .h the files under webrtc/modules/include/
> that are not part of any target.
> If a .h file is not part of a target the 'gn check' utility is not
> able to spot if a target is missing a dependency because even if
> it parses '#include' directives it is not able to find a target that
> contains these headers.
>
> BUG=webrtc:7513
> NOTRY=True
>
> Review-Url: https://codereview.webrtc.org/2838873002
> Cr-Commit-Position: refs/heads/master@{#17880}
> Committed: 5a1a092ed0

TBR=kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7513

Review-Url: https://codereview.webrtc.org/2839963005
Cr-Commit-Position: refs/heads/master@{#17881}
2017-04-26 09:00:16 +00:00
5a1a092ed0 Creating webrtc/modules:module_api
This target keeps track of .h the files under webrtc/modules/include/
that are not part of any target.
If a .h file is not part of a target the 'gn check' utility is not
able to spot if a target is missing a dependency because even if
it parses '#include' directives it is not able to find a target that
contains these headers.

BUG=webrtc:7513
NOTRY=True

Review-Url: https://codereview.webrtc.org/2838873002
Cr-Commit-Position: refs/heads/master@{#17880}
2017-04-26 08:53:54 +00:00
3d7b0e2fda Revert of Enable GN check for webrtc/base (patchset #9 id:350001 of https://codereview.webrtc.org/2840453004/ )
Reason for revert:
It causes a Chromium build error:

ERROR at //third_party/webrtc/test/BUILD.gn:113:5: Can't load input file.
    "//third_party/gflags",

Original issue's description:
> Reland of Enable GN check for webrtc/base (patchset #3 id:230001 of https://codereview.webrtc.org/2838683002/ )
>
> Reason for revert:
> Try to fix the webrtc/test/fuzzers issue and reland this CL because it
> contains lots of fixes for our BUILD.gn files.
>
> Original issue's description:
> > Revert of Enable GN check for webrtc/base (patchset #13 id:240001 of https://codereview.webrtc.org/2717083002/ )
> >
> > Reason for revert:
> > Breaks Chromium because in Chromium we import WebRTC with rtc_include_tests=false (https://bugs.chromium.org/p/chromium/issues/detail?id=713179#c6).
> >
> > Chromium uses webrtc/test/fuzzers and this CL adds test dependencies to neteq_rtc_fuzzer.
> >
> > Original issue's description:
> > > Enable GN check for webrtc/base
> > >
> > > It's not possible to enable it for the rtc_base_approved
> > > target but since a larger refactoring is ongoing for webrtc/base
> > > this CL doesn't attempt to fix that.
> > >
> > > Changes made:
> > > * Move webrtc/system_wrappers/include/stringize_macros.h into
> > >   webrtc/base:rtc_base_approved_unittests (and corresponding
> > >   unit test to rtc_base_approved_unittests).
> > > * Move md5digest.* from rtc_base_approved to rtc_base_test_utils target.
> > > * Move webrtc/system_wrappers/include/stringize_macros.h (+test) into
> > >   webrtc/base.
> > > * Remove unused use include of webrtc/base/fileutils.h in
> > >   webrtc/base/pathutils.cc
> > >
> > > BUG=webrtc:6828, webrtc:3806, webrtc:7480
> > > NOTRY=True
> > >
> > > Review-Url: https://codereview.webrtc.org/2717083002
> > > Cr-Commit-Position: refs/heads/master@{#17766}
> > > Committed: ed754e71ae
> >
> > TBR=perkj@webrtc.org,tommi@webrtc.org,nisse@webrtc.org,kjellander@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:6828, webrtc:3806, webrtc:7480
> > NOTRY=True
> >
> > Review-Url: https://codereview.webrtc.org/2838683002
> > Cr-Commit-Position: refs/heads/master@{#17849}
> > Committed: 11ed366c48
>
> TBR=perkj@webrtc.org,tommi@webrtc.org,nisse@webrtc.org,kjellander@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6828, webrtc:3806, webrtc:7480
>
> Review-Url: https://codereview.webrtc.org/2840453004
> Cr-Commit-Position: refs/heads/master@{#17876}
> Committed: 7054085e59

TBR=perkj@webrtc.org,tommi@webrtc.org,nisse@webrtc.org,kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6828, webrtc:3806, webrtc:7480

Review-Url: https://codereview.webrtc.org/2846483002
Cr-Commit-Position: refs/heads/master@{#17877}
2017-04-26 07:38:48 +00:00
7054085e59 Reland of Enable GN check for webrtc/base (patchset #3 id:230001 of https://codereview.webrtc.org/2838683002/ )
Reason for revert:
Try to fix the webrtc/test/fuzzers issue and reland this CL because it
contains lots of fixes for our BUILD.gn files.

Original issue's description:
> Revert of Enable GN check for webrtc/base (patchset #13 id:240001 of https://codereview.webrtc.org/2717083002/ )
>
> Reason for revert:
> Breaks Chromium because in Chromium we import WebRTC with rtc_include_tests=false (https://bugs.chromium.org/p/chromium/issues/detail?id=713179#c6).
>
> Chromium uses webrtc/test/fuzzers and this CL adds test dependencies to neteq_rtc_fuzzer.
>
> Original issue's description:
> > Enable GN check for webrtc/base
> >
> > It's not possible to enable it for the rtc_base_approved
> > target but since a larger refactoring is ongoing for webrtc/base
> > this CL doesn't attempt to fix that.
> >
> > Changes made:
> > * Move webrtc/system_wrappers/include/stringize_macros.h into
> >   webrtc/base:rtc_base_approved_unittests (and corresponding
> >   unit test to rtc_base_approved_unittests).
> > * Move md5digest.* from rtc_base_approved to rtc_base_test_utils target.
> > * Move webrtc/system_wrappers/include/stringize_macros.h (+test) into
> >   webrtc/base.
> > * Remove unused use include of webrtc/base/fileutils.h in
> >   webrtc/base/pathutils.cc
> >
> > BUG=webrtc:6828, webrtc:3806, webrtc:7480
> > NOTRY=True
> >
> > Review-Url: https://codereview.webrtc.org/2717083002
> > Cr-Commit-Position: refs/heads/master@{#17766}
> > Committed: ed754e71ae
>
> TBR=perkj@webrtc.org,tommi@webrtc.org,nisse@webrtc.org,kjellander@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:6828, webrtc:3806, webrtc:7480
> NOTRY=True
>
> Review-Url: https://codereview.webrtc.org/2838683002
> Cr-Commit-Position: refs/heads/master@{#17849}
> Committed: 11ed366c48

TBR=perkj@webrtc.org,tommi@webrtc.org,nisse@webrtc.org,kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6828, webrtc:3806, webrtc:7480

Review-Url: https://codereview.webrtc.org/2840453004
Cr-Commit-Position: refs/heads/master@{#17876}
2017-04-26 07:28:08 +00:00
7885d3f5c6 Add SafeMin() and SafeMax(), which accept args of different types
Specifically, they handle all combinations of two integer and two
floating-point arguments by picking a result type that is guaranteed
to be able to hold the result. This means callers no longer have to
deal with potentially dangerous casting to make all the arguments have
the same type, like they have to with std::min() and std::max().

Also, they're constexpr.

Mostly for illustrative purposes, this CL replaces a few std::min()
and std::max() calls with SafeMin() and SafeMax().

BUG=webrtc:7459

Review-Url: https://codereview.webrtc.org/2810483002
Cr-Commit-Position: refs/heads/master@{#17869}
2017-04-25 19:35:07 +00:00
e0629c045e GN: Tighten up test target visibility + refactorings
Make all rtc_source_test target that contains tests that
are included in a test executable only be visible to the
rtc_test target. Doing this exposed a couple of errors and
dependency problems that were resolved. Having this could
have prevented duplicated execution of tests like the case that
was recently fixed by deadbeef@ in
https://codereview.webrtc.org/2820263004

New targets:
* //webrtc/modules/rtp_rtcp:fec_test_helper
* //webrtc/modules/rtp_rtcp:mock_rtp_rtcp
* //webrtc/modules/remote_bitrate_estimator:mock_remote_bitrate_observer

The mock files and targets should probably be moved into webrtc/test in
the future, but that's out of the scope of this CL.

BUG=webrtc:5716
NOTRY=True

Review-Url: https://codereview.webrtc.org/2828793003
Cr-Commit-Position: refs/heads/master@{#17863}
2017-04-25 11:04:50 +00:00
11ed366c48 Revert of Enable GN check for webrtc/base (patchset #13 id:240001 of https://codereview.webrtc.org/2717083002/ )
Reason for revert:
Breaks Chromium because in Chromium we import WebRTC with rtc_include_tests=false (https://bugs.chromium.org/p/chromium/issues/detail?id=713179#c6).

Chromium uses webrtc/test/fuzzers and this CL adds test dependencies to neteq_rtc_fuzzer.

Original issue's description:
> Enable GN check for webrtc/base
>
> It's not possible to enable it for the rtc_base_approved
> target but since a larger refactoring is ongoing for webrtc/base
> this CL doesn't attempt to fix that.
>
> Changes made:
> * Move webrtc/system_wrappers/include/stringize_macros.h into
>   webrtc/base:rtc_base_approved_unittests (and corresponding
>   unit test to rtc_base_approved_unittests).
> * Move md5digest.* from rtc_base_approved to rtc_base_test_utils target.
> * Move webrtc/system_wrappers/include/stringize_macros.h (+test) into
>   webrtc/base.
> * Remove unused use include of webrtc/base/fileutils.h in
>   webrtc/base/pathutils.cc
>
> BUG=webrtc:6828, webrtc:3806, webrtc:7480
> NOTRY=True
>
> Review-Url: https://codereview.webrtc.org/2717083002
> Cr-Commit-Position: refs/heads/master@{#17766}
> Committed: ed754e71ae

TBR=perkj@webrtc.org,tommi@webrtc.org,nisse@webrtc.org,kjellander@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6828, webrtc:3806, webrtc:7480
NOTRY=True

Review-Url: https://codereview.webrtc.org/2838683002
Cr-Commit-Position: refs/heads/master@{#17849}
2017-04-24 19:26:27 +00:00
246ef3ea0e Change from WebRtcRTPHeader to RTPHeader in NetEq tests and tools
With this CL, all tests and tools under the neteq/ folder are
converted to use RTPHeader instead of WebRtcRTPHeader. WebRtcRTPHeader
has an RTPHeader as a member. None of the other member in
WebRtcRTPHeader where used.

TBR=kjellander@webrtc.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_rel_ng,linux_chromium_compile_dbg_ng
BUG=webrtc:7467

Review-Url: https://codereview.webrtc.org/2809153002
Cr-Commit-Position: refs/heads/master@{#17845}
2017-04-24 16:14:32 +00:00
70c09bde41 Reland of Change NetEq::InsertPacket to take an RTPHeader (patchset #1 id:1 of https://codereview.webrtc.org/2812933002/ )
Reason for revert:
Downstream roadblock should be cleared by now. Relanding original patch.

Original issue's description:
> Revert of Change NetEq::InsertPacket to take an RTPHeader (patchset #2 id:20001 of https://codereview.webrtc.org/2807273004/ )
>
> Reason for revert:
> Broke downstream dependencies.
>
> Original issue's description:
> > Change NetEq::InsertPacket to take an RTPHeader
> >
> > It used to take a WebRtcRTPHeader as input, which has an RTPHeader as
> > a member. None of the other member in WebRtcRTPHeader where used in
> > NetEq.
> >
> > This CL adapts the production code; tests and tools will be converted
> > in a follow-up CL.
> >
> > BUG=webrtc:7467
> >
> > Review-Url: https://codereview.webrtc.org/2807273004
> > Cr-Commit-Position: refs/heads/master@{#17652}
> > Committed: 4d027576a6
>
> TBR=ivoc@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7467
>
> Review-Url: https://codereview.webrtc.org/2812933002
> Cr-Commit-Position: refs/heads/master@{#17657}
> Committed: 10d095d4f7

R=ivoc@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng
BUG=webrtc:7467

Review-Url: https://codereview.webrtc.org/2835093002 .
Cr-Commit-Position: refs/heads/master@{#17843}
2017-04-24 13:56:57 +00:00
0f109beb38 Fixing check for when overlap-add is not 1 ms
BUG=chromium:710812

Review-Url: https://codereview.webrtc.org/2814363002
Cr-Commit-Position: refs/heads/master@{#17835}
2017-04-24 07:22:05 +00:00
ed754e71ae Enable GN check for webrtc/base
It's not possible to enable it for the rtc_base_approved
target but since a larger refactoring is ongoing for webrtc/base
this CL doesn't attempt to fix that.

Changes made:
* Move webrtc/system_wrappers/include/stringize_macros.h into
  webrtc/base:rtc_base_approved_unittests (and corresponding
  unit test to rtc_base_approved_unittests).
* Move md5digest.* from rtc_base_approved to rtc_base_test_utils target.
* Move webrtc/system_wrappers/include/stringize_macros.h (+test) into
  webrtc/base.
* Remove unused use include of webrtc/base/fileutils.h in
  webrtc/base/pathutils.cc

BUG=webrtc:6828, webrtc:3806, webrtc:7480
NOTRY=True

Review-Url: https://codereview.webrtc.org/2717083002
Cr-Commit-Position: refs/heads/master@{#17766}
2017-04-19 15:37:36 +00:00
92aef17cb2 Replace Clock with timeutils in AudioEncoder.
BUG=webrtc:7398

Review-Url: https://codereview.webrtc.org/2782563003
Cr-Commit-Position: refs/heads/master@{#17732}
2017-04-18 07:11:48 +00:00
10d095d4f7 Revert of Change NetEq::InsertPacket to take an RTPHeader (patchset #2 id:20001 of https://codereview.webrtc.org/2807273004/ )
Reason for revert:
Broke downstream dependencies.

Original issue's description:
> Change NetEq::InsertPacket to take an RTPHeader
>
> It used to take a WebRtcRTPHeader as input, which has an RTPHeader as
> a member. None of the other member in WebRtcRTPHeader where used in
> NetEq.
>
> This CL adapts the production code; tests and tools will be converted
> in a follow-up CL.
>
> BUG=webrtc:7467
>
> Review-Url: https://codereview.webrtc.org/2807273004
> Cr-Commit-Position: refs/heads/master@{#17652}
> Committed: 4d027576a6

TBR=ivoc@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7467

Review-Url: https://codereview.webrtc.org/2812933002
Cr-Commit-Position: refs/heads/master@{#17657}
2017-04-11 14:47:59 +00:00
4d027576a6 Change NetEq::InsertPacket to take an RTPHeader
It used to take a WebRtcRTPHeader as input, which has an RTPHeader as
a member. None of the other member in WebRtcRTPHeader where used in
NetEq.

This CL adapts the production code; tests and tools will be converted
in a follow-up CL.

BUG=webrtc:7467

Review-Url: https://codereview.webrtc.org/2807273004
Cr-Commit-Position: refs/heads/master@{#17652}
2017-04-11 13:17:46 +00:00
e0ab0ad85d Rename COMPILE_ASSERT macro to RTC_COMPILE_ASSERT
This is needed to avoid name collision with some downstream projects.

BUG=b/37224347
TBR=henrika@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2808343002
Cr-Commit-Position: refs/heads/master@{#17634}
2017-04-11 06:21:43 +00:00
a1ef71f622 Add parser to visualise the ana dump
BUG=webrtc:7160

Review-Url: https://codereview.webrtc.org/2696133003
Cr-Commit-Position: refs/heads/master@{#17622}
2017-04-10 15:31:26 +00:00
37e99fd3fa Move AudioDecoder and AudioDecoderFactory mocks to webrtc/test/
AudioDecoder and AudioDecoderFactory are in webrtc/api/ now, so move
their mocks to someplace central where tests from all over WebRTC are
allowed to #include them.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2798063004
Cr-Commit-Position: refs/heads/master@{#17619}
2017-04-10 12:15:48 +00:00
49cad02cf3 Ignore some UBSan errors
They proved to be too difficult to fix properly, so we revert the
saturation fixes that were done in
https://codereview.webrtc.org/2729573002 and
https://codereview.webrtc.org/2746903002, and ignore them instead.

BUG=webrtc:7307, chromium:709364, chromium:693868

Review-Url: https://codereview.webrtc.org/2809483002
Cr-Commit-Position: refs/heads/master@{#17612}
2017-04-10 09:29:33 +00:00
9f2c18e237 Changed OLA window for neteq. Old code didnt work well with 48khz
fixing white spaces

updated authors file

Changed OLA window to use Q14 as Q5 dosnt work with 48khz. 1 ms @ 48 khz is > 2^5

BUG=webrtc:1361

Review-Url: https://codereview.webrtc.org/2763273003
Cr-Commit-Position: refs/heads/master@{#17611}
2017-04-10 09:22:46 +00:00