Commit graph

41 commits

Author SHA1 Message Date
Niels Möller
3f651d80a0 Reland "Add AudioDecoderFactory to NetEqTest constructor."
This is a reland of daa970f33e

Original change's description:
> Add AudioDecoderFactory to NetEqTest constructor.
>
> Update EventLogAnalyzer to not depend on builtin audio decoders.
>
> Bug: webrtc:8396, webrtc:10080
> Change-Id: Ie02ed9cda6d4f11bfdf2e65eb6482283b7520738
> Reviewed-on: https://webrtc-review.googlesource.com/c/114301
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26026}

Tbr: kwiberg@webrtc.org
Bug: webrtc:8396, webrtc:10080
Change-Id: I598ce1cd41676b1992b0973b09476eeeb0e602d2
Reviewed-on: https://webrtc-review.googlesource.com/c/114940
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26058}
2018-12-19 15:08:47 +00:00
Oleh Prypin
f7f753b320 Revert "Add AudioDecoderFactory to NetEqTest constructor."
This reverts commit daa970f33e.

Reason for revert: Speculative revert due to downstream breakage

Original change's description:
> Add AudioDecoderFactory to NetEqTest constructor.
>
> Update EventLogAnalyzer to not depend on builtin audio decoders.
>
> Bug: webrtc:8396, webrtc:10080
> Change-Id: Ie02ed9cda6d4f11bfdf2e65eb6482283b7520738
> Reviewed-on: https://webrtc-review.googlesource.com/c/114301
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26026}

TBR=mbonadei@webrtc.org,aleloi@webrtc.org,kwiberg@webrtc.org,terelius@webrtc.org,nisse@webrtc.org,ivoc@webrtc.org

No-Try: True
Bug: webrtc:8396, webrtc:10080
Change-Id: Ided750d8ed800d8a38f7cce8f72095d8ed1bc6cb
Reviewed-on: https://webrtc-review.googlesource.com/c/114552
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26030}
2018-12-17 15:16:30 +00:00
Niels Möller
daa970f33e Add AudioDecoderFactory to NetEqTest constructor.
Update EventLogAnalyzer to not depend on builtin audio decoders.

Bug: webrtc:8396, webrtc:10080
Change-Id: Ie02ed9cda6d4f11bfdf2e65eb6482283b7520738
Reviewed-on: https://webrtc-review.googlesource.com/c/114301
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26026}
2018-12-17 11:15:50 +00:00
Ivo Creusen
2db46b0fb7 Added new feature to print a text log to neteq_rtpplay
This will print out the major events during a NetEq simulation.

Bug: b/116685514
Change-Id: Iab172e9a9115695b42c67628d5523c727359bb89
Reviewed-on: https://webrtc-review.googlesource.com/c/114320
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26019}
2018-12-14 16:38:45 +00:00
Yves Gerey
3e70781361 [Cleanup] Add missing #include. Remove useless ones. IWYU part 2.
This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.

Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
2018-11-28 18:25:07 +00:00
Niels Möller
53382cb19f Move RtcpStatistics from common_types.h to a new header file
New location is modules/rtp_rtcp/include/rtcp_statistics.h.

Bug: webrtc:5876
Change-Id: I85f55b58658588228ed77175226b3479352fd5de
Reviewed-on: https://webrtc-review.googlesource.com/c/111961
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25799}
2018-11-27 13:46:42 +00:00
Niels Möller
d51b3553db Delete unused NetEq Rtcp stats.
Bug: webrtc:7135
Change-Id: Ib3ca9e02b051b8b41c2eac4e43a4f1f37999bf75
Reviewed-on: https://webrtc-review.googlesource.com/c/111640
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25743}
2018-11-22 08:00:54 +00:00
Yves Gerey
a038e71b48 Less strict audio codec tests to accomodate opus switch to SSE.
Expected checksums depend on whether libopus is built with SSE or not.
Since we have no robust way to know that and we cannot enforce all
clients to use SSE, we accept both results.

