Commit Graph

1177 Commits

Author SHA1 Message Date
1e4d8b574c AcmReceiver: Look up last decoder in NetEq's table of decoders
AcmReceiver::decoders_ is now one step closer to being unused.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2339953002
Cr-Commit-Position: refs/heads/master@{#14274}
2016-09-17 15:40:17 +00:00
a6974d7f7e NetEq: Remove a test printout
BUG=none
TBR=minyue@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2342343002
Cr-Commit-Position: refs/heads/master@{#14262}
2016-09-16 13:11:38 +00:00
186cd06512 Adding DTX controller to audio network adaptor.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2320093002
Cr-Commit-Position: refs/heads/master@{#14260}
2016-09-16 12:54:47 +00:00
17f008bf33 GYP: Remove targets inside include_tests==1 that are converted to GN.
Remove a large number of targets that are no longer built, to reduce maintenance.
Only targets that have a GN version were removed.

BUG=webrtc:6323
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2340773003
Cr-Commit-Position: refs/heads/master@{#14231}
2016-09-15 11:57:39 +00:00
c26f77f5a6 Remove a couple of unnecessary dependencies on gflags
BUG=webrtc:5447, chromium:645069
NOTRY=True

Review-Url: https://codereview.webrtc.org/2335683002
Cr-Commit-Position: refs/heads/master@{#14221}
2016-09-15 07:05:00 +00:00
f807a521fa iSAC: Remove unnecessary WEBRTC_LINUX define
Similar to https://codereview.webrtc.org/1539883002
but for GN. This was discovered during GN vs GYP auditing.

NOTRY=True
BUG=webrtc:6323

Review-Url: https://codereview.webrtc.org/2344633002
Cr-Commit-Position: refs/heads/master@{#14220}
2016-09-15 06:15:55 +00:00
2e164c6b53 Adding ChannelController to audio network adaptor.
BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2319873002
Cr-Commit-Position: refs/heads/master@{#14216}
2016-09-14 13:47:39 +00:00
3a7f35b1c4 GN: Declare resources for targets.
Declare resources for GN targets so that they can be isolated

NOTRY=True
BUG=chromium:497757

Review-Url: https://codereview.webrtc.org/2340753002
Cr-Commit-Position: refs/heads/master@{#14210}
2016-09-14 12:10:06 +00:00
caa9cb2cea Adding basic implementation of AudioNetworkAdaptor.
The basic implementation of AudioNetworkAdaptor include the introduction of
  1. Controller
  2. ControllerManager

ControllerManager is to hold all needed controllers. It also orders them according to their significance in dealing with current network condition.

Controller provides an interface MakeDecision, which has to be implemented by specific controllers. AudioNetworkAdaptorImpl calls MakeDecision of the controllers in the order decided by ControllerManager to collect EncoderRuntimeConfig.

BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2306083002
Cr-Commit-Position: refs/heads/master@{#14201}
2016-09-13 20:34:22 +00:00
a41c13e6a2 OWNERS: Make everyone able to change *.gn,*.gni files.
Project-wide change to make it possible for all team members
to do changes to GN files.

NOTRY=True
R=kwiberg@webrtc.org
TBR=henrika@webrtc.org

Review URL: https://codereview.webrtc.org/2320043002 .

Cr-Commit-Position: refs/heads/master@{#14163}
2016-09-09 12:51:48 +00:00
2b1b7a83ad iSAC fix: Ignore overflow in signed left shift
A left shift by 10 was assumed to never overflow, since "[s]imulation
of the 25 files shows that maximum value in the vector gain_lo_hiQ17[]
is 441344, which means that it is log2((2^31)/441344) = 12.2 shifting
bits from saturation." However, a fuzzer test succeeded in provoking
an overflow, which we ignore in this CL on the theory that only
"abnormal" inputs cause overflow.

Also had to replace a "foo << 1" with "foo * (1 << 1)" in
WEBRTC_SPL_MUL_16_32_RSFT15 because foo could be negative; this
problem showed up as soon as I'd asked UBSan to ignore the overflow
discussed above.

BUG=chromium:615819

Review-Url: https://codereview.webrtc.org/2314413002
Cr-Commit-Position: refs/heads/master@{#14162}
2016-09-09 12:51:38 +00:00
22c8d5a3e0 Revert of Setting up an RTP input fuzzer for NetEq (patchset #2 id:20001 of https://codereview.webrtc.org/2315633002/ )
Reason for revert:
Broke all Chromium libFuzzer builds
https://bugs.chromium.org/p/chromium/issues/detail?id=645069

Original issue's description:
> Setting up an RTP input fuzzer for NetEq
>
> This CL introduces a new fuzzer target neteq_rtp_fuzzer that
> manipulates the RTP header fields before inserting the packets into
> NetEq. A few helper classes are also introduced.
>
> BUG=webrtc:5447
> NOTRY=True
>
> Committed: https://crrev.com/2d273f1e97cd5030ed1686f27ce1118291b66395
> Cr-Commit-Position: refs/heads/master@{#14103}

TBR=ivoc@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:5447

Review-Url: https://codereview.webrtc.org/2328483002
Cr-Commit-Position: refs/heads/master@{#14131}
2016-09-08 12:00:41 +00:00
17e3fa1fb4 Removed sync packet support from NetEq.
I could not find a single place it was used, outside of the unittests
for the sync packet support itself.

Review-Url: https://codereview.webrtc.org/2309303002
Cr-Commit-Position: refs/heads/master@{#14130}
2016-09-08 11:53:00 +00:00
243c0e8066 Fixing NetEqReplacementInput for reordered and missing packets
With this CL, the NetEqReplacementInput class handles reordered and
missing packets in a better way than before, by storing the last
confirmed packet size and using that when the next packet size cannot
be calculated.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2319553003
Cr-Commit-Position: refs/heads/master@{#14122}
2016-09-08 09:14:34 +00:00
7610f85a2b Adding AudioNetworkAdaptor interfaces.
AudioNetworkAdaptor is supposed to facilitate AudioEncoder to adapt to varying network conditions.

This is the first of a sequence of CLs that are to add one implementation of AudioNetworkAdaptor.

This CL illustrates the interfaces of the AudioNetworkAdaptor.

BUG=webrtc:6303

Review-Url: https://codereview.webrtc.org/2308573002
Cr-Commit-Position: refs/heads/master@{#14115}
2016-09-07 20:51:59 +00:00
88499ecaca Moving/renaming webrtc/common.h.
This file defines webrtc::Config which was mostly used by modules/audio_processing. The files webrtc/common.h, webrtc/common.cc and webrtc/test/common_unittests.cc are moved to modules/audio_processing and the few remaining uses of webrtc::Config are replaced with simpler code.

- For NetEq and pacing configuration, a VoEBase::ChannelConfig is passed to VoEBase::CreateChannel().
- Removes the need for VoiceEngine::Create(const Config& config). No need to store the webrtc::Config in VoE shared state.

BUG=webrtc:5879

Review-Url: https://codereview.webrtc.org/2307533004
Cr-Commit-Position: refs/heads/master@{#14109}
2016-09-07 14:34:45 +00:00
2d273f1e97 Setting up an RTP input fuzzer for NetEq
This CL introduces a new fuzzer target neteq_rtp_fuzzer that
manipulates the RTP header fields before inserting the packets into
NetEq. A few helper classes are also introduced.

BUG=webrtc:5447
NOTRY=True

Review-Url: https://codereview.webrtc.org/2315633002
Cr-Commit-Position: refs/heads/master@{#14103}
2016-09-07 12:57:34 +00:00
d52bef7d64 iSAC float: Handle errors in upper band decoding
We hit a fuzzer bug that caused numDecodedBytesLB + numDecodedBytesUB
> lenEncodedBytes, which is obviously bogus. Check for that, and for
the case whhere the UB decoder itself realized that something was
wrong. (The code already makes the corresponding check for the LB
decoder.)

BUG=chromium:637899

Review-Url: https://codereview.webrtc.org/2315693002
Cr-Commit-Position: refs/heads/master@{#14091}
2016-09-06 13:16:09 +00:00
d4ec970a79 neteq_rtpplay: Add an error message for unmatched SSRC
If neteq_rtpplay is invoked with the --ssrc option to select packets
matching a specific SSRC, but no matching packets are found, this CL
provides a meaningful error message.

BUG=webrtc:2692
NOTRY=True
TBR=ivoc@webrtc.org

Review-Url: https://codereview.webrtc.org/2318503002
Cr-Commit-Position: refs/heads/master@{#14083}
2016-09-06 08:22:51 +00:00
e9cc686293 GN Templates: Move common_inherited_config to the template.
Remove common_inherited_config from the targets and add it to the
template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2311843002
Cr-Commit-Position: refs/heads/master@{#14069}
2016-09-05 13:10:23 +00:00
59af8b7714 GN Templates: Use the optimize_max compiler config.
Add "//build/config/compiler:optimize_max" to rtc_add_configs and
"//build/config/compiler:default_optimization" to rtc_remove_configs.

This is the default optimization in GYP, and might help explain a 82.5%
regression in webrtc_perf_tests at 13946:13946

BUG=chromium:641966
NOTRY=True

Review-Url: https://codereview.webrtc.org/2307283002
Cr-Commit-Position: refs/heads/master@{#14067}
2016-09-05 09:48:58 +00:00
7a2ce0b738 GN Templates: Move common_config to the template.
Remove common_config from the targets' config and add
it to the template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2300413002
Cr-Commit-Position: refs/heads/master@{#14063}
2016-09-05 08:35:48 +00:00
1dd2335023 GN Templates: Add //build/config/sanitizers:deps to rtc_executable.
Remove //build/config/sanitizers:deps as a dependency for
all rtc_executable targets and add it to the template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2308553002
Cr-Commit-Position: refs/heads/master@{#14048}
2016-09-02 14:03:23 +00:00
38a2132b02 GN: Introduce templates.
Defines the rtc_executable, rtc_source_set, rtc_test and
rtc_static_library templates.

These templates provide no functionality yet, but will enable common
configuration to be introduced, avoiding repetition in every target

Changes summary:
- Prepend rtc_ to test, source_set, executable and static_library targets
- Change "configs -= [" to "suppressed_configs += ["
- Include webrtc/build/webrtc.gni where it wasn't included yet
- Delete import("//testing/test.gni"), since rtc_test makes it unnecessary.

BUG=webrtc:6187
TBR=henrik.lundin@webrtc.org,tommi@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2301053002
Cr-Commit-Position: refs/heads/master@{#14043}
2016-09-02 11:10:41 +00:00
ac554eebb9 Add functions to interact with ASan and MSan, and some sample uses
The sample uses are from when I debugged bug 617124. The change in neteq_network_stats_unittest.cc is a fix for a minor unrelated bug found by the try bots when I tried to land this CL (a test was passing uninitialized packet data to NetEq).

BUG=chromium:617124

Review-Url: https://codereview.webrtc.org/2293893002
Cr-Commit-Position: refs/heads/master@{#14034}
2016-09-02 07:39:40 +00:00
067d855291 NetEq: Flush and reset if the speech and cng sample rates mismatch
If a CNG packet is received first, followed by a speech packet with
another sample rate, NetEq should treat this as a change of codec, flush
out the CNG packet and reset the sample rate to that of the speech
packet.

BUG=webrtc:5447
NOTRY=True

Review-Url: https://codereview.webrtc.org/2307493002
Cr-Commit-Position: refs/heads/master@{#14032}
2016-09-02 06:19:12 +00:00
affcac4d22 WebRtcIlbcfix_EnhancerInterface: Let input array be const
NOTRY=true
BUG=chromium:617124

Review-Url: https://codereview.webrtc.org/2297873003
Cr-Commit-Position: refs/heads/master@{#14029}
2016-09-01 19:47:22 +00:00
Per
a0e60e8550 packet_buffer.cc: Removed #include of iostream.
A silly little mistake that broke upstream.

NOTRY=True
TBR=kwiberg@webrtc.org

Review URL: https://codereview.webrtc.org/2306613002 .

Cr-Commit-Position: refs/heads/master@{#14025}
2016-09-01 15:11:32 +00:00
ebd9fd7918 NetEq: Add a few EXPECT_CALLs to PacketBuffer unittests
This will silence a few noisy print-outs.

Review-Url: https://codereview.webrtc.org/2290173002
Cr-Commit-Position: refs/heads/master@{#14005}
2016-08-31 20:03:40 +00:00
dc431ce07e NetEq: Changed Packet::payload to be an rtc::Buffer
That is, rather than keeping a separate pointer and size.
This helps automate memory management in NetEq and will be useful in the
work to minimize the AudioDecoder interface as part of the injectable
audio codec work.

I'm planning a follow-up that will change the current management of Packet* to wrapping them in unique_ptr instead.

Review-Url: https://codereview.webrtc.org/2289093003
Cr-Commit-Position: refs/heads/master@{#14002}
2016-08-31 15:51:18 +00:00
25f32e723a Use max optimization when compiling neteq_performance_test.
The compiler optimization for Windows is O1 by default in GN, but O2 in GYP.
This might help explain the regression observed on neteq_performance_unittest.

NOTRY=True
BUG=641966

Review-Url: https://codereview.webrtc.org/2291253003
Cr-Commit-Position: refs/heads/master@{#13999}
2016-08-31 15:22:13 +00:00
da8bbf6e3c NetEq: Change member variables for current RTP types to rtc::Optionals
With this change, the value 0xFF is no longer used to flag that the RTP
type is unknown. Instead, an empty value for the rtc::Optional is used.

Review-Url: https://codereview.webrtc.org/2290153002
Cr-Commit-Position: refs/heads/master@{#13989}
2016-08-31 10:14:18 +00:00
c31446f49e iLBC: Some const annotations
NOTRY=true
BUG=chromium:617124

Review-Url: https://codereview.webrtc.org/2293843002
Cr-Commit-Position: refs/heads/master@{#13972}
2016-08-30 12:37:00 +00:00
32c4a20df7 GN: Fix resource files for iOS test target
In order to get resource files to be properly packaged into
the .app for a unit test on iOS, the resource files needs
to be listed as sources in a bundle_data target.

BUG=webrtc:5949
NOTRY=True

Review-Url: https://codereview.webrtc.org/2292853002
Cr-Commit-Position: refs/heads/master@{#13968}
2016-08-30 09:53:54 +00:00
65fc8b9138 Fix Chromium clang plugin warnings
NOTRY=true
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2291503002
Cr-Commit-Position: refs/heads/master@{#13959}
2016-08-29 17:05:34 +00:00
b8e56ee320 Fix Chromium clang plugin warnings
This adds a new file, webrtc/modules/audio_coding/neteq/tools/packet_source.cc, so that I'll have somewhere to put the new non-inlined methods.

NOTRY=true
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2290593002
Cr-Commit-Position: refs/heads/master@{#13956}
2016-08-29 13:37:42 +00:00
36a43887f3 Fix Chromium clang plugin warnings
NOTRY=true
BUG=webrtc:163

Review-Url: https://codereview.webrtc.org/2286063005
Cr-Commit-Position: refs/heads/master@{#13955}
2016-08-29 12:33:36 +00:00
cfee215b23 Migrated ILBC and ISAC test targets for GN.
Migrated GN targets ilbc_test, isac_api_test,
isac_switch_samprate_test from webrtc/modules/audio_coding/codecs

NOTRY=True
NOPRESUBMIT=True

BUG=webrtc:6191

Review-Url: https://codereview.webrtc.org/2270403002
Cr-Commit-Position: refs/heads/master@{#13953}
2016-08-29 11:09:28 +00:00
09f1560f81 TimestampScaler no longer depends on NetEqDecoder to figure out scaling.
This is still a tiny lie, since it checks for kCodecArbitrary to avoid
scaling a codec with an external decoder, because of missing information
in that case. The main point is still true, though. Once the next CL is
in, removing NetEqDecoder usage completely in DecoderDatabase, another
workaround will be in place for external decoders until we can fully
deprecate them.

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2270063006
Cr-Commit-Position: refs/heads/master@{#13952}
2016-08-29 10:59:09 +00:00
d02fe4b53b GN: Fix windows clang errors. Attempt 2.
BUG=webrtc:6255
NOTRY=True

Review-Url: https://codereview.webrtc.org/2281513002
Cr-Commit-Position: refs/heads/master@{#13942}
2016-08-26 20:31:34 +00:00
84bc98509b Removed virtual from several methods in DecoderDatabase to minimize
the number of points that need to be mocked for testing.

For the now non-virtual methods, DecoderDatabase now does a lookup
through GetDecoderInfo and then delegates to the appropriate method in
the DecoderInfo object, if one is found.

A few other methods were also changed to look up through GetDecoderInfo.

Also moved the audio decoder factory into DecoderInfo, so that
DecoderInfo::GetDecoder can be used directly.

Review-Url: https://codereview.webrtc.org/2276913002
Cr-Commit-Position: refs/heads/master@{#13933}
2016-08-26 12:41:30 +00:00
1e8ed4a801 Replace calls to assert() with RTC_DCHECK_*() in .c code
We have RTC_CHECK and RTC_DCHECK for C now, so we should use it. It's
one fewer difference between our C and C++ code.

NOPRESUBMIT=true

Review-Url: https://codereview.webrtc.org/2274083002
Cr-Commit-Position: refs/heads/master@{#13930}
2016-08-26 11:33:41 +00:00
c76680419e NetEq: Update CNG code to accommodate 48 kHz sample rate
Checksums were updated for NetEq and ACM bitexactness tests (after
verifying the audio quality).

BUG=webrtc:5447

Review-Url: https://codereview.webrtc.org/2266293005
Cr-Commit-Position: refs/heads/master@{#13928}
2016-08-26 06:53:43 +00:00
4805231613 Moved format_macros.h from rtc_base to rtc_base_approved.
BUG=webrtc:3806
NOTRY=True

Review-Url: https://codereview.webrtc.org/2272003002
Cr-Commit-Position: refs/heads/master@{#13921}
2016-08-25 11:43:52 +00:00
19319a3a2e Add missing "//build/config/sanitizers:deps" to executable targets.
BUG=webrtc:6215
NOTRY=True

Review-Url: https://codereview.webrtc.org/2278723004
Cr-Commit-Position: refs/heads/master@{#13915}
2016-08-25 09:44:11 +00:00
8a6a600c16 Make neteq_rtpplay parse RTP header extensions
This removes the warning printouts about unknown header extensions.

BUG=webrtc:2692

Review-Url: https://codereview.webrtc.org/2266403005
Cr-Commit-Position: refs/heads/master@{#13912}
2016-08-25 07:46:41 +00:00
549d80b979 NetEq: only update current_rtp_payload_type_ when validated
The current_rtp_payload_type_ should only be updated when the packet is
actually inserted into the packet buffer, since then the payload type
has been validated. This CL removes an unvalidated setting of this value
that happened after SSRC change or upon first packet.

BUG=webrtc:5447

Review-Url: https://codereview.webrtc.org/2270793003
Cr-Commit-Position: refs/heads/master@{#13910}
2016-08-25 07:44:32 +00:00
fcada90485 Fixing timestamp comparison assert.
Wasn't handling wrap-around properly. Noticed this because a test
failed.

TBR=henrik.lundin@webrtc.org

Review-Url: https://codereview.webrtc.org/2271203003
Cr-Commit-Position: refs/heads/master@{#13905}
2016-08-24 19:45:18 +00:00
5fac3f0892 NetEq: Don't check sample rate and frame size upon error
If an error happens in the GetAudio call, for instance when corrupt
payloads are inserted, GetAudio wil return an error. In this case, the
audio frame is not always correctly populated, which is to be expected.

BUG=webrtc:5447

Review-Url: https://codereview.webrtc.org/2272963002
Cr-Commit-Position: refs/heads/master@{#13902}
2016-08-24 18:18:54 +00:00
d1a10a0f77 Make FakeDecodeFromFile handle codec-internal CNG
This implementation interprets payloads of size 1 as codec-internal SID
frames, marking the start of a CNG period. Changes were made to other
parts of the test payload chain, since it had to make use of the virtual
payload size in the case of header-only RTP files.

BUG=webrtc:2692

Review-Url: https://codereview.webrtc.org/2275903002
Cr-Commit-Position: refs/heads/master@{#13901}
2016-08-24 17:59:00 +00:00