1146 Commits

Author SHA1 Message Date
henrik.lundin
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
kwiberg
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
kjellander
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
kwiberg
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
kwiberg
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
kwiberg
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
aleloi
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
ossu
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
ehmaldonado
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
ossu
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
kwiberg
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
henrik.lundin
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
ivoc
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
ehmaldonado
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
henrik.lundin
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
henrik.lundin
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
deadbeef
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
henrik.lundin
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
henrik.lundin
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
kjellander
28a0ffdd52 GN: Synchronize resources between Android and iOS.
iOS tests packaged into an .app uses the same way of
defining resources (the data attribute). Some iOS
simulator tests are failing due to missing resources, so
let's sync them all.

BUG=webrtc:5949
NOTRY=True

Review-Url: https://codereview.webrtc.org/2277753003
Cr-Commit-Position: refs/heads/master@{#13898}
2016-08-24 14:48:48 +00:00
ivoc
2c670dbf13 Added GN target for webrtc_opus_fec_test.
BUG=webrtc:6191
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2268213002
Cr-Commit-Position: refs/heads/master@{#13893}
2016-08-24 13:11:27 +00:00
kwiberg
619a211562 iLBC: Handle a case of bad input data
We detect an unreasonable state (caused by a bad encoded stream)
before it can lead to problems, and handle it by resetting the
decoder.

NOPRESUBMIT=true
BUG=chromium:617124

Review-Url: https://codereview.webrtc.org/2255203002
Cr-Commit-Position: refs/heads/master@{#13888}
2016-08-24 09:46:48 +00:00
ivoc
e51b41ae44 Added GN target for isac_test.
BUG=webrtc:6191
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2267423002
Cr-Commit-Position: refs/heads/master@{#13884}
2016-08-24 09:26:04 +00:00
aleloi
9a11784a7f Migrated GN target :g722_test
Migrated GN target :g722_test from
webrtc/modules/audio_coding/codecs/g722/g722.gypi

NOTRY=True

BUG=webrtc:6191

Review-Url: https://codereview.webrtc.org/2275463002
Cr-Commit-Position: refs/heads/master@{#13865}
2016-08-23 15:36:15 +00:00
aleloi
16f55a10c4 Migrated GN target :g711_test
Migrated GN target :g711_test from
webrtc/modules/audio_coding/codecs/g711/g711.gypi

NOTRY=True

BUG=webrtc:6191

Review-Url: https://codereview.webrtc.org/2273623002
Cr-Commit-Position: refs/heads/master@{#13864}
2016-08-23 15:08:30 +00:00
kwiberg
2e486462e0 RTC_CHECK and RTC_DCHECK macros for C
So that we don't have to use assert(). Includes one sample call site.

NOTRY=true
BUG=chromium:617124

Review-Url: https://codereview.webrtc.org/2262173002
Cr-Commit-Position: refs/heads/master@{#13862}
2016-08-23 12:54:31 +00:00
henrik.lundin
b3f1c5d2fe Add NetEq::FilteredCurrentDelayMs() and use it in VoiceEngine
The new method returns the current total delay (packet buffer and sync
buffer) in ms, with smoothing applied to even out short-time
fluctuations due to jitter. The packet buffer part of the delay is not
updated during DTX/CNG periods.

This CL also pipes the new metric through ACM and uses it in
VoiceEngine. It replaces the previous method of estimating the buffer
delay (where an inserted packet's RTP timestamp was compared with the
last played timestamp from NetEq). The new method works better under
periods of DTX/CNG.

Review-Url: https://codereview.webrtc.org/2262203002
Cr-Commit-Position: refs/heads/master@{#13855}
2016-08-22 22:40:00 +00:00
ehmaldonado
6c46eaa544 Add gtest as a dependency for neteq_quality_test_support.
Was removed in Patch Set 5 of https://codereview.webrtc.org/2252413002
but shouldn't have been, since it's actually required.

https://cs.chromium.org/chromium/src/third_party/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h?l=17

BUG=webrtc:6228
NOTRY=True

Review-Url: https://codereview.webrtc.org/2262173003
Cr-Commit-Position: refs/heads/master@{#13851}
2016-08-22 16:48:11 +00:00
kwiberg
7f82fc988d WebRtcIlbcfix_Smooth: Fix UBSan fuzzer bug (left shift of 1 by 31 overflows)
scale1 == 31 if and only if w10 == 0. So even though 1 << scale1
overflows, we know that the result of the multiplication should be 0.
Handle that case.

BUG=chromium:615818

Review-Url: https://codereview.webrtc.org/2258543002
Cr-Commit-Position: refs/heads/master@{#13847}
2016-08-22 14:43:50 +00:00
ehmaldonado
861da3c662 Refactor neteq_test_support.
Take 'tools/neteq_quality_test.cc' and 'tools/neteq_quality_test.h' outside of neteq_test_support into their own target, neteq_quality_test_support.

BUG=webrtc:6228
NOTRY=True

Review-Url: https://codereview.webrtc.org/2252413002
Cr-Commit-Position: refs/heads/master@{#13831}
2016-08-19 14:02:31 +00:00
ehmaldonado
bcba64a0fa GN: Add "//build/config/sanitizers:deps" as a dependency to executable targets.
When the sanitizer bots are switched to GN, this needs to be included as a dependency so that the executables can be compiled.

BUG=webrtc:6215
NOTRY=True

Review-Url: https://codereview.webrtc.org/2250893003
Cr-Commit-Position: refs/heads/master@{#13829}
2016-08-19 09:11:15 +00:00
henrik.lundin
38d840c35a NetEq: Changing checked_cast to saturated_cast
The cast involves packet_len_samp, which is derived from the timestamps
and sequence numbers of incoming packets. Being values from the outside,
these should be treated as if any value is possible, making a
checked_cast unsuitable. Changing instead to saturated_cast to avoid
overflow with out-of-bounds values.

Review-Url: https://codereview.webrtc.org/2243403007
Cr-Commit-Position: refs/heads/master@{#13815}
2016-08-18 10:49:41 +00:00
ossu
d4e9f62ea7 Updated AudioDecoderFactory to list AudioCodecSpecs instead of SdpAudioFormats.
BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2123923004
Cr-Commit-Position: refs/heads/master@{#13810}
2016-08-18 09:02:15 +00:00
ossu
c54071d8ab WebRtcVoiceEngine: Use AudioDecoderFactory to generate recv codecs.
Reland of https://codereview.webrtc.org/2072753002/ which broke
chromium due to how their build was setup. This issue should now be
resolved.

Changed WebRtcVoiceEngine to present receive codecs from the formats
provided by its decoder factory. Added supported formats to
BuiltinAudioDecoderFactory. Added helper functions for creating some
simple decoder factories for mocking.

Created a PayloadTypeMapper for assigning payload types to formats. I
think we'll eventually want to use this further up, or possibly in
both the audio and video sides. It would be best if the engines didn't
have to talk payload types at all, but it might be more difficult to
get around when payload types depend on each-other, like the RTX
codecs for video.

BUG=webrtc:5805
TBR=ivoc@webrtc.org

Review-Url: https://codereview.webrtc.org/2250683002
Cr-Commit-Position: refs/heads/master@{#13793}
2016-08-17 09:45:47 +00:00
aleloi
b7186d0aa7 Migrated GN target :isac_fix_test
Migrated GN target :isac_fix_test from
webrtc/modules/audio_coding/codecs/isac/isacfix_test.gypi

NOTRY=True

BUG=webrtc:6191

Review-Url: https://codereview.webrtc.org/2247233002
Cr-Commit-Position: refs/heads/master@{#13770}
2016-08-16 08:47:26 +00:00
ehmaldonado
b1e66110e3 GN: Fix audio_decoder_unittests for android.
Tested on a physical device.

BUG=webrtc:6036
NOTRY=True

Review-Url: https://codereview.webrtc.org/2241293002
Cr-Commit-Position: refs/heads/master@{#13761}
2016-08-15 19:02:08 +00:00
sakal
714dd4e532 GN: Update tests to have the correct shard timeout value on Android.
TBR=mflodman@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2231413002
Cr-Commit-Position: refs/heads/master@{#13741}
2016-08-15 09:29:19 +00:00
flim
64a7eab891 Update tests and DTX check for Opus 1.1.3.
DTX is now indicated by packets that may have a size of up to 2 bytes.
Ref: https://git.xiph.org/?p=opus.git;a=commit;h=1c311423c86b89eba27a494e17c79fefd7d75ab0

BUG=

Review-Url: https://codereview.webrtc.org/2158293003
Cr-Commit-Position: refs/heads/master@{#13736}
2016-08-12 11:36:14 +00:00
aleloi
c4ac700781 Migrated GN target :neteq_pcmu_quality_test
Migrated GN target :neteq_pcmu_quality_test from
webrtc/modules/audio_coding/neteq/neteq_tests.gypi

NOTRY=True

BUG=webrtc:6190

Review-Url: https://codereview.webrtc.org/2224313002
Cr-Commit-Position: refs/heads/master@{#13711}
2016-08-10 12:06:31 +00:00
aleloi
6df36dc054 Migrated GN target :neteq_isac_quality_test
Migrated GN target :neteq_isac_quality_test from
webrtc/modules/audio_coding/neteq/neteq_tests.gypi

NOTRY=True

BUG=webrtc:6190

Review-Url: https://codereview.webrtc.org/2226253002
Cr-Commit-Position: refs/heads/master@{#13710}
2016-08-10 12:04:51 +00:00
aleloi
0e0be0a2f5 Migrated GN target :neteq_ilbc_quality_test
Migrated GN target :neteq_ilbc_quality_test from
webrtc/modules/audio_coding/neteq/neteq_tests.gypi

NOTRY=True

BUG=webrtc:6190

Review-Url: https://codereview.webrtc.org/2221193004
Cr-Commit-Position: refs/heads/master@{#13708}
2016-08-10 11:55:29 +00:00
aleloi
6391012514 Migrated GN target :audio_classifier_test
Migrated GN target :audio_classifier_test from
webrtc/modules/audio_coding/neteq/neteq_tests.gypi

NOTRY=True

BUG=webrtc:6190

Review-Url: https://codereview.webrtc.org/2225333002
Cr-Commit-Position: refs/heads/master@{#13706}
2016-08-10 11:41:23 +00:00
aleloi
116fd61599 Migrated GN target :neteq_speed_test
Migrated GN target :neteq_speed_test from
webrtc/modules/audio_coding/neteq/neteq.gypi

NOTRY=True

BUG=webrtc:6190

Review-Url: https://codereview.webrtc.org/2223343004
Cr-Commit-Position: refs/heads/master@{#13704}
2016-08-10 11:16:45 +00:00
aleloi
630c6d58d3 Migrated GN target :neteq_opus_quality_test
Migrated GN target :neteq_opus_quality_test from
webrtc/modules/audio_coding/neteq/neteq_tests.gypi

NOTRY=True

BUG=webrtc:6190, webrtc:2692

Review-Url: https://codereview.webrtc.org/2223933004
Cr-Commit-Position: refs/heads/master@{#13701}
2016-08-10 09:11:49 +00:00
aleloi
e5106e75da Removed target rtp_to_text. The code does not even run.
NOTRY=True

BUG=webrtc:6162, webrtc:2692

Review-Url: https://codereview.webrtc.org/2199803002
Cr-Commit-Position: refs/heads/master@{#13692}
2016-08-09 13:56:16 +00:00
ehmaldonado
f98dc105ba GN: Add target for modules_tests.
Additional changes I needed to make it work:

- Modified a header in RTPFile.cc. Every other file is
  using "webrtc/engine_configurations.h" instead.

- Disabled flag 4373 for msvs because it was disabled
  in build/common.gypi.

BUG=webrtc:6038
TBR=kwiberg@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2187563005
Cr-Commit-Position: refs/heads/master@{#13628}
2016-08-03 17:46:51 +00:00
aleloi
17dfa7425f Gyp->GN migration of RTPjitter.
BUG=6162

NOTRY=True

Review-Url: https://codereview.webrtc.org/2196283002
Cr-Commit-Position: refs/heads/master@{#13620}
2016-08-03 08:17:29 +00:00
aleloi
5a74650522 Migrated GN target RTPtimeshift.
NOTRY=true

BUG=6162

Review-Url: https://codereview.webrtc.org/2201883004
Cr-Commit-Position: refs/heads/master@{#13607}
2016-08-02 13:06:39 +00:00
aleloi
5556dcb24c Migrated GN target rtpcat.
BUG=6162

Review-Url: https://codereview.webrtc.org/2202193002
Cr-Commit-Position: refs/heads/master@{#13605}
2016-08-02 11:27:32 +00:00
aleloi
76cbe19f8a Migrated RTPchange Gyp target to GN.
BUG=6162

Review-Url: https://codereview.webrtc.org/2194213002
Cr-Commit-Position: refs/heads/master@{#13601}
2016-08-02 09:05:07 +00:00