Bug: webrtc:9530
Bug: webrtc:9995
Change-Id: I9f0464ffec15df91eafe15d89c61e2140f341cb1
Reviewed-on: https://webrtc-review.googlesource.com/c/110789
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25633}
2018-11-14 10:16:04 +00:00
Yves Gerey
09102a02cf Revert "Roll "Enable SSE, SSE2, and run-time detected SSE4.1 for libopus.""
This reverts commit 466620b326.

Reason for revert: Break downstream clients which are still expecting the previous references for NetEqDecodingTest.TestOpusBitExactness.

Original change's description:
> Roll "Enable SSE, SSE2, and run-time detected SSE4.1 for libopus."
> 
> We manually roll third_party since we need to update impacted tests,
> namely bit-exact comparison of expected neteq_opus results.
> They have changed due to SSE optimization enabled here:
> 85d355e530
> 
> For consistency sake roll_deps has been invoked:
> 
> Roll chromium_revision db720b4ab9..ae94013397 (606025:606579)
> 
> Change log: db720b4ab9..ae94013397
> Full diff: db720b4ab9..ae94013397
> 
> Changed dependencies
> * src/base: fee916f36b..f428263956
> * src/build: 02b0a894b0..3f61809684
> * src/ios: 95aadfb43f..fb48cd850c
> * src/testing: 03b25bebb5..f6a2832441
> * src/third_party: 360db5b8aa..8209b47661
> * src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/dd412c428a..384d0eaf19
> * src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/2e722b007d..f04a3a61ad
> * src/third_party/depot_tools: 4d2d5b4bbe..edcefdcf7d
> * src/third_party/freetype/src: f56830ed40..fb0d66d04c
> * src/tools: a8e76f0ca5..f8ace9b670
> DEPS diff: db720b4ab9..ae94013397/DEPS
> 
> Clang version changed 344066:346388
> Details: db720b4ab9..ae94013397/tools/clang/scripts/update.py
> 
> Bug: webrtc:9530
> Change-Id: I8a016c5834c4f05fc17e3a84a5e139eeaeaee510
> Reviewed-on: https://webrtc-review.googlesource.com/c/110040
> Commit-Queue: Yves Gerey <yvesg@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25588}

TBR=phoglund@webrtc.org,ivoc@webrtc.org,yvesg@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:9530
Change-Id: I01549abdcfbcad70881ff9aeee913df68d0f0052
Reviewed-on: https://webrtc-review.googlesource.com/c/110602
Reviewed-by: Yves Gerey <yvesg@google.com>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#25591}
2018-11-12 09:55:10 +00:00
Yves Gerey
466620b326 Roll "Enable SSE, SSE2, and run-time detected SSE4.1 for libopus."
We manually roll third_party since we need to update impacted tests,
namely bit-exact comparison of expected neteq_opus results.
They have changed due to SSE optimization enabled here:
85d355e530

For consistency sake roll_deps has been invoked:

Roll chromium_revision db720b4ab9..ae94013397 (606025:606579)

Change log: db720b4ab9..ae94013397
Full diff: db720b4ab9..ae94013397

Changed dependencies
* src/base: fee916f36b..f428263956
* src/build: 02b0a894b0..3f61809684
* src/ios: 95aadfb43f..fb48cd850c
* src/testing: 03b25bebb5..f6a2832441
* src/third_party: 360db5b8aa..8209b47661
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/dd412c428a..384d0eaf19
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/2e722b007d..f04a3a61ad
* src/third_party/depot_tools: 4d2d5b4bbe..edcefdcf7d
* src/third_party/freetype/src: f56830ed40..fb0d66d04c
* src/tools: a8e76f0ca5..f8ace9b670
DEPS diff: db720b4ab9..ae94013397/DEPS

Clang version changed 344066:346388
Details: db720b4ab9..ae94013397/tools/clang/scripts/update.py

