Commit Graph

1114 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
8266773f18 Migrated target RTPencode to GN
TBR=henrik.lundin@webrtc.org

BUG=6162

Review-Url: https://codereview.webrtc.org/2195353002
Cr-Commit-Position: refs/heads/master@{#13599}
2016-08-02 08:45:58 +00:00
ddf3e4accd GN conversion of audio_decoder_unittests
BUG=webrtc 6036

Review-Url: https://codereview.webrtc.org/2180853006
Cr-Commit-Position: refs/heads/master@{#13588}
2016-08-01 14:49:50 +00:00
e6b60a4368 Migrated audio_codec_speed_tests target to GN.
Review-Url: https://codereview.webrtc.org/2177373004
Cr-Commit-Position: refs/heads/master@{#13549}
2016-07-28 09:34:39 +00:00
00730c724d Migrated GN target insert_packet_with_timing.
Review-Url: https://codereview.webrtc.org/2187003002
Cr-Commit-Position: refs/heads/master@{#13548}
2016-07-28 08:34:11 +00:00
333f206f8b Target delay_test migrated to GN.
Review-Url: https://codereview.webrtc.org/2188473003
Cr-Commit-Position: refs/heads/master@{#13547}
2016-07-28 08:21:38 +00:00
85228d6af6 Regression test for issue where Opus DTX status was being forgotten.
BUG=webrtc:6020

Review-Url: https://codereview.webrtc.org/2177263002
Cr-Commit-Position: refs/heads/master@{#13539}
2016-07-27 11:53:52 +00:00
1cd46643d7 Disable some Opus tests pending an update
These tests will be reenabled and fixed after Opus 1.1.3 has landed in
Chromium and is rolled into WebRTC.

BUG=

Review-Url: https://codereview.webrtc.org/2185673002
Cr-Commit-Position: refs/heads/master@{#13534}
2016-07-26 16:01:45 +00:00
47bded4428 GN migration of target audio_coding/neteq/rtp_analyze.
Review-Url: https://codereview.webrtc.org/2185533003
Cr-Commit-Position: refs/heads/master@{#13533}
2016-07-26 13:46:26 +00:00
3022a34e7c GN migration of target audio_coding/neteq/neteq_test_tools
Review-Url: https://codereview.webrtc.org/2178353002
Cr-Commit-Position: refs/heads/master@{#13531}
2016-07-26 13:36:09 +00:00
f93be584f7 Revert of WebRtcVoiceEngine: Use AudioDecoderFactory to generate recv codecs. (patchset #10 id:200001 of https://codereview.webrtc.org/2072753002/ )
Reason for revert:
For some reason, payload_type_mapper.cc is not being picked up in Chrome builds, leading to undefined references. Reverting while investigating.

Original issue's description:
> WebRtcVoiceEngine: Use AudioDecoderFactory to generate recv codecs.
>
> 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.
>
> This CL also includes some changes to rtc::Optional. I've put them in
> a separate CL that should (or should not) land first, making these
> changes void.
> See: https://codereview.webrtc.org/2072713002/
>
> BUG=webrtc:5805
>
> Committed: https://crrev.com/95eb1ba0db79d8fd134ae61b0a24648598684e8a
> Cr-Commit-Position: refs/heads/master@{#13459}

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

Review-Url: https://codereview.webrtc.org/2151453002
Cr-Commit-Position: refs/heads/master@{#13460}
2016-07-13 13:31:37 +00:00
95eb1ba0db WebRtcVoiceEngine: Use AudioDecoderFactory to generate recv codecs.
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.

This CL also includes some changes to rtc::Optional. I've put them in
a separate CL that should (or should not) land first, making these
changes void.
See: https://codereview.webrtc.org/2072713002/

BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2072753002
Cr-Commit-Position: refs/heads/master@{#13459}
2016-07-13 13:05:32 +00:00
108ecec51c Removed LEGACY_BITEXACT from neteq_impl.cc and updated the ACM unit tests.
I'll be rewriting AcmReceiver soon and am trying to reduce the amount of
old stuff that needs to be supported.

I've manually checked the outputs of the AcmReceiver bitexactness
tests with this change. A large part of the tests are still bitexact,
with one section only differing slightly in timings. Nothing audible
unless playing the old and new versions back simultaneously.

The output of NetEqDecoderTest were also changed due to this CL, although only on android. I built and ran the test locally and compared the audio output manually - the changes were the same as for the other tests; i.e. very slight timing changes for a part of the output.

I updated the network stats checksum for android without analyzing it further. I expect it goes hand-in-hand with the changes to the output; i.e. the changes in it are fine because the audio output is fine. Likely, the stats will show changes in the usage of CNG, since that is what the code changes.

BUG=webrtc:1361

Review-Url: https://codereview.webrtc.org/2117763002
Cr-Commit-Position: refs/heads/master@{#13415}
2016-07-08 15:45:26 +00:00
63fb95a68d Fixed time moving backwards in the AudioCodingModule.
There was a fast path in PreprocessToAddData that would just use the
input timestamps if the input format was equal to the required format of
the encoder. This works well as long as the codec never changes. If we
are first doing resampling (specifically upsampling) and then change to
a codec that does not require resampling, we'll need to stick to
whatever input timestamp we left off at, rather than silently accepting
whatever we're sent.

BUG=622435

Review-Url: https://codereview.webrtc.org/2119393002
Cr-Commit-Position: refs/heads/master@{#13398}
2016-07-06 16:34:31 +00:00
3f81fcd2e8 Don't recreate the speech encoder if we don't have to
If the specification for the speech encoder hasn't changed, we should
reuse it instead of recreating it. Otherwise, we lose its state. (This
problem was originally discovered because AudioEncoderOpus instances
would forget that they were supposed to be using DTX.)

BUG=webrtc:6020, chromium:622647

Review-Url: https://codereview.webrtc.org/2089183002
Cr-Commit-Position: refs/heads/master@{#13273}
2016-06-23 10:58:45 +00:00
d5f50a1b53 NetEq: Fix a bug in DelayPeakDetector causing asserts to trigger
In some situation, typically when incoming packets were reordered, the
DelayPeakDetector::Update method may be called twice (or more) with
non-zero inter_arrival_time argument, but without the TickTimer object
being updated in between (i.e., packets coming in more or less at the
same time). In these situations, a delay peak may be registered with
zero peak period. This could eventually trigger the DCHECK in
DelayPeakDetector::MaxPeakPeriod().

With this fix, the problem is solved by not registering peaks for which
the TickTimer object has not moved since the last peak.

The problem was originally introduced with
https://codereview.webrtc.org/1921163003.

BUG=webrtc:6021

Review-Url: https://codereview.webrtc.org/2085233002
Cr-Commit-Position: refs/heads/master@{#13257}
2016-06-22 16:07:07 +00:00
e8a77e3309 Refactor neteq_rtpplay
This change is a major refactoring of the neteq_rtpplay tool. It
consists of the following parts:

- NetEqTest class: Breaks out the main simulation loop from
  neteq_rtpplay into a separate class with well defined inputs and
  outputs.
- NetEqInput: Interface class for the input to NetEqTest.
- NetEqPacketSourceInput: Implementation of NetEqInput that provides a
  PacketSource objects with a NetEqInput interface. This has two
  subclasses; one for RtpFileSource and one for RtcEventLogSource.
- NetEqReplacementInput: An object that modifies the packets provided by
  another NetEqInput object, and replaces the packet payloads with meta
  data readable by a FakeDecodeFromFile decoder.
- FakeDecodeFromFile: An AudioDecoder implementation that produces
  "decoded" data by reading from an audio file.

BUG=webrtc:2692, webrtc:5447

Review-Url: https://codereview.webrtc.org/2020363003
Cr-Commit-Position: refs/heads/master@{#13252}
2016-06-22 13:34:08 +00:00
03153f1032 GN: Add neteq_rtpplay and rtc_event_log_source
BUG=webrtc:5949

Review-Url: https://codereview.webrtc.org/2081113003
Cr-Commit-Position: refs/heads/master@{#13239}
2016-06-21 12:38:48 +00:00
44bf02fba2 Remove SdpAudioFormat's default constructor
We didn't really want it; it was only necessary because we wanted to
use rtc::Optional<SdpAudioFormat>, and Optional used to require the
contained type to be default constructable. But as of May 9th
(https://codereview.webrtc.org/1896833004), it no longer does.

Review-Url: https://codereview.webrtc.org/2066233002
Cr-Commit-Position: refs/heads/master@{#13211}
2016-06-20 09:39:53 +00:00
c13ded54ca Move AudioCodingModuleImpl to anonymous namespace in audio_coding_module.cc
AudioCodingModuleImpl is the only implementation of the
AudioCodingModule interface (except for test mocks). So it's a good
fit to put it in an anonymous namespace in the interface's .cc file,
to ensure that no one except AudioCodingModule::Create ever references
it.

Except for moving code, this CL introduces two other small changes:

  * It cleans up the set of #includes in audio_coding_module.cc.
    Specifically, I removed #includes that were already present in
    audio_coding_module.h, and did not bring along any #includes from
    audio_coding_module_impl.h and .cc except those that were
    necessary to get it to compile.

  * It moves AudioCodingModuleImpl from the webrtc::acm2 to the
    webrtc::<anonymous> namespace. This means I had to qualify a few
    things it references with acm2::.

Review-Url: https://codereview.webrtc.org/2069723003
Cr-Commit-Position: refs/heads/master@{#13191}
2016-06-17 13:00:52 +00:00
fc3a8ee47b Delete unused code.
* Unused audio_coding and video_coding test code.
* Obsolete voice_engine android test app.
* Left-over placeholder files for remoteaudiotrack and
  portallocatorfactory.

In addition, change modules.gyp dependency from rtc_base to
rtc_base_approved.

BUG=
R=henrik.lundin@webrtc.org, henrika@webrtc.org, pbos@webrtc.org, tina.legrand@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13166}
2016-06-16 13:51:40 +00:00
342f74005f NetEq: Ask AudioDecoder for sample rate instead of passing it as an argument
BUG=webrtc:5801
NOTRY=true

Review-Url: https://codereview.webrtc.org/2027993002
Cr-Commit-Position: refs/heads/master@{#13162}
2016-06-16 10:18:09 +00:00
347d35129e AudioDecoder: Remove the default implementation of SampleRateHz
And implement SampleRateHz in a bunch of mocks.

BUG=webrtc:5801
NOTRY=true

Review-Url: https://codereview.webrtc.org/2029543002
Cr-Commit-Position: refs/heads/master@{#13161}
2016-06-16 08:59:13 +00:00
ceb9d0cc29 Audio decoder factory test: Ensure that g722's sample rate is 16 kHz, not 8 kHz
Review-Url: https://codereview.webrtc.org/2068133002
Cr-Commit-Position: refs/heads/master@{#13153}
2016-06-15 12:55:22 +00:00
6808419068 iSAC decoder: Remove obsolete TODO
NOTRY=true

Review-Url: https://codereview.webrtc.org/2069993002
Cr-Commit-Position: refs/heads/master@{#13152}
2016-06-15 12:54:20 +00:00
fb11424551 GN: Add modules_unittests
Changes:
* Enabled protobuf for iOS globally.
* Set WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE on a global
scope similar to GYP since tests depend on it.
* Added missing rtc_libvpx_build_vp9 variable.
* Moved out audio_coding defines into .gni file to avoid code duplication
* Renamed files to avoid object naming conflicts that GN disallows:
  * webrtc/modules/audio_processing/{echo_cancellation_unittest.cc->echo_cancellation_bit_exact_unittest.cc}
  * webrtc/modules/video_coding/codecs/vp9/{screenshare_layers_unittest.cc->vp9_screenshare_layers_unittest.cc}

BUG=webrtc:5949
TESTED=Built and ran the tests on Mac. Also ran:
gn gen out/Default --args="rtc_enable_bwe_test_logging=true"
and verified that more objects are being built (1885 vs 1883)
when compiling modules_unittests.

NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2041233006
Cr-Commit-Position: refs/heads/master@{#13108}
2016-06-13 07:19:53 +00:00
919518613f NetEq: Rename Nack to NackTracker to avoid name collisions in GN
BUG=webrtc:5949
NOTRY=True
R=kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2045243002
Cr-Commit-Position: refs/heads/master@{#13069}
2016-06-08 13:43:49 +00:00
a10740239d Fix UBSan errors (signed integer overflow)
WebRtcSpl_CrossCorrelation and WebRtcSpl_DotProductWithScale compute
the int32 sum of pairwise products from two int16 arrays. So as to
avoid overflow (which could otherwise happen when as little as two
products were summed), the products are right-shifted by an amount
specified by the caller.

This CL changes WebRtcIlbcfix_MyCorr and WebRtcIlbcfix_Smooth to give
sufficient right-shift amounts, instead of ones that may be too small
and cause overflow.

BUG=chromium:601787

Review-Url: https://codereview.webrtc.org/2014033002
Cr-Commit-Position: refs/heads/master@{#13066}
2016-06-08 12:24:47 +00:00
7bf939c720 Check for out-of-bounds access on |kIntrpCoef|.
BUG=chromium:600953

Review-Url: https://codereview.webrtc.org/2025493002
Cr-Commit-Position: refs/heads/master@{#13039}
2016-06-03 17:06:05 +00:00
f882880947 AudioDecoder: Document that the sample rate and number of channels is constant
Review-Url: https://codereview.webrtc.org/2029273003
Cr-Commit-Position: refs/heads/master@{#13012}
2016-06-02 10:19:26 +00:00
abe95ba323 AudioDecoderIsacT: Require caller to always specify sample rate
This gets rid of the complex & icky state where the sample rate is not
yet determined.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2020353003
Cr-Commit-Position: refs/heads/master@{#13011}
2016-06-02 09:59:02 +00:00
c0f2dcf9ed NetEq decoder database: Don't keep track of sample rate for builtin decoders
This allows us to get rid of the function that computes it, which gets
us one step closer to getting rid of the NetEqDecoder type.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2021063002
Cr-Commit-Position: refs/heads/master@{#12974}
2016-05-31 13:28:09 +00:00
6c2eab34f8 AudioDecoder: New method SampleRateHz, + implementations for our codecs
This will let NetEq (and the factory, and every layer in between) keep
track of just the decoder, instead of decoder and sample rate.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2024633002
Cr-Commit-Position: refs/heads/master@{#12968}
2016-05-31 09:46:28 +00:00