Bug: webrtc:9530
Change-Id: I8a016c5834c4f05fc17e3a84a5e139eeaeaee510
Reviewed-on: https://webrtc-review.googlesource.com/c/110040
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25588}
2018-11-09 22:30:47 +00:00
Mirko Bonadei
2dfa998be2 Reland "Prefix flag macros with WEBRTC_."
This is a reland of 5ccdc1331f

Original change's description:
> Prefix flag macros with WEBRTC_.
>
> Macros defined in rtc_base/flags.h are intended to be used to define
> flags in WebRTC's binaries (e.g. tests).
>
> They are currently not prefixed and this could cause problems with
> downstream clients since these names are quite common.
>
> This CL adds the 'WEBRTC_' prefix to them.
>
> Generated with:
>
> for x in DECLARE DEFINE; do
>   for y in bool int float string FLAG; do
>     git grep -l "\b$x\_$y\b" | \
>     xargs sed -i "s/\b$x\_$y\b/WEBRTC_$x\_$y/g"
>   done
> done
> git cl format
>
> Bug: webrtc:9884
> Change-Id: I7b524762b6a3e5aa5b2fc2395edd3e1a0fe72591
> Reviewed-on: https://webrtc-review.googlesource.com/c/106682
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25270}

TBR=kwiberg@webrtc.org

Bug: webrtc:9884
Change-Id: I5ba5368a231a334d135ed5e6fd7a279629ced8a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/107161
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25277}
2018-10-19 15:06:43 +00:00
Mirko Bonadei
c538fc77b0 Revert "Prefix flag macros with WEBRTC_."
This reverts commit 5ccdc1331f.

Reason for revert: Breaks downstream project.

Original change's description:
> Prefix flag macros with WEBRTC_.
> 
> Macros defined in rtc_base/flags.h are intended to be used to define
> flags in WebRTC's binaries (e.g. tests).
> 
> They are currently not prefixed and this could cause problems with
> downstream clients since these names are quite common.
> 
> This CL adds the 'WEBRTC_' prefix to them.
> 
> Generated with:
> 
> for x in DECLARE DEFINE; do
>   for y in bool int float string FLAG; do
>     git grep -l "\b$x\_$y\b" | \
>     xargs sed -i "s/\b$x\_$y\b/WEBRTC_$x\_$y/g"
>   done
> done
> git cl format
> 
> Bug: webrtc:9884
> Change-Id: I7b524762b6a3e5aa5b2fc2395edd3e1a0fe72591
> Reviewed-on: https://webrtc-review.googlesource.com/c/106682
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25270}

TBR=mbonadei@webrtc.org,kwiberg@webrtc.org

Change-Id: Ia79cd6066ecfd1511c34f1b30fd423e560ed6854
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9884
Reviewed-on: https://webrtc-review.googlesource.com/c/107160
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25276}
2018-10-19 15:04:13 +00:00
Mirko Bonadei
5ccdc1331f Prefix flag macros with WEBRTC_.
Macros defined in rtc_base/flags.h are intended to be used to define
flags in WebRTC's binaries (e.g. tests).

They are currently not prefixed and this could cause problems with
downstream clients since these names are quite common.

This CL adds the 'WEBRTC_' prefix to them.

Generated with:

for x in DECLARE DEFINE; do
  for y in bool int float string FLAG; do
    git grep -l "\b$x\_$y\b" | \
    xargs sed -i "s/\b$x\_$y\b/WEBRTC_$x\_$y/g"
  done
done
git cl format

Bug: webrtc:9884
Change-Id: I7b524762b6a3e5aa5b2fc2395edd3e1a0fe72591
Reviewed-on: https://webrtc-review.googlesource.com/c/106682
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25270}
2018-10-19 10:55:20 +00:00
Bjorn Terelius
5350d1cafd RtcEventLogSource no longer uses deprecated parsing functions.
Also remove header extension map from NetEqEventLogInput and RtcEventLogSource.

Bug: webrtc:8111
Change-Id: Ic9be7b03e32ab8aa12284596e21e53b6763f483a
Reviewed-on: https://webrtc-review.googlesource.com/c/102622
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25122}
2018-10-11 16:13:17 +00:00
Jonas Olsson
366a50c4ef Remove simple stringstream usages.
This CL replaces std::o?stringstream with rtc::StringBuilder where that's possible to do without changing any of the surrounding code. It also updates includes and build files as appropriate.

The CL was generated by running 'git grep -l -P std::o?stringstream | xargs perl -pi -e "s/std::o?stringstream/rtc::StringBuilder/g"'. Then I've manually updated the #includes and BUILD files, run 'git cl format' and unstaged any file that would need more complex fixes.

Bug: webrtc:8982
Change-Id: Ibc32153f4a3fd177e260b6ad05ce393972549357
Reviewed-on: https://webrtc-review.googlesource.com/98460
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24605}
2018-09-06 12:53:19 +00:00
Niels Möller
a12c42a6b2 Delete root header file typedef.h.
Usage replaced with stdint.h, rtc_base/system/arch.h and
rtc_base/system/unused.h, as appropriate.

Bug: webrtc:6854
Change-Id: I97225465d14b969903d92979e2df3c3c05d35f18
Reviewed-on: https://webrtc-review.googlesource.com/90249
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24100}
2018-07-25 14:59:26 +00:00
Henrik Lundin
9f2e624024 Break out NetEqEventLogInput to separate source files
Building NetEqEventLogInput requires protobuf support, while building
NetEqRtpDumpInput located in the same file does not. This makes both
classes unusable when protobuf support is lacking. With this CL, the
NetEqEventLogInput is broken out into separate files, to allow usage
of NetEqRtpDumpInput even when protobufs are not supported.

Bug: webrtc:9421
Change-Id: I55efec4ec259713654566cdaa00d2e34c5e9a60f
Reviewed-on: https://webrtc-review.googlesource.com/84587
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23803}
2018-07-02 14:15:29 +00:00
Henrik Lundin
7687ad58b2 Reland "NetEq: Deprecate playout modes Fax, Off and Streaming"
This is a reland of 80c4cca491

Original change's description:
> NetEq: Deprecate playout modes Fax, Off and Streaming
> 
> The playout modes other than Normal have not been reachable for a long
> time, other than through tests. It is time to deprecate them.
> 
> The only meaningful use was that Fax mode was sometimes set from
> tests, in order to avoid time-stretching operations (accelerate and
> pre-emptive expand) from messing with the test results. With this CL,
> a new config is added instead, which lets the user specify exactly
> this: don't do time-stretching.
> 
> As a result of Fax and Off modes being removed, the following code
> clean-up was done:
> - Fold DecisionLogicNormal into DecisionLogic.
> - Remove AudioRepetition and AlternativePlc operations, since they can
>   no longer be reached.
> 
> Bug: webrtc:9421
> Change-Id: I651458e9c1931a99f3b07e242817d303bac119df
> Reviewed-on: https://webrtc-review.googlesource.com/84123
> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23704}

Bug: webrtc:9421
Change-Id: Ice351b635788167f2971b26470f73a5e5fa1a240
Reviewed-on: https://webrtc-review.googlesource.com/86543
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23799}
2018-07-02 10:20:33 +00:00
Henrik Lundin
1ff41eb784 Revert "NetEq: Deprecate playout modes Fax, Off and Streaming"
This reverts commit 80c4cca491.

Reason for revert: Breaks downstream tests.

Original change's description:
> NetEq: Deprecate playout modes Fax, Off and Streaming
> 
> The playout modes other than Normal have not been reachable for a long
> time, other than through tests. It is time to deprecate them.
> 
> The only meaningful use was that Fax mode was sometimes set from
> tests, in order to avoid time-stretching operations (accelerate and
> pre-emptive expand) from messing with the test results. With this CL,
> a new config is added instead, which lets the user specify exactly
> this: don't do time-stretching.
> 
> As a result of Fax and Off modes being removed, the following code
> clean-up was done:
> - Fold DecisionLogicNormal into DecisionLogic.
> - Remove AudioRepetition and AlternativePlc operations, since they can
>   no longer be reached.
> 
> Bug: webrtc:9421
> Change-Id: I651458e9c1931a99f3b07e242817d303bac119df
> Reviewed-on: https://webrtc-review.googlesource.com/84123
> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23704}

TBR=henrik.lundin@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org

Change-Id: I555aae8850fc4ac1ea919bfa72c11b5218066f30
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9421
Reviewed-on: https://webrtc-review.googlesource.com/84680
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23706}
2018-06-21 12:36:44 +00:00
Henrik Lundin
80c4cca491 NetEq: Deprecate playout modes Fax, Off and Streaming
The playout modes other than Normal have not been reachable for a long
time, other than through tests. It is time to deprecate them.

The only meaningful use was that Fax mode was sometimes set from
tests, in order to avoid time-stretching operations (accelerate and
pre-emptive expand) from messing with the test results. With this CL,
a new config is added instead, which lets the user specify exactly
this: don't do time-stretching.

As a result of Fax and Off modes being removed, the following code
clean-up was done:
- Fold DecisionLogicNormal into DecisionLogic.
- Remove AudioRepetition and AlternativePlc operations, since they can
  no longer be reached.

Bug: webrtc:9421
Change-Id: I651458e9c1931a99f3b07e242817d303bac119df
Reviewed-on: https://webrtc-review.googlesource.com/84123
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23704}
2018-06-21 11:51:21 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Danil Chapovalov
b602123a5a Replace rtc::Optional with absl::optional in modules/audio_coding
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script with parameter 'modules/audio_coding'

find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: Ic980ee605148fdb160666d4aa03cc87175e48fe8
Reviewed-on: https://webrtc-review.googlesource.com/84130
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23659}
2018-06-19 12:46:20 +00:00
Henrik Lundin
6dc82e8f8b NetEq: Change NetEq's ramp-up behavior after expansions
NetEq tapers down the audio produced through loss concealment when the
expansion has been going on for some time. When the audio packets starts
coming in again, there is a ramp-up that happens. This ramp-up could
before this change extend over more than one 10 ms block, which made
keeping track of the scaling factor necessary. With this change, we make
this ramp-up quicker in the rare cases when it lasted more than 10 ms,
so that it always ramps up to 100% within one block. This way, we can
remove the mute_factor_array.

This change breaks bit-exactness, but careful listening could not reveal
an audible difference.

This change is a part of a larger refactoring of NetEq's PLC code.

Bug: webrtc:9180
Change-Id: I4c513ce3ed8d66f9beec2abfb1f0c7ffaac7a21e
Reviewed-on: https://webrtc-review.googlesource.com/77180
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23342}
2018-05-22 09:38:28 +00:00
Henrik Lundin
9024da84c9 NetEq: Fixing an overflow bug in expand.cc
The overflow currently does not cause any problems, but it has been
found that it can cause crashes after a refactoring that is coming in
the near future.

Bug: webrtc:9180
Change-Id: Ia2c4e545c062c4f8ad13cbc47b8796c6e8a4e906
Reviewed-on: https://webrtc-review.googlesource.com/77667
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23327}
2018-05-21 13:39:25 +00:00
Henrik Lundin
6719017d19 NetEq: Remove background noise fill during long expansions
NetEq was (up until this CL) capable of fading over to generating a
constant background noise when voice expansion had lasted too long.
However, the code has for a really long time only ever used the "off"
mode, which meant that long expansions are faded down to complete
silence (only zeros), i.e., background noise fill was not used.
Removing the other two modes ("on" and "fade") simplifies the code.

Bug: webrtc:9180
Change-Id: Ia2d46960208f3d75c9659ad3f027c52e5ecfb6b0
Reviewed-on: https://webrtc-review.googlesource.com/71485
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22969}
2018-04-23 06:59:46 +00:00
Fredrik Solenberg
bbf21a3fd6 Remove dependencies on modules:module_api from AudioProcessing.
- Directly include api/audio/audio_frame.h everywhere AudioFrame is used.
- This *will* remove transient dependencies on libjpeg and a bunch of other things from the e.g. APM.
- audio_frame.h still included from module_common_types.h for backwards compatibility with clients.

Bug: webrtc:9139, webrtc:7504
Change-Id: Id96f9268c01667fbcc29a01f5c1dd25a37836897
Reviewed-on: https://webrtc-review.googlesource.com/62464
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22845}
2018-04-12 22:05:27 +00:00
Henrik Lundin
4f2a4a12df NetEq: Make the fix for Opus DTX permanent
This change makes the fix for too long delays during Opus DTX periods
permanent. The fix has up until now been under an experiment, named
WebRTC-NetEqOpusDtxDelayFix.

Bug: webrtc:8488,chromium:780849
Change-Id: I006abb67f96d9d7880bf2215d7d6b52db6cbbfbc
Reviewed-on: https://webrtc-review.googlesource.com/44420
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21786}
2018-01-29 08:51:27 +00:00
Mirko Bonadei
81ca3bfb18 Including rtc_base/flags.h after test/gtest.h.
Bug: None
Change-Id: Ic3c0db875902d006935e39139d58dfb842c7a2d6
Reviewed-on: https://webrtc-review.googlesource.com/38180
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21527}
2018-01-09 10:00:33 +00:00
Joachim Bauch
4e90919ad6 Use generic MessageDigest class instead of MD5 / SHA-1 specific classes.
This allows removing the specific classes in a later CL.

Bug: webrtc:8677
Change-Id: I3b9c1f3191c38e6d31a3de990e2d882505e79adc
Reviewed-on: https://webrtc-review.googlesource.com/35040
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Joachim Bauch <jbauch@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21412}
2017-12-21 12:39:50 +00:00
Henrik Lundin
e9619f8f81 Add a new NetEq decoding unit test for Opus with DTX
This tests NetEq with a stream encoded with Opus using it's internal
DTX/CNG.

Also adding a new resource file which is encoded using Opus with DTX.

Bug: webrtc:8488
Change-Id: Icfba5bc5dc7f9c9d0e637a90f4df674e8ba40358
Reviewed-on: https://webrtc-review.googlesource.com/26028
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20905}
2017-11-28 10:45:38 +00:00
Karl Wiberg
e40468ba3d Move some numeric utility code from rtc_base/ to rtc_base/numerics/
Specifically, I'm moving

  safe_compare.h
  safe_conversions.h
  safe_minmax.h

They shouldn't be part of the API, and moving them to an appropriate
subdirectory of rtc_base/ is a good way to keep track of that.

BUG=webrtc:8445

Change-Id: I458531aeb30bcf4291c4bec3bf22a2fffbf054ff
Reviewed-on: https://webrtc-review.googlesource.com/20860
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20829}
2017-11-22 11:21:47 +00:00
Karl Wiberg
eb254b40b3 Don't select audio codecs depending on GN vars build_with_{chromium|mozilla}
BUG=webrtc:8343

Change-Id: I5943006a4da17f72eb88eae9d7ea57574d54f680
Reviewed-on: https://webrtc-review.googlesource.com/9401
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20540}
2017-11-01 18:59:27 +00:00
Ivo Creusen
fd7c0a566a Avoid NetEq triggering a Framelength change when receiving an FEC packet.
Internally in NetEq, an FEC packet looks very similar to a split packet, which caused NetEq to miscalculate the frame length of FEC packets. This incorrect framelength calculation was incorrectly handled as a framelength change by NetEq.

Bug: webrtc:8410
Change-Id: Icaea961d055e49d7726b87811881db0b9149805b
Reviewed-on: https://webrtc-review.googlesource.com/12420
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20373}
2017-10-20 11:56:23 +00:00
Mirko Bonadei
a811027990 Fixing warning C4267 on Win (more_configs).
We added a new bot to client.webrtc.fyi (https://build.chromium.org/p/client.webrtc.fyi/builders/Win%20%28more%20configs%29).

It seems it is spotting some unsafe conversions and this CL is a test to see if we can use rtc::dchecked_cast to fix them:
../../modules/audio_coding/neteq/neteq_unittest.cc(547): error C2220: warning treated as error - no 'object' file generated
../../modules/audio_coding/neteq/neteq_unittest.cc(547): warning C4267: '=': conversion from 'size_t' to 'uint16_t', possible loss of data
../../modules/audio_coding/neteq/neteq_unittest.cc(548): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
../../modules/audio_coding/neteq/neteq_unittest.cc(977): warning C4267: '+=': conversion from 'size_t' to 'uint32_t', possible loss of data
../../modules/audio_coding/neteq/neteq_unittest.cc(979): warning C4267: '+=': conversion from 'size_t' to 'uint32_t', possible loss 

Bug: chromium:759980
Change-Id: Icd0f32ccf620c7c6642fadff797dc2482918648d
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/12921
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20335}
2017-10-18 12:28:58 +00:00
Henrik Lundin
8cd750df1e Enable NetEq's Opus bit-exactness tests for Android
When the test was created, it was disabled for mobile platforms from
the beginning. This is likely a copy-paste from the related
NetEqDecodingTest.TestBitExactness which includes testing codecs not
supported on mobile platforms (e.g., iLBC). This restriction is not
needed for the Opus-only test.

The test remains disabled for iOS, since none of the bots actually run
the relevant test binary on actual iOS devices.

Bug: none
Change-Id: I9071e0e32c83b62c8c7af59ac1cb3e46227f8e8e
Reviewed-on: https://webrtc-review.googlesource.com/8561
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20264}
2017-10-13 07:01:36 +00:00
Gustaf Ullberg
b0a0207838 Added RTCMediaStreamTrackStats.jitterBufferDelay for audio
Description of this stat can be found here:
https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-jitterbufferdelay

Bug: webrtc:8281
Change-Id: Ib2e8174f3449e68ad419ae2d58d5565fc9854023
Reviewed-on: https://webrtc-review.googlesource.com/3381
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20069}
2017-10-02 10:47:00 +00:00
Henrik Lundin
ac0a503828 NetEq/Stats: Don't let concealed_samples decrease
When NetEq performs a merge operation, it will usually have to correct
the stats for number of concealment samples produced, sometimes with
decreasing it.

This does not make sense in the context of the stats spec, and
stats-consuming applications may not be prepared for it. With this
change, only positive corrections are allowed for the
concealed_samples value. This will sometimes lead to a small positive
bias, but it will be negligible over time.

Bug: webrtc:8253
Change-Id: Ie9de311ab16401f1a4b435f6269725901b8cf561
Reviewed-on: https://webrtc-review.googlesource.com/1583
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19941}
2017-09-25 10:53:50 +00:00
Gustaf Ullberg
9a2e906b0c Added RTCMediaStreamTrackStats.concealmentEvents
The number of concealment events. This counter increases every time a concealed sample is
synthesized after a non-concealed sample. That is, multiple consecutive concealed samples
will increase the concealedSamples count multiple times but is a single concealment event.

Bug: webrtc:8246
Change-Id: I7ef404edab765218b1f11e3128072c5391e83049
Reviewed-on: https://webrtc-review.googlesource.com/1221
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19881}
2017-09-18 08:58:06 +00:00
Mirko Bonadei
7120742701 Adding NOLINT for typedefs.h and common_types.h
Now that we have moved WebRTC from src/webrtc to src/, common_types.h
and typedefs.h are triggering a cpplint error.

The cpplint complaint is:
Include the directory when naming .h files  [build/include] [4]

This CL disables the error but we have to remove these two headers
from the root directory.

NOPRESUBMIT=true

Bug: webrtc:5876
Change-Id: I08e1b69aadcc4b28ab83bf25e3819d135d41d333
Reviewed-on: https://webrtc-review.googlesource.com/1577
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19859}
2017-09-15 13:03:51 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/audio_coding/neteq/neteq_unittest.cc (Browse further)