Commit graph

958 commits

Author SHA1 Message Date
Jakob Ivarsson
36274f9158 Reland "Reland "Default enable WebRTC-SendSideBwe-WithOverhead.""
This is a reland of 1dbe30c7e8

Original change's description:
> Reland "Default enable WebRTC-SendSideBwe-WithOverhead."
>
> This is a reland of 87c1950841
>
> Original change's description:
> > Default enable WebRTC-SendSideBwe-WithOverhead.
> >
> > Bug: webrtc:6762
> > Change-Id: I18ace06a33b3b60d5a19796d4769f70cd977d604
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188801
> > Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Reviewed-by: Ali Tofigh <alito@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#32472}
>
> Bug: webrtc:6762
> Change-Id: Icf096a8755d29600a13bd08b1f22f5a79de21e90
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190143
> Reviewed-by: Ali Tofigh <alito@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32492}

Bug: webrtc:6762
Change-Id: I6d79894a213fc42d2338409e7513247725881b1a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191221
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32534}
2020-11-02 11:05:56 +00:00
Mirko Bonadei
8cc6695652 Reformat python files checked by pylint (part 1/2).
After recently changing .pylintrc (see [1]) we discovered that
the presubmit check always checks all the python files when just
one python file gets updated.

This CL moves all these files one step closer to what the linter
wants.

Autogenerated with:

# Added all the files under pylint control to ~/Desktop/to-reformat
cat ~/Desktop/to-reformat | xargs sed -i '1i\\'
git cl format --python --full

This is part 1 out of 2. The second part will fix function names and
will not be automated.

[1] - https://webrtc-review.googlesource.com/c/src/+/186664

No-Presubmit: True
Bug: webrtc:12114
Change-Id: Idfec4d759f209a2090440d0af2413a1ddc01b841
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190980
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32530}
2020-10-30 10:13:11 +00:00
Ivo Creusen
b9b74569df Reset NetEq simulation step time if a large gap is detected.
Large gaps can cause issues in NetEq simulations, so the simulation is
ended whenever we encounter one. However, the time span of the gap is
still included in the simulation time, leading to incorrect results.

Bug: webrtc:10337
Change-Id: I94a1a0b46259e3718b1b73522a3886a17bedbb7d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190287
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32514}
2020-10-28 16:24:41 +00:00
Niels Möller
84d360771b Fix locking in RTPFile class
This code used to have a reader-writer lock, and call
std::queue::pop() with only a reader lock, which appears unsafe. Code
changed to use a plain webrtc::Mutex.

Bug: webrtc:12102
Change-Id: Icbea17a824c91975dfebd4d05bbd0c21e1abeadc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190700
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32511}
2020-10-28 15:19:06 +00:00
Ivo Creusen
2963d303b0 Remove deprecated PacketArrived method from NetEqController interface.
A new version of this method was added in https://webrtc-review.googlesource.com/c/src/+/188385

Bug: webrtc:11005
Change-Id: I8ee959b6b0239462ee3caf784962ed2bb2d349ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188622
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32508}
2020-10-27 14:58:52 +00:00
Björn Terelius
d546186b89 Revert "Reland "Default enable WebRTC-SendSideBwe-WithOverhead.""
This reverts commit 1dbe30c7e8.

Reason for revert: Speculative revert due to failing tests.

Original change's description:
> Reland "Default enable WebRTC-SendSideBwe-WithOverhead."
>
> This is a reland of 87c1950841
>
> Original change's description:
> > Default enable WebRTC-SendSideBwe-WithOverhead.
> >
> > Bug: webrtc:6762
> > Change-Id: I18ace06a33b3b60d5a19796d4769f70cd977d604
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188801
> > Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Reviewed-by: Ali Tofigh <alito@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#32472}
>
> Bug: webrtc:6762
> Change-Id: Icf096a8755d29600a13bd08b1f22f5a79de21e90
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190143
> Reviewed-by: Ali Tofigh <alito@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32492}

TBR=stefan@webrtc.org,jakobi@webrtc.org,alito@webrtc.org

Change-Id: I7e0378788576236059627cf8c3bad58cd70aff7e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6762
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190500
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32504}
2020-10-27 10:51:46 +00:00
Jakob Ivarsson
1dbe30c7e8 Reland "Default enable WebRTC-SendSideBwe-WithOverhead."
This is a reland of 87c1950841

Original change's description:
> Default enable WebRTC-SendSideBwe-WithOverhead.
>
> Bug: webrtc:6762
> Change-Id: I18ace06a33b3b60d5a19796d4769f70cd977d604
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188801
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Ali Tofigh <alito@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32472}

Bug: webrtc:6762
Change-Id: Icf096a8755d29600a13bd08b1f22f5a79de21e90
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190143
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32492}
2020-10-26 12:35:47 +00:00
Niels Möller
7c85d395d7 Delete unneeded includes of system_wrappers/include/sleep.h
Non-test usage is in modules/audio_device and modules/desktop_capture.

Bug: None
Change-Id: Ie7dd89aa40e6dcfa9e49e1956b87b50fd9f1c227
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190140
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32484}
2020-10-26 09:55:26 +00:00
Jakob Ivarsson
27af3c4c24 Revert "Default enable WebRTC-SendSideBwe-WithOverhead."
This reverts commit 87c1950841.

Reason for revert: breaks downstream tests

Original change's description:
> Default enable WebRTC-SendSideBwe-WithOverhead.
>
> Bug: webrtc:6762
> Change-Id: I18ace06a33b3b60d5a19796d4769f70cd977d604
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188801
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Ali Tofigh <alito@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32472}

TBR=stefan@webrtc.org,jakobi@webrtc.org,alito@webrtc.org

Change-Id: If59fd41dcd8f6db76ea297c34c25fe19ae2ae973
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6762
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189973
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32474}
2020-10-22 16:57:18 +00:00
Jakob Ivarsson
87c1950841 Default enable WebRTC-SendSideBwe-WithOverhead.
Bug: webrtc:6762
Change-Id: I18ace06a33b3b60d5a19796d4769f70cd977d604
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188801
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32472}
2020-10-22 13:37:18 +00:00
Jakob Ivarsson
609b047b07 Add NetEq decision logic unit tests.
- Add buffer level filter and delay manager mocks and make them
 injectable for easier testing.
- Add a basic set of tests for simple cases and recently added features.

Bug: webrtc:10333
Change-Id: I8b6f73b8ad99ad6859ed1279086c0bd68b7687be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188623
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32433}
2020-10-19 08:38:02 +00:00
Ivo Creusen
a2b31c35ff Signal to NetEq Controller if arrived packets are DTX packets.
This CL also puts the arguments in a struct to allow for easier future additions.

Bug: webrtc:11005
Change-Id: I47bf664e7106b724eb1fc42299c42bbf022393ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188385
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32409}
2020-10-15 08:22:03 +00:00
Jakob Ivarsson
80fb978990 Reland "Reland "Refactor NetEq delay manager logic.""
This is a reland of 2a7c57c34f

Original change's description:
> Reland "Refactor NetEq delay manager logic."
>
> This is a reland of f8e62fcb14
>
> Original change's description:
> > Refactor NetEq delay manager logic.
> >
> > - Removes dependence on sequence number for calculating target delay.
> > - Changes target delay unit to milliseconds instead of number of
> >   packets.
> > - Moves acceleration/preemptive expand thresholds to decision logic.
> >   Tests for this will be added in a follow up cl.
> >
> > Bug: webrtc:10333
> > Change-Id: If690aae4abf41ef1d9353f0ff01fb7d121cf8a26
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186265
> > Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> > Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#32326}
>
> Bug: webrtc:10333
> Change-Id: Iad5e7063f63b84762959ee5b412f5f14a7b2cd06
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186943
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32332}

Bug: webrtc:10333
Change-Id: If2244ee9a3d56a0cfa9b602e7bdf448dc6340147
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187356
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32367}
2020-10-09 13:05:46 +00:00
Jakob Ivarsson
ff9f6461b6 Revert "Reland "Refactor NetEq delay manager logic.""
This reverts commit 2a7c57c34f.

Reason for revert: unexpected big changes in behavior.

Original change's description:
> Reland "Refactor NetEq delay manager logic."
>
> This is a reland of f8e62fcb14
>
> Original change's description:
> > Refactor NetEq delay manager logic.
> >
> > - Removes dependence on sequence number for calculating target delay.
> > - Changes target delay unit to milliseconds instead of number of
> >   packets.
> > - Moves acceleration/preemptive expand thresholds to decision logic.
> >   Tests for this will be added in a follow up cl.
> >
> > Bug: webrtc:10333
> > Change-Id: If690aae4abf41ef1d9353f0ff01fb7d121cf8a26
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186265
> > Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> > Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#32326}
>
> Bug: webrtc:10333
> Change-Id: Iad5e7063f63b84762959ee5b412f5f14a7b2cd06
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186943
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32332}

TBR=ivoc@webrtc.org,jakobi@webrtc.org

Change-Id: Iffda0e8a7b647392d8dfc6724d49439fa13d71b2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10333
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187100
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32341}
2020-10-07 12:47:01 +00:00
Jakob Ivarsson
2a7c57c34f Reland "Refactor NetEq delay manager logic."
This is a reland of f8e62fcb14

Original change's description:
> Refactor NetEq delay manager logic.
>
> - Removes dependence on sequence number for calculating target delay.
> - Changes target delay unit to milliseconds instead of number of
>   packets.
> - Moves acceleration/preemptive expand thresholds to decision logic.
>   Tests for this will be added in a follow up cl.
>
> Bug: webrtc:10333
> Change-Id: If690aae4abf41ef1d9353f0ff01fb7d121cf8a26
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186265
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32326}

Bug: webrtc:10333
Change-Id: Iad5e7063f63b84762959ee5b412f5f14a7b2cd06
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186943
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32332}
2020-10-06 18:33:53 +00:00
Ivo Creusen
43546869d6 Notify NetEqController during muted state.
During muted state NetEq shortcircuits a large part of the internals to
quickly return a buffer filled with zeros. It can be beneficial for the
controller to be aware that it is in muted state.

Bug: webrtc:11005
Change-Id: I5fe24b4a3704d953cbd68b5a24bbb7ef58b30be0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186760
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32330}
2020-10-06 16:32:04 +00:00
Jakob Ivarsson
b1ae5ccd16 Revert "Refactor NetEq delay manager logic."
This reverts commit f8e62fcb14.

Reason for revert: breaks downstream test.

Original change's description:
> Refactor NetEq delay manager logic.
>
> - Removes dependence on sequence number for calculating target delay.
> - Changes target delay unit to milliseconds instead of number of
>   packets.
> - Moves acceleration/preemptive expand thresholds to decision logic.
>   Tests for this will be added in a follow up cl.
>
> Bug: webrtc:10333
> Change-Id: If690aae4abf41ef1d9353f0ff01fb7d121cf8a26
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186265
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32326}

TBR=ivoc@webrtc.org,jakobi@webrtc.org

Change-Id: I1bdeacce61b902a0003a40c740f6acccf1443e3e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10333
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186942
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32329}
2020-10-06 15:37:45 +00:00
Jakob Ivarsson
f8e62fcb14 Refactor NetEq delay manager logic.
- Removes dependence on sequence number for calculating target delay.
- Changes target delay unit to milliseconds instead of number of
  packets.
- Moves acceleration/preemptive expand thresholds to decision logic.
  Tests for this will be added in a follow up cl.

Bug: webrtc:10333
Change-Id: If690aae4abf41ef1d9353f0ff01fb7d121cf8a26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186265
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32326}
2020-10-06 13:22:45 +00:00
Per Åhgren
a43178c871 Reland "Activating AVX2 support by default"
This is a reland of ad148272b8

Original change's description:
> Activating AVX2 support by default
>
> This CL activates the newly added AVX2 support by default.
> The activation is done beneath a kill-switch.
>
> Beyond the above, the CL also changes an incorrect DCHECK_GT
> to a DCHECK_GE.
>
> Bug: webrtc:11663
> Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32193}

Bug: webrtc:11663, chromium:1134234
Change-Id: I0cb34cf08d4d14bc3aee055254493c9c9ee8faa0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186401
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32303}
2020-10-03 22:37:13 +00:00
Andrey Logvin
082fac73be Revert "Reland "Activating AVX2 support by default""
This reverts commit a0ad0bbf8f.

Reason for revert: Speculative revert. I suspect it breaks downstream project

Original change's description:
> Reland "Activating AVX2 support by default"
>
> This is a reland of ad148272b8
>
> Original change's description:
> > Activating AVX2 support by default
> >
> > This CL activates the newly added AVX2 support by default.
> > The activation is done beneath a kill-switch.
> >
> > Beyond the above, the CL also changes an incorrect DCHECK_GT
> > to a DCHECK_GE.
> >
> > Bug: webrtc:11663
> > Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
> > Commit-Queue: Per Åhgren <peah@webrtc.org>
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#32193}
>
> Bug: webrtc:11663
> Change-Id: Ib41dc1d1c5865f2828699c462939d15d5562df47
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186262
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32270}

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

Change-Id: I1305fad8d19ba0bd69a38b9e2959af54f900535d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11663
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186304
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32273}
2020-10-01 13:39:07 +00:00
Per Åhgren
a0ad0bbf8f Reland "Activating AVX2 support by default"
This is a reland of ad148272b8

Original change's description:
> Activating AVX2 support by default
>
> This CL activates the newly added AVX2 support by default.
> The activation is done beneath a kill-switch.
>
> Beyond the above, the CL also changes an incorrect DCHECK_GT
> to a DCHECK_GE.
>
> Bug: webrtc:11663
> Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32193}

Bug: webrtc:11663
Change-Id: Ib41dc1d1c5865f2828699c462939d15d5562df47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186262
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32270}
2020-10-01 12:19:19 +00:00
Per Åhgren
80907be915 Revert "Activating AVX2 support by default"
This reverts commit ad148272b8.

Reason for revert: Speculative revert to investigate test failures

Original change's description:
> Activating AVX2 support by default
>
> This CL activates the newly added AVX2 support by default.
> The activation is done beneath a kill-switch.
>
> Beyond the above, the CL also changes an incorrect DCHECK_GT
> to a DCHECK_GE.
>
> Bug: webrtc:11663
> Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32193}

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

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

Bug: webrtc:11663
Change-Id: Ibb019e8c702dce45ebf47f1c1e8db19069b4964d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186081
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32259}
2020-09-30 15:30:04 +00:00
Henrik Lundin
df2a4654a0 Improve neteq_rtp_fuzzer
This change lets the fuzzer modify the first few bytes of the RTP
payload. One of the benefits is that it can cover the RED header
splitter functionality.

The CL also fixes an issue found while running the fuzzer locally.

Bug: webrtc:11640
Change-Id: I7ca73676440897a14a0aaca796f70d381e016575
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185819
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32242}
2020-09-29 20:24:07 +00:00
Philipp Hancke
2291fb36cf red: ensure minimum amount of header bytes
avoids out-of-bounds reads when splitting RED packets.

Bug: webrtc:11640
Change-Id: I38beb5b373c4faa878f627a5df17dd4db9ea20cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185804
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#32239}
2020-09-29 17:07:08 +00:00
Niels Möller
de95329daa Delete macros RTC_DISALLOW_ASSIGN and RTC_DISALLOW_IMPLICIT_CONSTRUCTORS
The former was unused, the latter is replaced with the explicit C++11
deletions. The related RTC_DISALLOW_COPY_AND_ASSIGN is left for now,
it is used in a lot more places.

Bug: None
Change-Id: I49503e7f2b9ff43c6285f8695833479bbc18c380
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185500
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32224}
2020-09-29 10:19:20 +00:00
Per Åhgren
e5d669ed28 Reland "Activating AVX2 support by default"
This is a reland of ad148272b8

Original change's description:
> Activating AVX2 support by default
>
> This CL activates the newly added AVX2 support by default.
> The activation is done beneath a kill-switch.
>
> Beyond the above, the CL also changes an incorrect DCHECK_GT
> to a DCHECK_GE.
>
> Bug: webrtc:11663
> Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32193}

Bug: webrtc:11663
Change-Id: I669435c2f4e451ee0766d809443484f2dde09d8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185482
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32200}
2020-09-25 14:46:20 +00:00
Per Åhgren
9ccbe17abb Revert "Activating AVX2 support by default"
This reverts commit ad148272b8.

Reason for revert: Causing test failures downstream.

Original change's description:
> Activating AVX2 support by default
>
> This CL activates the newly added AVX2 support by default.
> The activation is done beneath a kill-switch.
>
> Beyond the above, the CL also changes an incorrect DCHECK_GT
> to a DCHECK_GE.
>
> Bug: webrtc:11663
> Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32193}

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

Change-Id: If2287a0a4b37931ce5f85baae093a66b19d0a78b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11663
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185481
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32196}
2020-09-25 12:13:46 +00:00
Per Åhgren
ad148272b8 Activating AVX2 support by default
This CL activates the newly added AVX2 support by default.
The activation is done beneath a kill-switch.

Beyond the above, the CL also changes an incorrect DCHECK_GT
to a DCHECK_GE.

Bug: webrtc:11663
Change-Id: I231ccb2f5efabf74cd8190411daa954b2b94a2a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183042
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32193}
2020-09-25 11:30:22 +00:00
Niels Möller
4461f059d1 Delete unused NetEq stats currentPacketLossRate, currentDiscardRate and addedSamples
Bug: webrtc:11622
Change-Id: I097bb7284d952ada41f4f38dd7adf3536bd040ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183620
Reviewed-by: Minyue Li <minyue@google.com>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32148}
2020-09-21 12:19:16 +00:00
Niels Möller
6b4d962947 Fix standard GetStats to not modify NetEq state.
Add a get_and_clear_legacy_stats flag to AudioReceiveStream::GetStats,
to distinguish calls from standard GetStats and legacy GetStats.

Add const method NetEq::CurrentNetworkStatistics to get current
values of stateless NetEq stats. Standard GetStats will then call this
method instead of NetEq::NetworkStatistics.

Bug: webrtc:11622
Change-Id: I3833a246a9e39b18c99657a738da22c6e2bd5f5e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183600
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32092}
2020-09-14 09:51:21 +00:00
Jeremy Leconte
c8850cbf55 Change gtest name to allow filtering based on the story name.
It is meant for Pinpoint to run only the relevant tests when running a bisection.
The Pinpoint side of this change can be found here:
https://crrev.com/c/2404161

Bug: webrtc:11084
Change-Id: I466f39816b83e2f83a3a49845c99605f4d5a857b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183763
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32082}
2020-09-11 14:11:27 +00:00
Niels Möller
673027b4a5 Make NetEqController::TargetLevelMs const, part 2
Followup to https://webrtc-review.googlesource.com/c/src/+/183881.

Bug: webrtc:11622
Change-Id: I8d76bf082e81ba1217d20e57c6ae6555eca2fc7b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183883
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32078}
2020-09-11 09:34:55 +00:00
Hidehiko Abe
f264e70a47 Expand is_linux to is_linux || is_chromeos.
Currently is_linux is set to true on Chrome OS build,
but it is planned to be set false. This CL is the preparation
to keep the compatibility.

Bug: chromium:1110266
Test: Build locally.
Change-Id: Ic79a202b0b3baeff157955cd03a07556bfb958a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183860
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#32073}
2020-09-10 17:01:16 +00:00
Niels Möller
fd71e799cb Delete unused counters added_zero_samples_ and discarded_packets_
Bug: webrtc:11622
Change-Id: I15010f7ebf59377c266863cc67c7ffe0dcb78ace
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183540
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32052}
2020-09-07 14:40:21 +00:00
Mirko Bonadei
bef022bde0 Refactor cpu_features_wrapper.h functions from C to C++.
As mentioned on https://webrtc-review.googlesource.com/c/src/+/183380,
then relanded as https://webrtc-review.googlesource.com/c/src/+/183444,
functions in cpu_features_wrapper.h should be refactored to use
C++ features like namespaces and drop the WebRtc_ prefix.

Bug: None
Change-Id: I3e83e1668f9bf48a5d8e85d809f006666b7fa45e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183445
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32045}
2020-09-07 08:44:24 +00:00
Mirko Bonadei
66e7338617 Reland "Merge cpu_features build targets into //system_wrappers."
This is a reland of 2b242d8fba

Original change's description:
> Merge cpu_features build targets into //system_wrappers.
>
> Before this CL, functions declared in cpu_features_wrapper.h where
> not defined in the same build target, causing brittle builds that
> might fail at link time if the binary was not depending on
> //system_wrappers (the target with the definitions), violating [1].
>
> This CL moves everything into //system_wrappers and also moves
> cpu_features_wrapper.h definitions from C to C++ (in order to be able
> to add the definitions to a C++ build target like //system_wrappers).
>
> [1] - https://webrtc.googlesource.com/src/+/refs/heads/master/style-guide.md#h-cc-pairs
>
> Bug: None
> Change-Id: I5a0009cddb17206b19f2a71eeba722faacc4bcae
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183380
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32039}

TBR=kwiberg@webrtc.org

Bug: None
Change-Id: I1695b9a34d3ec20c50c1202a745f64fac58edef0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183444
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32042}
2020-09-06 10:38:23 +00:00
Mirko Bonadei
d156a0d061 Revert "Merge cpu_features build targets into //system_wrappers."
This reverts commit 2b242d8fba.

Reason for revert: Breaks downstream project.

Original change's description:
> Merge cpu_features build targets into //system_wrappers.
> 
> Before this CL, functions declared in cpu_features_wrapper.h where
> not defined in the same build target, causing brittle builds that
> might fail at link time if the binary was not depending on
> //system_wrappers (the target with the definitions), violating [1].
> 
> This CL moves everything into //system_wrappers and also moves
> cpu_features_wrapper.h definitions from C to C++ (in order to be able
> to add the definitions to a C++ build target like //system_wrappers).
> 
> [1] - https://webrtc.googlesource.com/src/+/refs/heads/master/style-guide.md#h-cc-pairs
> 
> Bug: None
> Change-Id: I5a0009cddb17206b19f2a71eeba722faacc4bcae
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183380
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32039}

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

Change-Id: I4daa7582e55a0343eef72f08ed023c73e0b6456b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183443
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32040}
2020-09-05 21:18:40 +00:00
Mirko Bonadei
2b242d8fba Merge cpu_features build targets into //system_wrappers.
Before this CL, functions declared in cpu_features_wrapper.h where
not defined in the same build target, causing brittle builds that
might fail at link time if the binary was not depending on
//system_wrappers (the target with the definitions), violating [1].

This CL moves everything into //system_wrappers and also moves
cpu_features_wrapper.h definitions from C to C++ (in order to be able
to add the definitions to a C++ build target like //system_wrappers).

[1] - https://webrtc.googlesource.com/src/+/refs/heads/master/style-guide.md#h-cc-pairs

Bug: None
Change-Id: I5a0009cddb17206b19f2a71eeba722faacc4bcae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183380
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32039}
2020-09-05 20:43:27 +00:00
Peter Thatcher
e502386463
Merge with 4183 (M85) (#25) 2020-09-01 14:43:30 -07:00
Ivo Creusen
876a3dc88a Fix for NetEq simulations containing large gaps and multiple SSRCs.
This CL fixes 2 issues that affect NetEq simulations.
- When using event logs with multiple SSRCs, it does not make sense to
  use more than a single SSRC. If the user does not provide an SSRC
  filter, we should use the first SSRC we find and no others.
- It is possible for event logs to have a gap in the middle, and
  sometimes we don't store/mark the gap properly. If is possible to
  detect gaps by looking at the wallclock time delta between getAudio
  events. These should be 10 ms nominally, so values greater than 1000
  should never happen and indicate an error.

Bug: webrtc:11855
Change-Id: Idc3b8a7902be4159da48b063ef5c5c82fd484071
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181940
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31960}
2020-08-19 09:11:10 +00:00
Philipp Hancke
c908c5575f red: do not generate packets which are > 1200 bytes
and do not generate redundancy for packets that are larger
than 1024 bytes which is the maximum size red can encode.

Bug: webrtc:11640
Change-Id: I211cb196eee2a0659f22a601a6dee4b7dd4e5116
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178781
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31846}
2020-08-04 09:53:47 +00:00
Peter Thatcher
8f41923c9d
Update to M84 (4147) (#14)
Merge branch-heads/4147 into master
2020-07-21 19:48:32 -07:00
Philipp Hancke
fc4668dae2 configure target bitrate in opus dtx tests
This avoids a difference in behaviour between mobile and
desktop platforms since the bitrate is now too low for
CELT mode.

BUG=webrtc:11643

Change-Id: I9ac1439bea0ccbbfee7388516932e30d6cb06bf4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179522
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#31757}
2020-07-17 11:43:45 +00:00
Philipp Hancke
686a3709ac opus: take SILK vad result into account for voice detection
BUG=webrtc:11643

Change-Id: Idc3a9b6bb7bd1a33f905843e5d6067ae19d5172c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176508
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31743}
2020-07-16 11:37:35 +00:00
Niels Möller
e51d6ac5d2 Fix override declarations and delete related TODOs
Bug: webrtc:10198, chromium:428099
Change-Id: Ic7b0dd3c58c3daa5ade4d2c503b77a51b29c716e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179380
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31739}
2020-07-16 07:42:02 +00:00
Markus Handell
0df0faefd5 Migrate modules/audio_coding, audio_mixer/ and audio_processing/ to webrtc::Mutex.
Bug: webrtc:11567
Change-Id: I03b78bd2e411e9bcca199f85e4457511826cd17e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176745
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31649}
2020-07-07 14:35:58 +00:00
Ivo Creusen
9030994e91 Update default max nr of packets to 200.
In production code, the maximum number of packets is by default set to
200, so we should adopt the same behavior in tests.

Bug: None
Change-Id: I415790b7cd9fb170ea7ac94685cc6bbe14efac4d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178744
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31646}
2020-07-07 13:07:26 +00:00
Philipp Hancke
41525d0cc0 red: implement RED with distance 2
Extends the RED implementation to support a distance of two, i.e. two
packets redundancy.

BUG=webrtc:11640

Change-Id: I5113a97a4e3d45d836d7952a0c19c5381069c158
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178565
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31625}
2020-07-03 13:53:28 +00:00
Henrik Lundin
11b6f6857f Replace slave -> helper, master -> reference
A slight simplification of the NetEq code is also included.

The subtrees below common_audio, modules/audio_coding and
modules/audio_processing were scanned while making this CL.

Bug: webrtc:11680
Change-Id: I33bb1c75b2e3d1c6793fd1c5741ca59f4b6e8455
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178361
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31578}
2020-06-29 12:18:05 +00:00
Peter Thatcher
9aeaa25d4c
Update to WebRTC 4103 (M83) (#12)
* Merge in branch-heads/4103 (M83)

* Disable legacy DTLS protocols (before 1.2)

* Update sdk/objc modifications for upstream changes

* Update ios and mac deployment targets

Co-authored-by: Jim Gustafson <jim@signal.org>
2020-06-25 11:14:34 -07:00
Philipp Hancke
603cc3a31e red: modify the encoder to send RFC 2198
modifies the RED encoder to send the actual RFC 2198 format
described in
  https://tools.ietf.org/html/rfc2198
Decoding is handled in neteq, see red_payload_splitter.h

BUG=webrtc:11640

Change-Id: Ib3005882a3ceee49d2b05c43357f552432a984ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176371
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31560}
2020-06-24 21:25:05 +00:00
Jakob Ivarsson
d95138b684 Make stable target adaptation enabled by default.
This will result in slightly higher encode bitrates and longer frame
lengths compared to using the smoothing filter.

Bug: webrtc:10981
Change-Id: I64704196c56b0ad910895c908baad38c994a971b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177425
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31556}
2020-06-24 11:22:21 +00:00
Mirko Bonadei
24762f207f Fix missing dependencies.
Setting gtest_enable_absl_printers to false in .gn uncovers some missing
dependencies that were pulled in by gtest.

Bug: None
Change-Id: Ibd7772f6e2af9c798c97161c24f70b1658e3723c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177843
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31551}
2020-06-23 15:46:34 +00:00
Karl Wiberg
30a3e78794 iSAC encoder: Make it possible to change target bitrate at any time
Not just at construction time.

Bug: webrtc:11704
Change-Id: I952c7dbe20774cc976065c7d2f992a80074ebf63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177663
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31550}
2020-06-22 14:59:22 +00:00
Jakob Ivarsson
af0d5bca34 Remove ANA FEC control in Opus encoder.
This has been proven to not be useful.

Bug: chromium:1086942
Change-Id: Ib71b194f59301851791a1a056f5f10b98c5a1d57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177520
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31548}
2020-06-22 11:18:26 +00:00
Jakob Ivarsson
f46902c540 Add a simple frame length controller.
This will be used when adaptivePtime is enabled.

Bug: chromium:1086942
Change-Id: I63c947c53a8c5b8e0825b78b847c3f7900197d6c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177421
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31544}
2020-06-18 15:21:48 +00:00
Henrik Lundin
f7cba9f132 Add field trial and test for NetEq extra delay
Adding field trial WebRTC-Audio-NetEqExtraDelay with a parameter value
to set the extra delay in NetEq. This overrides the
extra_output_delay_ms parameter in NetEq::Config.

Bug: b/156734419
Change-Id: Iae7d439fafa3059494249959ac13a02de63d6b7a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176858
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31493}
2020-06-10 17:37:59 +00:00
Philipp Hancke
0fd1ef135c opus: add helper function to extract voice activity information
BUG=webrtc:11643

Change-Id: I3cebc40916de0e4b0f5e41f5fda97dd53f76e4e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176740
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31490}
2020-06-10 14:21:01 +00:00
Jakob Ivarsson
7649006692 Remove packet loss rate optimization and minimum field trial.
Bug: webrtc:11664
Change-Id: I63fab70e5ae85e2971bed4998ab3b15f61f9e1c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176752
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31480}
2020-06-10 08:37:30 +00:00
Mirko Bonadei
2dcf348011 Use absl_deps in order to preapre to the Abseil component build release.
Bug: webrtc:1046390
Change-Id: Ia35545599de23b1a2c2d8be2d53469af7ac16f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176502
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31463}
2020-06-08 12:59:40 +00:00
Philipp Hancke
abbefba909 build: remove WEBRTC_CODEC_RED
gone for a while

BUG=webrtc:5922

Change-Id: Ie5d2f6dbffbc349686dbaf05a378375dbff0dce0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175914
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31352}
2020-05-26 11:01:26 +00:00
Henrik Lundin
c49e9c253f Adding a delay line to NetEq's output
This change adds an optional delay to NetEq's output. Note, this is not
equivalent to increasing the jitter buffer with the same extra length.

Bug: b/156734419
Change-Id: I8b70b6b3bffcfd3da296ccf29853864baa03d6bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175110
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31343}
2020-05-25 12:03:39 +00:00
Danil Chapovalov
704fb55255 In common_audio/ and modules/audio_* replace mock macros with unified MOCK_METHOD macro
Bug: webrtc:11564
Change-Id: Ib0ffce4de50a13b018926f6ea2865a2ec2fb2ec7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175621
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31333}
2020-05-20 13:17:31 +00:00
Tommi
909f3a5339 Rename several more tests that use EXPECT_DEATH to *DeathTest.
Bug: webrtc:11577
Change-Id: I0397ee933464496e4885bb0f8030f3d669e5e612
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175641
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31309}
2020-05-18 16:10:04 +00:00
Mirko Bonadei
a81e9c82fc Wrap WebRTC OBJC API types with RTC_OBJC_TYPE.
This CL introduced 2 new macros that affect the WebRTC OBJC API symbols:

- RTC_OBJC_TYPE_PREFIX:
  Macro used to prepend a prefix to the API types that are exported with
  RTC_OBJC_EXPORT.

  Clients can patch the definition of this macro locally and build
  WebRTC.framework with their own prefix in case symbol clashing is a
  problem.

  This macro must only be defined by changing the value in
  sdk/objc/base/RTCMacros.h  and not on via compiler flag to ensure
  it has a unique value.

- RCT_OBJC_TYPE:
  Macro used internally to reference API types. Declaring an API type
  without using this macro will not include the declared type in the
  set of types that will be affected by the configurable
  RTC_OBJC_TYPE_PREFIX.

Manual changes:
https://webrtc-review.googlesource.com/c/src/+/173781/5..10

The auto-generated changes in PS#5 have been done with:
https://webrtc-review.googlesource.com/c/src/+/174061.

Bug: None
Change-Id: I0d54ca94db764fb3b6cb4365873f79e14cd879b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173781
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31153}
2020-05-04 15:01:26 +00:00
Mirko Bonadei
9621377730 Remove WebRTC-Audio-NewOpusPacketLossRateOptimization.
This field trial is unused.

Bug: webrtc:11503
Change-Id: I34262ea4ab169479ceded820c1aa309981731f1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173338
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31059}
2020-04-14 10:02:52 +00:00
Patrik Höglund
36b35d528c Reland "Flip histograms to true by default, fix unit in isac_fix_test."
This reverts commit c59a304901.

Reason for revert: Other perf tests greening up, can now land this

Original change's description:
> Revert "Flip histograms to true by default, fix unit in isac_fix_test."
> 
> This reverts commit 7b201012bc.
> 
> Reason for revert: Seems to work, but need to get low bw tests working first
> 
> Original change's description:
> > Flip histograms to true by default, fix unit in isac_fix_test.
> > 
> > Requires downstream changes for all WebRTC perf tests, and
> > a corresponding recipe change so isac_fix_test starts using the new
> > flow.
> > 
> > Bug: chromium:1029452
> > Change-Id: I8918fca9bef003d365037c1c6bf7c55747dfed99
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170633
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#30906}
> 
> TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> 
> Change-Id: I96c2309cd71be14c5a27b515736a32f1b256453c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1029452
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171865
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30913}

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

Change-Id: If39500beeca74b8e0ed9e97724a55529125a2253
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1029452
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171876
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30920}
2020-03-27 13:05:34 +00:00
Patrik Höglund
c59a304901 Revert "Flip histograms to true by default, fix unit in isac_fix_test."
This reverts commit 7b201012bc.

Reason for revert: Seems to work, but need to get low bw tests working first

Original change's description:
> Flip histograms to true by default, fix unit in isac_fix_test.
> 
> Requires downstream changes for all WebRTC perf tests, and
> a corresponding recipe change so isac_fix_test starts using the new
> flow.
> 
> Bug: chromium:1029452
> Change-Id: I8918fca9bef003d365037c1c6bf7c55747dfed99
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170633
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30906}

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

Change-Id: I96c2309cd71be14c5a27b515736a32f1b256453c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1029452
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171865
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30913}
2020-03-27 07:57:09 +00:00
Patrik Höglund
7b201012bc Flip histograms to true by default, fix unit in isac_fix_test.
Requires downstream changes for all WebRTC perf tests, and
a corresponding recipe change so isac_fix_test starts using the new
flow.

Bug: chromium:1029452
Change-Id: I8918fca9bef003d365037c1c6bf7c55747dfed99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170633
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30906}
2020-03-26 19:36:44 +00:00
Ali Tofigh
7e5dfdbca3 Implement AudioEncoder::GetFrameLengthRange() for all audio encoders.
The WebRTC-SendSideBwe-WithOverhead field trial requires audio
encoders to properly implement the
AudioEncoder::GetFrameLengthRange() function. Thic CL implements
the function for all audio encoders in WebRTC in preparation for
making that function pure virtual in the interface.


Bug: webrtc:11427
Change-Id: Ieab6b6c72c62af6ac9525a20fcb39bd477079551
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171503
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30890}
2020-03-25 22:19:21 +00:00
Per Åhgren
85c2dafbf3 [Merge M81] - ACM: Corrected temporary buffer size
This CL corrects the temporary buffers size in the
pre-processing of the capture audio before encoding.

As part of this it removes the ACM-specific hardcoding
of the size and instead ensures that the size of the
temporary buffer matches that of the AudioFrame.

(cherry picked from commit d82a02c837)

No-Try: True
TBR: kwiberg@webrtc.org
Bug: webrtc:11242, chromium:1060647
Change-Id: I56dd6cadfd4e140e8e159966c33d1027383ea9fa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170340
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Original-Commit-Position: refs/heads/master@{#30775}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170780
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/branch-heads/4044@{#10}
Cr-Branched-From: be99ee8f17f93e06c81e3deb4897dfa8253d3211-refs/heads/master@{#30432}
2020-03-18 20:22:23 +00:00
Per Åhgren
d82a02c837 ACM: Corrected temporary buffer size
This CL corrects the temporary buffers size in the
pre-processing of the capture audio before encoding.

As part of this it removes the ACM-specific hardcoding
of the size and instead ensures that the size of the
temporary buffer matches that of the AudioFrame.

Bug: webrtc:11242
Change-Id: I56dd6cadfd4e140e8e159966c33d1027383ea9fa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170340
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30775}
2020-03-12 12:23:20 +00:00
Patrik Höglund
b8e69efcee Write protos as binary.
We need to write protos as "wb" and not "w", otherwise we get CRLF
on Windows which corrupts the proto.

Bug: chromium:1029452
Change-Id: Iabf841405134d7bc2523ac48219ca7cb9d8214c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170320
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30772}
2020-03-12 09:43:57 +00:00
Artem Titov
e618cc9c1e Add jitterBufferTargetDelay as RTCNonStandardStatsMember to new GetStats API
Bug: webrtc:11381
Change-Id: I7df3450e50da49d178e1e3a5d9f4970672d91aac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169120
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30758}
2020-03-11 12:08:32 +00:00
Niels Möller
3bdc5e9a5f Delete ACMVADCallback
This callback is enabled via the method
AudioCodingModule::RegisterVADCallback, which is unused, and deleted
in this cl.

Bug: None
Change-Id: I04c8690fbb673305e69fe5b1c32d88efd6c72d1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148420
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30735}
2020-03-10 09:53:46 +00:00
Ivo Creusen
16ddae924e Update Opus tests for Opus 1.3
This updates various bitexactness tests and other tests that no longer
pass.

Bug: webrtc:11325
Change-Id: Ifa3e4b42e303f5573e028dfdf8a108a76f6318ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168952
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30688}
2020-03-05 08:53:37 +00:00
Alessio Bazzica
a7382f7879 iSAC API wrapper unit test fix
Use speech content instead of white noise and enable target vs measured
bitrate tests.

Bug: webrtc:11360
Change-Id: If8c8e73f943eda14efeb22ba406c7a1bed7d32b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168660
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30630}
2020-02-27 14:27:23 +00:00
Tom Anderson
422f9dd5df Conditionally use OPUS_GET_IN_DTX if available
OPUS_GET_IN_DTX was added 2019-04-15, but we still need to support
building on systems with older versions of the Opus headers (eg. Debian
Jessie, released 2015-04-25).  This is needed to fix the "Build From
Tarball" bot [1].

[1] https://ci.chromium.org/p/infra/builders/cron/Build%20From%20Tarball

BUG=chromium:1047860,webrtc:11085
R=minyue@webrtc.org,henrick.lundin@webrtc.org

Change-Id: I5418c3caf4d2c7da9b9ba43ce85879b1e0eec6e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168560
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#30612}
2020-02-25 18:10:42 +00:00
Niels Möller
dbf5416a80 Delete header file rtc_base/memory/aligned_array.h
Move definition of AlignedArray to the only code using it, the
test-only LappedTransform class, and delete unused methods.

Bug: webrtc:6424, webrtc:9577
Change-Id: I1bb5f57400f7217345b7ec7376235ad4c4bae858
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168701
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30576}
2020-02-20 14:55:25 +00:00
Mirko Bonadei
4a14f4997c Remove wildcard ownership for build files.
No-Try: True
Bug: webrtc:10381
Change-Id: I852d9a2da7e0c5c12f508a1c788b0b5753503aba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168769
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30558}
2020-02-19 14:05:46 +00:00
Mirko Bonadei
e52115a33e Remove inactive OWNERS.
No-Try: True
Bug: webrtc:10381
Change-Id: I3b56c74d913a47e4297518005b0cb19de8fafbff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168421
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30556}
2020-02-19 13:37:36 +00:00
Minyue Li
dea73ee8f9 Pass absolute capture time from WebRtcVoiceEngine to ACM.
Bug: webrtc:10739
Change-Id: I6f264cb89ce340db642db3ef7dfc2b5d459f749e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167211
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Chen Xing <chxg@google.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30547}
2020-02-18 16:54:48 +00:00
Alessio Bazzica
08b11cafae iSAC config: target bitrate exposed for fixed impl
It is now possible to set the target bitrate for iSAC for the fixed
point implementation. Unit tests added.

Bug: webrtc:11360
Change-Id: I60225d4ca1363cdacf18931e7cf412c5aec8d8fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168529
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30526}
2020-02-14 14:08:21 +00:00
Alessio Bazzica
b3548bf287 iSAC unit test: test encode/decode via API wrapper
Unit test to test the iSAC webrtc API wrapper, plus a minor
change in the c iSAC wrapper.

Bug: webrtc:10584
Change-Id: Iecbf6f3e7db5b3bdba41f8428254ae6a6a73e24a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168492
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30514}
2020-02-13 11:29:01 +00:00
Alessio Bazzica
d428ddd8f1 iSAC fixed point: fix int overflows
Bug: webrtc:11137
Change-Id: If9276457b39285191ee2d9a0fbcb7e0a7a379be8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168523
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30513}
2020-02-13 11:14:41 +00:00
Alessio Bazzica
b28e57e725 NetEQ audio decoder unit test: use ParsePayload
AudioDecoder::Decode() is obsolete. This CL replaces it with
ParsePayload() in the audio decoder NetEQ unit tests.

Bug: webrtc:10098
Change-Id: I602b0330adbe1d0921b0c4524aa7305b500f2ebf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168486
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30511}
2020-02-13 09:05:55 +00:00
Danil Chapovalov
5528402ef8 Use newer version of TimeDelta and TimeStamp factories in modules/
This change generated with following commands:
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g"
git cl format

Bug: None
Change-Id: I117d64a54950be040d996035c54bc0043310943a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168340
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30489}
2020-02-10 11:49:57 +00:00
Oskar Sundbom
2fe31a47b6 Remove ossu@ from audio/ and audio_coding/ OWNERS
I've not worked in these parts for years!

Bug: webrtc:10381
Change-Id: Ie78947b3d5ed9106bc05749ab21b4dbca1da88d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168346
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30488}
2020-02-10 11:05:27 +00:00
Ivo Creusen
c31a4ec66a Disable opus tests to allow upgrade to opus 1.3
The upgrade to opus 1.3 is easier to carry out while the opus
bitexactness tests are temporarily disabled.

Bug: webrtc:11325
Change-Id: I96eecdbc93a01da88b92ae7f6473034c9795f3a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167726
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30425}
2020-01-30 14:57:15 +00:00
Sebastian Jansson
c3eb9fd49f Reland "Reland "Only include overhead if using send side bandwidth estimation.""
This is a reland of 086055d0fd

ANA was accitendly disabled even when transport sequence numbers were
negotiated due to a bug in how the audio send stream is configured. To
solve this we simply continue to always allow enabling ANA and leave it
up to the application to ensure that it's not used together with receive
side estimation.

Original change's description:
> Reland "Only include overhead if using send side bandwidth estimation."
>
> This is a reland of 8c79c6e1af
>
> Original change's description:
> > Only include overhead if using send side bandwidth estimation.
> >
> > Bug: webrtc:11298
> > Change-Id: Ia2daf690461b55d394c1b964d6a7977a98be8be2
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166820
> > Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> > Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> > Reviewed-by: Ali Tofigh <alito@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#30382}
>
> Bug: webrtc:11298
> Change-Id: I33205e869a8ae27c15ffe991f6d985973ed6d15a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167524
> Reviewed-by: Ali Tofigh <alito@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30390}

Bug: webrtc:11298
Change-Id: If2ad91e17ebfc85dc51edcd9607996e18c5d1f13
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167883
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30413}
2020-01-29 18:42:34 +00:00
Mirko Bonadei
4356490b7b Revert "Reland "Only include overhead if using send side bandwidth estimation.""
This reverts commit 086055d0fd.

Reason for revert: Causes some perf regressions.

Original change's description:
> Reland "Only include overhead if using send side bandwidth estimation."
> 
> This is a reland of 8c79c6e1af
> 
> Original change's description:
> > Only include overhead if using send side bandwidth estimation.
> > 
> > Bug: webrtc:11298
> > Change-Id: Ia2daf690461b55d394c1b964d6a7977a98be8be2
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166820
> > Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> > Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> > Reviewed-by: Ali Tofigh <alito@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#30382}
> 
> Bug: webrtc:11298
> Change-Id: I33205e869a8ae27c15ffe991f6d985973ed6d15a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167524
> Reviewed-by: Ali Tofigh <alito@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30390}

TBR=saza@webrtc.org,ossu@webrtc.org,sprang@webrtc.org,srte@webrtc.org,alito@webrtc.org

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

Bug: webrtc:11298
Change-Id: Id38de92ac25a1ce9a1360f0e37f65747d4cfb31b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167881
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30411}
2020-01-29 16:38:57 +00:00
Ivo Creusen
182c2b8334 Expose run function to NetEqSimulator
Bug: webrtc:11005
Change-Id: I84f01536b40ba17e66877cdced194e05b882b5c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167537
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30405}
2020-01-29 11:55:05 +00:00
Sebastian Jansson
086055d0fd Reland "Only include overhead if using send side bandwidth estimation."
This is a reland of 8c79c6e1af

Original change's description:
> Only include overhead if using send side bandwidth estimation.
> 
> Bug: webrtc:11298
> Change-Id: Ia2daf690461b55d394c1b964d6a7977a98be8be2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166820
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Ali Tofigh <alito@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30382}

Bug: webrtc:11298
Change-Id: I33205e869a8ae27c15ffe991f6d985973ed6d15a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167524
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30390}
2020-01-28 10:36:39 +00:00
Sebastian Jansson
c709412c76 Revert "Only include overhead if using send side bandwidth estimation."
This reverts commit 8c79c6e1af.

Reason for revert: Introduced a Bug that can happen if the include overhead state changes between pushing and poping a packet from the pacer packet queue.

Original change's description:
> Only include overhead if using send side bandwidth estimation.
> 
> Bug: webrtc:11298
> Change-Id: Ia2daf690461b55d394c1b964d6a7977a98be8be2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166820
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Ali Tofigh <alito@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30382}

TBR=saza@webrtc.org,ossu@webrtc.org,sprang@webrtc.org,srte@webrtc.org,alito@webrtc.org

Change-Id: I0cacbc26408b7bec5bc3855a628e62407c081117
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11298
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167523
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30383}
2020-01-27 15:09:49 +00:00
Sebastian Jansson
8c79c6e1af Only include overhead if using send side bandwidth estimation.
Bug: webrtc:11298
Change-Id: Ia2daf690461b55d394c1b964d6a7977a98be8be2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166820
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30382}
2020-01-27 14:19:54 +00:00
Minyue Li
ff0e4dbd1f Reland "Send absolute capture time through audio coding module."
This is a reland of 48655cfdbf

Original change's description:
> Send absolute capture time through audio coding module.
>
> Bug: webrtc:10739
> Change-Id: I44e0305be7c84b253172511c2977b1d700e40c1b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167067
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Chen Xing <chxg@google.com>
> Commit-Queue: Minyue Li <minyue@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30363}

Bug: webrtc:10739
Change-Id: I10086d239ad3f1efb8485098bf3b0ad23110962b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167213
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Chen Xing <chxg@google.com>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30380}
2020-01-27 13:18:27 +00:00
Ivo Creusen
88636c6dac Improvements for NetEqControllers
When creating a NetEqController it can be useful to have access to a
webrtc::Clock*. Also, NetEqControllers should have access to the
contents of the sync buffer when making decisions.

Bug: webrtc:11005
Change-Id: I7fdba75ce661b2ace52458620a8c1f3c990e5ac2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167208
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30368}
2020-01-24 11:39:52 +00:00
Minyue Li
4175914f41 Revert "Send absolute capture time through audio coding module."
This reverts commit 48655cfdbf.

Reason for revert: failing upstream tests

Original change's description:
> Send absolute capture time through audio coding module.
> 
> Bug: webrtc:10739
> Change-Id: I44e0305be7c84b253172511c2977b1d700e40c1b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167067
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Chen Xing <chxg@google.com>
> Commit-Queue: Minyue Li <minyue@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30363}

TBR=danilchap@webrtc.org,ossu@webrtc.org,minyue@webrtc.org,chxg@google.com

Change-Id: Ia36b9ae899563c9afd8612ffd83871b8a5778a2b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10739
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167212
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30364}
2020-01-23 16:21:06 +00:00
Minyue Li
48655cfdbf Send absolute capture time through audio coding module.
Bug: webrtc:10739
Change-Id: I44e0305be7c84b253172511c2977b1d700e40c1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167067
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Chen Xing <chxg@google.com>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30363}
2020-01-23 16:06:12 +00:00
Ivo Creusen
cee751abff Reland "Enable using a custom NetEqFactory in simulations"
This is a reland of 2a11b2451a
There are no changes compared to the first attempt.

Original change's description:
> Enable using a custom NetEqFactory in simulations
>
> Bug: webrtc:11005
> Change-Id: I8a15f77953cbd3c29a75c7cfc77f926b138994b9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165580
> Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30286}

TBR=kwiberg

Bug: webrtc:11005
Change-Id: I4aa377e05916bd23f8f63aece9d0e27731c80d3e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166465
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30319}
2020-01-20 12:46:34 +00:00
Sandeep Siddhartha
3f0bc2c176 Revert "Enable using a custom NetEqFactory in simulations"
This reverts commit 2a11b2451a.

Reason for revert: Causes b/147826709

Original change's description:
> Enable using a custom NetEqFactory in simulations
> 
> Bug: webrtc:11005
> Change-Id: I8a15f77953cbd3c29a75c7cfc77f926b138994b9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165580
> Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30286}

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

Change-Id: I14a0bd6ad2a90f1686b8b1a78f18aea9325871fe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11005
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166403
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Sandeep Siddhartha <sansid@google.com>
Cr-Commit-Position: refs/heads/master@{#30288}
2020-01-16 22:56:21 +00:00
Ivo Creusen
2a11b2451a Enable using a custom NetEqFactory in simulations
Bug: webrtc:11005
Change-Id: I8a15f77953cbd3c29a75c7cfc77f926b138994b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165580
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30286}
2020-01-16 18:26:44 +00:00
Danil Chapovalov
64f1f3f04e Replace RTC_FALLTHROUGH with ABSL_FALLTHROUGH_INTENTED
Bug: None
Change-Id: I7287403f3fb13b8e30f92ca3cf1882b03bb53a6e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166176
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30283}
2020-01-16 15:20:35 +00:00
Jonas Olsson
b2b2031457 Concatenate string literals at compile time.
This CL was generated by running:
git ls-files | grep ".cc" | xargs perl -i -ne 'BEGIN {undef $/}; s/("[\s\n]*<<[\s\n]*")/" "/g; print;'; git cl format

After that I manually edited modules/audio_processing/gain_controller2.cc to preserve its original
formatting.

This primary benefit of this change is a small reduction in binary size.

Bug: None
Change-Id: I689fa7ba9c717c314bb167e5d592c3c4e0871e29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165961
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30251}
2020-01-14 14:47:48 +00:00
Jerome Humbert
3e3c551ac6 Suppress C5041 constexpr warning for MSVC 2019
Disable the C5041 warning which makes the build fail. This is a
C++17-only change and WebRTC doesn't support C++17 yet, so the code is
technically correct, but fails to build on MSVC 2019 and
warning-as-error active.

Also fix another warning-as-error build error with MSVC 2019 due to
ignoring the result of a [[nodiscard]] function.

No-Presubmit: True
Bug: webrtc:11275,webrtc:11276
Change-Id: I891a894ee87252f96e84fd8d282576f46907256f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165781
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30244}
2020-01-14 07:44:35 +00:00
Jakob Ivarsson
2ee15eb4fa Remove extra delay field trial.
Bug: webrtc:10817
Change-Id: I704a8ea0dc774f242f8d5d88b140f850cf23d518
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164539
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30182}
2020-01-08 14:39:27 +00:00
Jakob Ivarsson
bd5874accf Remove inter-arrival delay mode from DelayManager.
Also remove the delay peak detector which is no longer used.

This should be a no-op since relative arrival delay mode is used by default.

Bug: webrtc:10333
Change-Id: Ifa326b762d52f16f9dc5f3da2874139faf1022da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164462
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30179}
2020-01-08 13:20:36 +00:00
Niels Möller
0aa7e37363 Add include of <cstdlib>
Needed since opus_interface.cc uses the C functions calloc and free.

Bug: None
Change-Id: Iad30be533d7f6d8234c8e49efd461dc6ce0e2442
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164534
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30168}
2020-01-07 14:46:03 +00:00
Jerome Humbert
9338bbcd90 Replace assert() with RTC_DCHECK
Remove some uses of assert() breaking MSVC compiling, use RTC_DCHECK
instead.

Bug: webrtc:11201
Change-Id: Ie6c3607e422ea17d3393352b4915da3fa24779f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161949
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30081}
2019-12-13 10:06:07 +00:00
Sam Zackrisson
184da528a7 Fix ASAN bug in iSAC codec
There is a value missing in an array, causing indexing to sometimes be off by one.
The result is never used anyway, so the "solution" is to insert an extra zero at the end.

Details:

In an old refactoring CL, the corresponding array in the floating point version of iSAC is declared with 578 elements, the fixed point version has 577.
See WebRtcIsac_kQKltCodeLenShape:
https://webrtc-codereview.appspot.com/548004/patch/10002/11005
Perhaps the entire array was not carried over to fixed point.

However, the floating point version does not actually have 578 elements in its definition, it has 568. The remaining 10 elements are initialized to 0. So there is no value to use from there, and using a zero instead will mimic the behavior of the floating point code.


Use of the value:
WebRtcIsacfix_kCodeLenShapeQ11 is only accessed in one place [0].
The value sumQQ is set to is only used to compute the BitsQQ,
which is only used to populate the sizeQ11 param of EstCodeLpcCoef,
which is never used anywhere. Not within EstCodeLpcCoef, not within the calling function WebRtcIsacfix_EncodeLpc [1], not in the calling function's calling function [2]. Then it falls out of scope.

[0] https://cs.chromium.org/chromium/src/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c?l=1223&rcl=3c4fda2ed8140a330634c0a2704a3cf0311a89de
[1] https://cs.chromium.org/chromium/src/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c?l=1468&rcl=3c4fda2ed8140a330634c0a2704a3cf0311a89de
[2] https://cs.chromium.org/chromium/src/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/encode.c?l=214&rcl=3c4fda2ed8140a330634c0a2704a3cf0311a89de

Tested: Instructions in linked bug. No longer repro after applying this CL.
Bug: webrtc:10584
Change-Id: I87a90e8cf58d82f615217e05ea401d3259887769
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161942
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30065}
2019-12-11 15:59:14 +00:00
Henrik Lundin
21021f022b NetEq: Fix bug in PLC for multi-channel audio
There is currently a bug in NetEq that causes audio to leak from the
first channel to all others during loss concealment. This CL fixes the
problem and also adds a unit test to verify.

Bug: webrtc:11145
Change-Id: Ia6c4a234ff7f78e9a6080f1cb17eb80af671c3dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161091
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29974}
2019-12-02 17:44:58 +00:00
Ivo Creusen
39cf3c723e Clean up the NetEqFactory API.
This CL decouples NetEqFactory and AudioDecoderFactory.
AudioDecoderFactory is used in more places than just inside of NetEq, so
decoupling these makes sense.

Bug: webrtc:11005
Change-Id: I78dd856e4248e398e69a65816b062ef30555b055
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161005
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29961}
2019-11-29 14:04:44 +00:00
Alessio Bazzica
2d02c943b2 NetEQ: fix initial decoder frame length.
Bug: webrtc:10548
Change-Id: If020ce0e5bef57f4f783dbc47995fd0c9f7e2137
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161046
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29960}
2019-11-29 13:43:41 +00:00
Artem Titov
9dc209a23a Add ability to disable detailed error message in RTC_CHECKs
Bug: webrtc:11133
Change-Id: I989654f1fb97b476a17956d69ee374406439ea8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160653
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29952}
2019-11-28 17:51:00 +00:00
Ivo Creusen
68c6572980 Add a CreateNetEq method that takes an AudioDecoderFactory
The NetEqFactory is currently expected to wrap the AudioDecoderFactory,
but this turns out not to be a good idea. Instead, it makes more sense
to pass the AudioDecoderFactory through the CreateNetEq method.

Bug: webrtc:11005
Change-Id: I8027ff6593f40c92072e7e88157631dcf329a984
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160644
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29918}
2019-11-26 14:43:49 +00:00
Alessio Bazzica
a88655daf9 NetEQ RTP play: textlog to stderr as option
Bug: webrtc:10548
Change-Id: I260b6c63621c61e33fcc38fd0a39cfb0dba3bc20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160413
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29915}
2019-11-26 11:50:54 +00:00
Henrik Lundin
80b2806250 Fixing a buffer overflow in Merge::Downsample
In the unlikely event that the decoded audio is really short, the
downsampling would read outside of the decoded audio vector. This CL
fixes that, and adds a unit test that verifies the fix (when running
with ASan).

Bug: chromium:1016506
Change-Id: Ifb8071ce0550111cd66e7f7c1bed7f17b33f93c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160304
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29898}
2019-11-25 12:16:30 +00:00
Henrik Lundin
e835fc01b1 Add UMA counter for audio interruptions
The metric is added to Chromium histograms in
https://chromium-review.googlesource.com/c/chromium/src/+/1925066.

Bug: webrtc:10549
Change-Id: I2bf98f469547aa8621832fc4f8bd29c4805ac0b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160045
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29854}
2019-11-21 11:40:21 +00:00
Per Åhgren
4dd56a3830 ACM: Adding unittests for the remixing functionality
On top of adding unittests for the remixing, the CL
moves the code tested to a separate file in order
to allow it to be tested.

Bug: webrtc:11007
Change-Id: I531736517bbcc715b3c1bf3a4256c42208c5b778
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155740
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29839}
2019-11-20 06:20:22 +00:00
Minyue Li
332274dfef Adding GetInDtx to WebRTC Opus Interface.
Bug: webrtc:11085
Change-Id: Ie9152cbe3f3c70f6febafb877852d68a831bcae9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159708
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29834}
2019-11-19 14:14:06 +00:00
Henrik Lundin
fe047757d6 Fix a bug in interruption metrics
The reported audio interruption metrics are too high. If GetAudio
calls start before the first packets are arriving, and the sample rate
of the encoded audio is different from the one used to initialize
NetEq (default 16 kHz), the initial silent period of GetAudio calls
will be reported as an interruption.

Modifying a unit test to trigger the bug, and make sure it won't come
back.

Bug: webrtc:11094, b/144567257
Change-Id: Id540422cb7f35d3bef68b9e7c03c6e7c8bdb8d97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159980
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29831}
2019-11-19 12:58:50 +00:00
Per Åhgren
bb55c5e2ec Correct the upmixing of mono to stereo in ACM2
This CL is a correction to the former CL that changed the remixing for
surround. A bug in that CL caused the upmixing from mono to stereo to
place zeros in the right channel.

The unittest CL is present in https://webrtc-review.googlesource.com/c/src/+/155740

Bug: b/144458371
Change-Id: I192e587a1b083a7bb55dcac2343f8b6d3942b9ed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159864
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29805}
2019-11-15 16:07:30 +00:00
Per Åhgren
048b10a9ec Correcting the ACM upmixing from mono/stereo to surround
This CL corrects the upmixing from mono/stereo to surround in the audio
coding module.


Bug: webrtc:11083
Change-Id: Ic529107d59ff54a8e48b0424cbdf2b49b7a65c12
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159705
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29792}
2019-11-13 15:23:19 +00:00
Yves Gerey
3a65f392a3 Expose NetEqDecodingTest for re-use in chromium tests.
This CL allows to trigger related tests when rolling opus
(at chromium side). Namely:
* TestOpusBitExactness
* TestOpusDtxBitExactness

This CL also prevents name clash for OpusTest:
* modules/audio_coding/test/opus_test.h: Helper class.
* modules/audio_coding/neteq/opus_unittest.cc: Local test fixture.

Bug: chromium:1002973
Change-Id: If8470b5f64fbdb1f7a84b838bde62d8c90390f2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159033
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29759}
2019-11-11 17:45:46 +00:00
Minyue Li
8e83c7ac09 Make Opus PLC always output 10ms audio.
BUG: b/143582588
Change-Id: I41ad5f4f91d9af3f595666a8f32b7ab5382605bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158672
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29733}
2019-11-07 21:15:58 +00:00
Yves Gerey
82976bbdc2 Expose OpusTest class for re-use as chromium test.
This CL allows to trigger related tests when rolling opus
(at chromium side).

Bug: chromium:1002973
Change-Id: I811d17233367cabc8b4aa8ab5bbf3e92359afbce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158887
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29716}
2019-11-06 20:52:35 +00:00
Sergey Silkin
bd826152dd Suppress noisy logging from opus encoder.
Bug: none
Change-Id: Icc3d61f9dfe2582f8ae5de37de7ea148d272876c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158897
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29706}
2019-11-06 12:33:53 +00:00
Ivo Creusen
ca585bb457 Make some DecisionLogic functions virtual.
Bug: webrtc:11005
Change-Id: I86d1eadc85162abf77010d97917e5ab20f644d66
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158783
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29684}
2019-11-04 16:29:17 +00:00
Björn Terelius
a06048a41e Return status instead of CHECKing in event log parser.
This CL adds ParseStatus/ParseStatusOr classes and returns those instead
of CHECKing that the log is well formed. Some refactoring was required.

We also add a allow_incomplete_logs parameter to the parser which by
default is false. Setting it to true will make the parser log a warning
but return success for errors that typically indicate that the log has
been truncated. "Deeper" errors indicating log corruption still return
an error.

Bug: webrtc:11064
Change-Id: Id5bd6e321de07e250662ae3aaa5ef15f48db6d55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158746
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29679}
2019-11-04 12:42:57 +00:00
Ivo Creusen
c3d1f9b0cd Enable injection of a custom NetEqFactory into PeerConnectionFactory.
Injecting both a custom NetEqFactory and an AudioDecoderFactory is not
supported, in that case the AudioDecoderFactory should be wrapped inside
the NetEqFactory.

Bug: webrtc:11005
Change-Id: I4e311eb1bfa03c91bca587d70540e81829f881c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158720
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29673}
2019-11-01 11:30:36 +00:00
Ivo Creusen
3ce44a3540 Move NetEq headers to api/
This CL also introduces NetEqFactory and NetEqControllerFactory
interfaces, as well as several convenience classes for working with
them: DefaultNetEqFactory, DefaultNetEqControllerFactory and
CustomNetEqFactory.

Bug: webrtc:11005
Change-Id: I1e8fc5154636ac2aad1a856828f80a2a758ad392
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156945
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29671}
2019-10-31 15:43:59 +00:00
Sebastian Jansson
cd2a92f8e0 Removes RPLR based FEC controller.
This is not used and adds a lot of maintenance overhead to
the code since it requires that the transport feedback adapter
communicates directly with audio send stream.

This also means that the packet loss tracker used as input for
this can be removed and a lot of wiring up code overall.

Bug: webrtc:9883
Change-Id: I25689fb622ed89cbb378c27212a159485f5f53be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156502
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29667}
2019-10-31 13:56:44 +00:00
Minyue Li
fb075d558d Removing unused Opus wrapper API: WebRTCOpus_DecodePlc.
Bug: None
Change-Id: I5b613b4c13ec5f6ad13d8430043d006f6d83c11f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158671
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29664}
2019-10-31 12:01:31 +00:00
Minyue Li
54d027843a Renaming opus_interface.c to opus_interface.cc.
This is to allow advanced features of WebRTC/Chrome e.g., field trials.

More style compliant changes may follow up. Only a minimal (not in terms of line changes) is applied, so that presubmit does not complain. These changes include

1. removing unused headers.
2. eliminating c-style casting.

Bug: b/143582588
Change-Id: I6d0fd926c542ab0afdc38cc4bf03aaf584ec13dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158670
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29657}
2019-10-30 15:48:28 +00:00
Ivo Creusen
79e653c46d Apply bitrate boosting depending on field-trial.
This field-trial allows us to provide multipliers for the opus target
bitrate.

Bug: webrtc:11055
Change-Id: I79c4c6389c6908daadda355e5ce0668413d0aaa1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158530
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29634}
2019-10-28 17:05:30 +00:00
Ivo Creusen
53a31f7db8 Introduce injectable NetEqController interface.
This interface is implemented by the DecisionLogic class, which now contains the DelayManager and DelayPeakDetector.

Bug: webrtc:11005
Change-Id: I4fb69fa359e60831cf153e41f101d5b623749380
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155176
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29613}
2019-10-25 11:36:41 +00:00
Minyue Li
1272dade56 Reduce log level of Opus bitrate.
Bug: None
Change-Id: Iab815dbbc12bf1ca2c1cc87acb0765e2ccade591
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157895
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29570}
2019-10-22 12:02:09 +00:00
Jakob Ivarsson
42b6e2d9eb Change failing rtc::dchecked_cast to rtc::saturated_cast.
Bug: chromium:1016147
Change-Id: I57106299694c379b112ca2dec95571fb82b4459c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157900
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29556}
2019-10-21 12:06:52 +00:00
Mirko Bonadei
3663ed3ad6 Move rtc_base/ignore_wundef.h to its own target.
Since rtc_base/ignore_wundef.h doesn't have any dependency, it is easy to
move it to its own target and allow its dependant to avoid to take a
dependency rtc_base:on rtc_base_approved.

Bug: webrtc:9419
Change-Id: I17f205b0cb2b21cad388b04e60082df9398dffdf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157428
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29548}
2019-10-19 10:50:36 +00:00
Mirko Bonadei
86d053c2db Use source_sets in component builds and static_library in release builds.
Static libraries don't guarantee that an exported symbol gets linked
into a shared library (and in order to support Chromium's component
build mode, WebRTC needs to be linked as a shared library).

Source sets always pass all the object files to the linker.

On the flip side, source_sets link more object files in release builds
and to avoid this, this CL introduces a the GN template "rtc_library" that
expands to static_library during release builds and to source_set during
component builds.

See: https://gn.googlesource.com/gn/+/master/docs/reference.md#func_source_set

Bug: webrtc:9419
Change-Id: I4667e820c2b3fcec417becbd2034acc13e4f04fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157168
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29525}
2019-10-17 21:17:18 +00:00
Karl Wiberg
4b64411406 NetEqImpl::GetDecoderFormat: Return RTP clockrate, not codec sample rate
Well, in fact we need to return both. But return codec sample rate
separately and let the SdpAudioFormat contain the RTP clockrate,
otherwise we're essentially lying to our callers.

Bug: webrtc:11028
Change-Id: I40f36cb9db6b9824404ade6b0515a8312ff97009
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156307
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29444}
2019-10-11 08:34:53 +00:00
Karl Wiberg
45eb135832 Remove the unused receive_timestamp arg to NetEq::InsertPacket
The implementation just ignores the provided timestamp, and gets the
time from the current clock instead.

Bug: webrtc:11028
Change-Id: I7a1fee36bef862c68d8f15fd19ee53b2bbb25892
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156164
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29434}
2019-10-10 13:34:30 +00:00
Ivo Creusen
99a2096248 Added support for skipping get_audio events, adding dummy packets and setting a field trial string.
Bug: webrtc:10337
Change-Id: I0507da4d955daa914af774c946be16a4168be21a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150780
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29392}
2019-10-07 12:26:44 +00:00
Per Åhgren
4f2e9406c9 ACM: Adding support for more than 2 channels in the send pipeline
This CL adds support in the audio coding module for sending more than
2 channels to the encoder.

Bug: webrtc:11007
Change-Id: I0909b5c37a54c9d2e1353b864e55008cda50ffae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155583
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29385}
2019-10-04 14:38:59 +00:00
Sebastian Jansson
62aee9379c Adds trial to calculate audio overhead based on available data.
This adds the ability to disable legacy overhead calculation so we'll
use the available data on per packet over head and frame length range
to set the min and max total  allocatable bitrate.

Bug: webrtc:11001
Change-Id: I2a94499433e15bad11a08f81fe7f1dfc27982cdf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155175
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29368}
2019-10-02 13:42:15 +00:00
Sebastian Jansson
f34116e356 Replacing bandwidth adaptation trial with stable target in Opus encoder.
This also means that the NetworkEstimate::bandwidth can be deprecated
as it's currently just a copy of the target_rate.

Bug: webrtc:10981
Change-Id: I1bc57b98480bd77ce052736b19d630c775428546
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153669
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29288}
2019-09-24 16:35:02 +00:00
Jakob Ivarsson
74344d2aa6 Support 2 byte payload size DTX packets in NetEq simulation.
Bug: none
Change-Id: I785f13555c650171e94e400cf15123e8cc17de22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154350
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29286}
2019-09-24 15:18:05 +00:00
Niels Möller
ef14f072a9 Delete AudioDecoder method IncomingPacket
Only the ISAC codec had an non-trivial implementation, for its unused
adaptive mode. This cl deletes that implementation, and the call
from NetEq, and the interface method.

Bug: webrtc:10098
Change-Id: Iaf7667e0ae867fc9d64286dff4c01a8ce0b6e2a4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153882
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29279}
2019-09-24 08:30:24 +00:00
Niels Möller
834a554962 Include module_common_types.h only where needed
Bug: None
Change-Id: I73d493f8f186b429c7be808f4dfac0398f150931
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153891
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29277}
2019-09-24 08:22:38 +00:00
Niels Möller
544dfb5a97 Delete isac GetBandwidthInfo/SetBandwidthInfo
Bug: webrtc:10098
Change-Id: I4a56cdc6d081b15a1fc52cba2051783daf4e5ae3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153881
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29256}
2019-09-20 13:53:52 +00:00
Niels Möller
48b32b748e Delete support for enabling adaptive isac mode
This appears unused. If deleted, other code related to isac bandwidth
estimation becomes unused and may be deleted in followup cls.

Bug: webrtc:10098
Change-Id: Ifeac2e90de895b12c337ea28cc33704350b9abf4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153667
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29252}
2019-09-20 10:41:09 +00:00
Niels Möller
e0b31677b6 Delete dead code inside #ifdef WEBRTC_ISAC_FIX_NB_CALLS_ENABLED
Bug: None
Change-Id: If31f2a5e4a2536b3c7fda596f2c251e8074a18d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153671
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29249}
2019-09-20 07:40:10 +00:00
Niels Möller
6a092637f0 Delete obsolete isac "assign" api
Bug: None
Change-Id: I116e3f4b89e2c1e1f0d06e2ff5d58d2a50e2aadb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153665
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29239}
2019-09-19 13:26:26 +00:00
Mirko Bonadei
317a1f09ed Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
2019-09-17 15:47:29 +00:00
Ruslan Burakov
aa5a75d5e3 Embed Deceleration Target Level Offset Field Trial.
Bug: webrtc:10619
Change-Id: I4ef75ae03d6071bf84d2c1b6e50290ea26e83496
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152663
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29169}
2019-09-12 14:55:13 +00:00
Danil Chapovalov
16cb1f61c0 Stop using rtc_event.h forward header
Bug: webrtc:10206
Change-Id: I16905ec745673178195d6715fda6175c31500163
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151601
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29149}
2019-09-11 08:20:29 +00:00
Jakob Ivarsson
507f43465b Reland "Make relative arrival delay mode default in NetEq delay manager."
This is a reland of 77c71d1488

Original change's description:
> Make relative arrival delay mode default in NetEq delay manager.
> 
> Bug: webrtc:10333
> Change-Id: I9b1e0bec0b1813cf31259492f83eb2ca86a44d3f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150782
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29075}

Bug: webrtc:10333
Change-Id: I9c726cec1afc1147a4618fc224404a83962e6ae2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152281
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29136}
2019-09-10 14:05:48 +00:00
henrika
3354157d36 Add support for 192kHz input audio sample rate.
The existing restriction of max 48k seems old and outdated. I am unable to
see any issues by simply extending the support to 96 and utilize the existing
resampler in WebRTC. There are no memory limitations involved either.

It is a rather common case today in Chrome that users need 96k/192k input; hence this
simple change will have a positive impact for many WebRTC clients using gUM.

Bug: webrtc:10958
Test: https://webrtc.github.io/samples/src/content/peerconnection/audio/ using mic @96k
Change-Id: I8123da886ef7d48cbec9482795ec837ec1f61d81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152162
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29135}
2019-09-10 13:01:58 +00:00
Yves Gerey
75e2290af2 Rollback to strict audio codec tests for libopus on android (neon).
This a revert of the manual accommodation done in [1].
The lenient tests are no longer needed since a proper libopus fix [2]
has been rolled in [3].

[1] https://webrtc-review.googlesource.com/c/src/+/148700
[2] https://chromium-review.googlesource.com/c/chromium/src/+/1785648
[3] https://webrtc-review.googlesource.com/c/src/+/151721/

Bug: webrtc:9995, chromium:986727
Change-Id: I7f64a45ccbe2c4d985ba663cf77c6fa0efebd528
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151781
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#29089}
2019-09-06 07:48:28 +00:00
Alessio Bazzica
5b728cca77 Revert "Make relative arrival delay mode default in NetEq delay manager."
This reverts commit 77c71d1488.

Reason for revert: breaking downstream projects

Original change's description:
> Make relative arrival delay mode default in NetEq delay manager.
> 
> Bug: webrtc:10333
> Change-Id: I9b1e0bec0b1813cf31259492f83eb2ca86a44d3f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150782
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29075}

TBR=henrik.lundin@webrtc.org,srte@webrtc.org,minyue@webrtc.org,jakobi@webrtc.org

Change-Id: I67c5b9c7a6e854d3aac379aa4d98bfeb5425d312
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10333
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151642
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29078}
2019-09-05 11:59:53 +00:00
Jakob Ivarsson
77c71d1488 Make relative arrival delay mode default in NetEq delay manager.
Bug: webrtc:10333
Change-Id: I9b1e0bec0b1813cf31259492f83eb2ca86a44d3f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150782
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29075}
2019-09-05 09:15:47 +00:00
Niels Möller
32472449f1 Delete unused method AudioCodingModule::GetDecodingCallStatistics
Bug: None
Change-Id: I2804e241251d2faa421169085cd3f63972cc395f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151123
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29060}
2019-09-04 10:08:16 +00:00
Jakob Ivarsson
65024d9620 Remove clock drift metric from NetEq.
This metric is not used anywhere and is not calculated correctly when the delay manager is in relative arrival delay mode.

Bug: webrtc:10333
Change-Id: Iac79ab40b79b17802ad9d626c130e82f761bae26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150786
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29037}
2019-09-02 13:50:55 +00:00
Tommi
25eb47ccf1 Make the RtpHeaderParserImpl available to tests and tools only.
There are a few reasons for making this test only:
* The code is only used by tests and utilities.
* The pure interface has only a single implementation so an interface isn't really needed.
  (a followup change could remove it altogether)
* The implementation always incorporates locking regardless of how the class gets used.
  See e.g. previous use in the Packet class.
* The implementation is a layer on top of RtpUtility::RtpHeaderParser which is
  sufficient for most production cases.

Change-Id: Ide6d50567cf8ae5127a2eb04cceeb10cf317ec36
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150658
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29010}
2019-08-29 15:56:40 +00:00
Jakob Ivarsson
a2479f7dc4 Remove minimum bucket returned by histogram quantile function.
This fixes a bug in delay manager relative arrival delay mode that caused the effective minimum target level to be 2 packets instead of 1.

Bug: webrtc:10333
Change-Id: I33d32c8da692a3db22179edb923873d307f740fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150785
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29002}
2019-08-29 11:45:38 +00:00
Jakob Ivarsson
74154e65e8 Save delays in history for 2 seconds instead of fixed 100 packets.
Storing a fixed amount of packets does not work well with DTX since the history could include up to 20 seconds of packets which can potentially be negative in the event of clock drift or delay shifts.

Bug: webrtc:10333
Change-Id: Ifb8543b7e999e17845cb0e4171066862941f370e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149832
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28942}
2019-08-22 16:33:33 +00:00
Mirko Bonadei
2dac4e4e35 Remove rtc_use_lto GN arg.
This CL is a no-op since rtc_use_lto is always false and in general
such change should probably be implemented in
//build/config/compiler/BUILD.gn.

Bug: chromium:408997
Change-Id: Id37d3181e66e699f8cd535aee1af7609352a7259
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149833
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28919}
2019-08-20 14:00:49 +00:00
Niels Möller
5ceb4ac5ed Delete some unused AudioCodingModule methods
Methods deleted:

  ReceiveFrequency, PlayoutFrequency, ReceiveCodec,
  SetMinimumPlayoutDelay, SetMaximumPlayoutDelay,
  SetBaseMinimumPlayoutDelayMs, GetBaseMinimumPlayoutDelayMs,
  PlayoutTimestamp, FilteredCurrentDelayMs, TargetDelayMs.

Became unused with cl
https://webrtc-review.googlesource.com/c/src/+/111504

Bug: None
Change-Id: Ie50e8e86a622661c3daa9db83a2e66489dcd2d98
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148071
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28918}
2019-08-20 13:42:36 +00:00
Ying Wang
0e1a558fb3 Allowing 40ms audio frame length.
Currently 20ms, 60ms and 120ms frame length are supported. The motivation is to better adapt audio bit rate to network conditions with more frame length choices.

This is continuation of https://webrtc-review.googlesource.com/c/src/+/146206, since crodbro is out of office, I created this commit for continuing the code review.

Bug: webrtc:10820
Change-Id: I0e35e91b524f63686bfdf767b7a95c51aeb24716
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146780
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28882}
2019-08-16 20:24:18 +00:00
Minyue Li
9b29d69650 Make ANA frame length controller more robust to encoder frame lengths.
Bug: webrtc:10820
Change-Id: Ic3a30976d0181de9cdd35e44d4c5439cadad4812
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149163
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28873}
2019-08-16 10:55:39 +00:00
Minyue Li
c759f832e9 Avoid copying of vectors in RtpPacketInfos.
Bug: chromium:982260
Change-Id: Ia4dab497b662e825f80c16530cdf615b62f0a5c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148523
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#28859}
2019-08-14 15:46:02 +00:00
Jiawei Ou
608e6ba394 Add AudioDecoderIsacT::Config to include sampling rate and BWInfo object
This CL will make AudioDecoderIsacT symmetrical to AudioEncoderIsacT.

Bug: webrtc:10826
Change-Id: I78d1cf7bc2245bf4a282aabd81c8ece6ca23f285
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146683
Commit-Queue: Jiawei Ou <ouj@fb.com>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28847}
2019-08-14 00:40:19 +00:00
Yves Gerey
110a4de4e2 Roll chromium_revision 8f0166a59b..f0fd984a31 (685582:685691)
!! **Manual change** Less strict audio codec tests to accommodate opus fix [1].
!! This is meant to be a temporary mitigation.
[1] https://chromium-review.googlesource.com/c/chromium/src/+/1746617

Change log: 8f0166a59b..f0fd984a31
Full diff: 8f0166a59b..f0fd984a31

Changed dependencies
* src/base: 17d8ac209c..f6cc884505
* src/build: d6837de8f1..956965a6ea
* src/ios: 76e0b0bc60..6780db9c3e
* src/testing: 5d328647a1..48823ed18a
* src/third_party: d70201c684..82063e79f0
* src/third_party/depot_tools: 1b4c7e9f38..6d98232fde
* src/tools: b8953a5bf5..2aa12eadc5
DEPS diff: 8f0166a59b..f0fd984a31/DEPS

No update to Clang.

TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com,
BUG=None

Change-Id: I9869cc3f493bc82361e4f93ad846b32390edb340
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148700
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28833}
2019-08-12 15:53:01 +00:00
Niels Möller
dc5ed5c023 Delete NACK-related methods from AudioCodingModule
Unused since cl https://webrtc-review.googlesource.com/c/src/+/111504

Bug: None
Change-Id: I210f9c286961a2aec73c7e5c4cf8d04160f5a190
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148076
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28827}
2019-08-12 09:41:10 +00:00
Jakob Ivarsson
81df62b456 Add field trial to introduce extra delay after target level calculation.
Bug: webrtc:10817
Change-Id: Id9eced821df2859b2cb7174062b6f5e29e145f62
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145902
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28825}
2019-08-12 08:55:23 +00:00
Niels Möller
b90d38a978 Delete unused Opus-specific methods of AudioCodingModule
Bug: None
Change-Id: Ib191e4beadf85cd57e765bc52d305e274e50a473
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148400
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28815}
2019-08-09 07:06:36 +00:00
Alex Narest
5b5d97c938 Reland of "Reporting of decoding_codec_plc events""
This is a reland of 0a88ea050c.

The new stat will not be reported unless it is GT 0.

Reporting of decoding_codec_plc events

Bug: webrtc:10838
Change-Id: Ic8585b4eeae9a2643374f15bc2578d1141e59683
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148448
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Alex Narest <alexnarest@google.com>
Cr-Commit-Position: refs/heads/master@{#28797}
2019-08-07 18:41:46 +00:00
Oleh Prypin
b1686786e8 Add RTC_ prefix to non-standard format specifier macro "PRIdNS"
Some of the macros in format_macros.h follow the C standard and try to fill holes in it (on Windows). But this one has no direct equivalent in the standard and is just mimicking the naming convention. That's not nice.

References:
https://devblogs.microsoft.com/cppblog/c99-library-support-in-visual-studio-2013/
https://stackoverflow.com/a/2524673

Change-Id: I53f3faca2976a5b5d4b04a67ffb56ae0f4e930b2
Bug: webrtc:10852
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147862
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28794}
2019-08-07 13:36:05 +00:00
Danil Chapovalov
83bbe91398 Delete deprecated rtc_event_log header
Bug: webrtc:10206
Change-Id: I9ed3148843c647372993729b87c0e74741ab540b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147870
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28791}
2019-08-07 10:58:17 +00:00
Chen Xing
e08648dc70 Add AbsoluteCaptureTime to RtpPacketInfo.
This change stores the optional `AbsoluteCaptureTime` header extension in `RtpPacketInfo` so that we later can consume it in `SourceTracker`.

Bug: webrtc:10739
Change-Id: I975e8863117fcda134535cd49ad71079a7ff38ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148068
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#28790}
2019-08-07 10:12:56 +00:00
Niels Möller
75caef7a4b Delete unused ACM members isac_decoder_16k_ and isac_decoder_32k_
Unused since https://webrtc-review.googlesource.com/c/103821.

Bug: webrtc:8396
Change-Id: Ia83f02f16d6ea8c260ea765b41506f2691e035bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148072
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28788}
2019-08-07 09:53:22 +00:00
Niels Möller
c653172e74 Delete obsolete method AudioCodingModule::SetBitRate
Bug: None
Change-Id: I2291f7b4b46d269592eacad67a126010b750fac2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148079
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28784}
2019-08-07 08:37:25 +00:00
Niels Möller
ed44f5464a In ChannelReceive, use AcmReceiver directly, not AudioCodingModule
Bug: webrtc:9801
Change-Id: I02d76bc89c363247c8dc782db316a9f87a2b93ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/111504
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28766}
2019-08-06 08:23:26 +00:00
Mirko Bonadei
bedb7a8aea Revert "Reporting of decoding_codec_plc events"
This reverts commit 0a88ea050c.

Reason for revert: This CL breaks Chromium's FYI bots (example: https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Linux%20Tester/4033).

Original change's description:
> Reporting of decoding_codec_plc events
> 
> Change-Id: Id71b37244bc98bffaf25131a519127b3d2b86a8f
> 
> Bug: webrtc:10838
> Change-Id: Id71b37244bc98bffaf25131a519127b3d2b86a8f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147263
> Commit-Queue: Alex Narest <alexnarest@google.com>
> Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28700}

TBR=mflodman@webrtc.org,alexnarest@google.com

Change-Id: I5e5dd29ee375ba422f79932d4b8c3fd028a53db4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10838
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147269
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28707}
2019-07-30 14:39:09 +00:00
Alex Narest
0a88ea050c Reporting of decoding_codec_plc events
Change-Id: Id71b37244bc98bffaf25131a519127b3d2b86a8f

Bug: webrtc:10838
Change-Id: Id71b37244bc98bffaf25131a519127b3d2b86a8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147263
Commit-Queue: Alex Narest <alexnarest@google.com>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28700}
2019-07-29 16:40:23 +00:00
Mirko Bonadei
b79f564b53 Switch neteq_rtpplay into an executable.
Bug: None
Change-Id: Iecfe4f59336081583850ebcef9e115821a3f27f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146715
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28677}
2019-07-25 08:45:21 +00:00
Alessio Bazzica
8f319a3472 Reland "Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.""
This reverts commit fab3460a82.

Reason for revert: fix downstream instead

Original change's description:
> Revert "Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.""
> 
> This reverts commit 9973933d2e.
> 
> Reason for revert: breaking downstream projects and not reviewed by direct owners
> 
> Original change's description:
> > Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
> > 
> > This reverts commit 24192c267a.
> > 
> > Reason for revert: Analyzed the performance regression in more detail.
> > 
> > Most of the regression comes from the extra RtpPacketInfos-related memory allocations in every `NetEq::GetAudio()` call. Commit 1796a820f6 has removed roughly 2/3rds of the extra allocations from the impacted perf tests. Remaining perf impact is expected to be about "8 microseconds of CPU time per second" on the Linux benchmarking machines and "15 us per second" on Windows/Mac.
> > 
> > There are options to optimize further but they are unlikely worth doing. Note for example that `NetEqPerformanceTest` uses the PCM codec while the real-world use cases would likely use the much heavier Opus codec. The numbers from `OpusSpeedTest` and `NetEqPerformanceTest` suggest that Opus decoding is about 10x as expensive as NetEq overall.
> > 
> > Original change's description:
> > > Revert "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
> > >
> > > This reverts commit 3e8ef940fe.
> > >
> > > Reason for revert: This CL causes a performance regression in NetEq, see https://bugs.chromium.org/p/chromium/issues/detail?id=982260.
> > >
> > > Original change's description:
> > > > Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
> > > >
> > > > This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.
> > > >
> > > > Bug: webrtc:10668
> > > > Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
> > > > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > > > Reviewed-by: Minyue Li <minyue@webrtc.org>
> > > > Commit-Queue: Chen Xing <chxg@google.com>
> > > > Cr-Commit-Position: refs/heads/master@{#28434}
> > >
> > > TBR=kwiberg@webrtc.org,stefan@webrtc.org,minyue@webrtc.org,chxg@google.com
> > >
> > > Bug: webrtc:10668, chromium:982260
> > > Change-Id: I5e2cfde78c59d1123e21869564d76ed3f6193a5c
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145339
> > > Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> > > Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#28561}
> > 
> > TBR=kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com
> > 
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> > 
> > Bug: webrtc:10668, chromium:982260
> > Change-Id: Ie375a0b327ee368317bf3a04b2f1415c3a974470
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146707
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Commit-Queue: Chen Xing <chxg@google.com>
> > Cr-Commit-Position: refs/heads/master@{#28664}
> 
> TBR=kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com
> 
> Change-Id: I652cb0814d83b514d3bee34e65ca3bb693099b22
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10668, chromium:982260
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146712
> Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28671}

TBR=alessiob@webrtc.org,kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com

Change-Id: Id43b7b3da79b4f48004b41767482bae1c1fa1e16
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10668, chromium:982260
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146713
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28672}
2019-07-24 16:47:13 +00:00
Alessio Bazzica
fab3460a82 Revert "Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.""
This reverts commit 9973933d2e.

Reason for revert: breaking downstream projects and not reviewed by direct owners

Original change's description:
> Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
> 
> This reverts commit 24192c267a.
> 
> Reason for revert: Analyzed the performance regression in more detail.
> 
> Most of the regression comes from the extra RtpPacketInfos-related memory allocations in every `NetEq::GetAudio()` call. Commit 1796a820f6 has removed roughly 2/3rds of the extra allocations from the impacted perf tests. Remaining perf impact is expected to be about "8 microseconds of CPU time per second" on the Linux benchmarking machines and "15 us per second" on Windows/Mac.
> 
> There are options to optimize further but they are unlikely worth doing. Note for example that `NetEqPerformanceTest` uses the PCM codec while the real-world use cases would likely use the much heavier Opus codec. The numbers from `OpusSpeedTest` and `NetEqPerformanceTest` suggest that Opus decoding is about 10x as expensive as NetEq overall.
> 
> Original change's description:
> > Revert "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
> >
> > This reverts commit 3e8ef940fe.
> >
> > Reason for revert: This CL causes a performance regression in NetEq, see https://bugs.chromium.org/p/chromium/issues/detail?id=982260.
> >
> > Original change's description:
> > > Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
> > >
> > > This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.
> > >
> > > Bug: webrtc:10668
> > > Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
> > > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > > Reviewed-by: Minyue Li <minyue@webrtc.org>
> > > Commit-Queue: Chen Xing <chxg@google.com>
> > > Cr-Commit-Position: refs/heads/master@{#28434}
> >
> > TBR=kwiberg@webrtc.org,stefan@webrtc.org,minyue@webrtc.org,chxg@google.com
> >
> > Bug: webrtc:10668, chromium:982260
> > Change-Id: I5e2cfde78c59d1123e21869564d76ed3f6193a5c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145339
> > Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> > Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28561}
> 
> TBR=kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: webrtc:10668, chromium:982260
> Change-Id: Ie375a0b327ee368317bf3a04b2f1415c3a974470
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146707
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Chen Xing <chxg@google.com>
> Cr-Commit-Position: refs/heads/master@{#28664}

TBR=kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com

Change-Id: I652cb0814d83b514d3bee34e65ca3bb693099b22
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10668, chromium:982260
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146712
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28671}
2019-07-24 16:41:13 +00:00
Chen Xing
9973933d2e Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
This reverts commit 24192c267a.

Reason for revert: Analyzed the performance regression in more detail.

Most of the regression comes from the extra RtpPacketInfos-related memory allocations in every `NetEq::GetAudio()` call. Commit 1796a820f6 has removed roughly 2/3rds of the extra allocations from the impacted perf tests. Remaining perf impact is expected to be about "8 microseconds of CPU time per second" on the Linux benchmarking machines and "15 us per second" on Windows/Mac.

There are options to optimize further but they are unlikely worth doing. Note for example that `NetEqPerformanceTest` uses the PCM codec while the real-world use cases would likely use the much heavier Opus codec. The numbers from `OpusSpeedTest` and `NetEqPerformanceTest` suggest that Opus decoding is about 10x as expensive as NetEq overall.

Original change's description:
> Revert "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
>
> This reverts commit 3e8ef940fe.
>
> Reason for revert: This CL causes a performance regression in NetEq, see https://bugs.chromium.org/p/chromium/issues/detail?id=982260.
>
> Original change's description:
> > Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
> >
> > This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.
> >
> > Bug: webrtc:10668
> > Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Reviewed-by: Minyue Li <minyue@webrtc.org>
> > Commit-Queue: Chen Xing <chxg@google.com>
> > Cr-Commit-Position: refs/heads/master@{#28434}
>
> TBR=kwiberg@webrtc.org,stefan@webrtc.org,minyue@webrtc.org,chxg@google.com
>
> Bug: webrtc:10668, chromium:982260
> Change-Id: I5e2cfde78c59d1123e21869564d76ed3f6193a5c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145339
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28561}

TBR=kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com

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

Bug: webrtc:10668, chromium:982260
Change-Id: Ie375a0b327ee368317bf3a04b2f1415c3a974470
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146707
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#28664}
2019-07-24 14:15:28 +00:00
Mirko Bonadei
6982f6091b Remove empty OWNERS file.
No-Try: True
Bug: None
Change-Id: Ief114d10198c0b5871bd431c79c78eb5e36f35d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146541
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28630}
2019-07-22 11:55:23 +00:00
Mirko Bonadei
e9ff992fd6 Fix isac_fix_test perf reporting.
The regression has been introduced by [1] and here is an example of
the problem [2].

[1] - https://webrtc.googlesource.com/src/+/2ab97f6f8e27b47c0d9beeb8b6ca5387bda9f55c
[2] - https://ci.chromium.org/p/webrtc/builders/perf/Perf%20Linux%20Trusty/1543

TBR=minyue@webrtc.org

Bug: webrtc:10616
Change-Id: I109b55a612d49981ce74c3e4cd50603ee0003250
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146540
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28627}
2019-07-22 07:24:07 +00:00
Mirko Bonadei
2ab97f6f8e Migrate WebRTC test infra to ABSL_FLAG.
This is the last CL required to migrate WebRTC to ABSL_FLAG, rtc::Flag
will be removed soon after this one lands.

Bug: webrtc:10616
Change-Id: I2807cec39e28a2737d2c49e2dc23f2a6f98d08f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145727
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28606}
2019-07-19 06:54:04 +00:00
Yves Gerey
bb80c1347c Guard against clang-format wrong behavior.
Prevent clang-format to touch these two files,
as the result doesn't honor ColumnLimit setting.

Bug: webrtc:9340
Change-Id: I9b692a82df5385fa2d1216d915898439234b34b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145720
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#28577}
2019-07-16 12:18:32 +00:00
Ivo Creusen
24192c267a Revert "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
This reverts commit 3e8ef940fe.

Reason for revert: This CL causes a performance regression in NetEq, see https://bugs.chromium.org/p/chromium/issues/detail?id=982260.

Original change's description:
> Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
>
> This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.
>
> Bug: webrtc:10668
> Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Commit-Queue: Chen Xing <chxg@google.com>
> Cr-Commit-Position: refs/heads/master@{#28434}

TBR=kwiberg@webrtc.org,stefan@webrtc.org,minyue@webrtc.org,chxg@google.com

Bug: webrtc:10668, chromium:982260
Change-Id: I5e2cfde78c59d1123e21869564d76ed3f6193a5c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145339
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28561}
2019-07-12 16:18:31 +00:00
Ruslan Burakov
ca5f21e293 Make force_fieldtrials persistent string during entire program live.
absl::GetFlag creates temporary string which is destroyed
and c_str() points to wrong/empty place.

Bug: webrtc:10616
Change-Id: Ie17f1530b1042978da78c79bb6754a65ff4e21eb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145210
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28529}
2019-07-10 16:26:50 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Minyue Li
3f2eeb8136 Adding test on GetSpanSamples() for NetEq PacketBuffer.
Bug: webrtc:10736
Change-Id: I4448c5c8e1ae8ea5e343415c4fc2c0fd095ca8ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144560
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28481}
2019-07-04 09:23:27 +00:00
Minyue Li
e8fbc5d702 Refactor WebRtcOpus_PacketHasFec.
WebRtcOpus_PacketHasFec was written long time ago. see http://webrtc-codereview.appspot.com/7539004.
When revisiting, I notice that adding more comments should help. Code style should be improved a bit too.

Bug: webrtc:10772
Change-Id: If4d60b210e6235b4f787608047e88efc949f6838
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144056
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28479}
2019-07-04 07:51:52 +00:00
Jakob Ivarsson
46dda83bcb Improve buffer level estimation with DTX and add CNG time stretching.
The functionality is hidden behind field trial for experimentation.

Bug: webrtc:10736
Change-Id: I1daf60966717c3ea43bf6ee16d190290ab740ce7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144059
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28474}
2019-07-03 15:12:09 +00:00
Mirko Bonadei
14be7993c6 Switch neteq tools to ABSL_FLAG.
Bug: webrtc:10616
Change-Id: I2aa688f0976d5618347e402f25d8701b0cf5a360
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144027
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28442}
2019-07-02 10:54:06 +00:00
Chen Xing
3e8ef940fe Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.

Bug: webrtc:10668
Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#28434}
2019-07-01 15:56:40 +00:00
Minyue Li
62eb89d221 Fixing possible overflow in NetEq buffle level filter.
Bug: chromium:979281
Change-Id: Ieb3a8f9dc03114b76b13d1f8c529e9f759804da9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144240
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28433}
2019-07-01 15:17:29 +00:00
Karl Wiberg
225842ced8 Initialize signal processing function pointers statically
The last run-time logic for selecting function pointers was removed in
May 2016, here: https://codereview.webrtc.org/1955413003

It would be even better if we could eliminate the function pointers
entirely and just have different implementations that we select at
compile time; I've left a TODO asking for this.

Bug: webrtc:9553
Change-Id: Ica71d71e19759da00967168f6479b7eb8b46c590
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144053
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28414}
2019-06-28 14:20:03 +00:00
Alessio Bazzica
60bfb3d4e3 NetEQ: BackgroundNoise::Update returns true when the filter is updated
Bug: webrtc:10690
Change-Id: I17ff7dc1cffc8c46987d0a9ff8c6633ce9dcc8d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144040
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28411}
2019-06-28 10:11:33 +00:00
Jakob Ivarsson
a36c591c09 Reland "Reland "Change buffer level filter to store current level in number of samples.""
This is a reland of 0ded32d5a3

Original change's description:
> Reland "Change buffer level filter to store current level in number of samples."
> 
> This is a reland of 87977dd06e
> 
> Original change's description:
> > Change buffer level filter to store current level in number of samples.
> > 
> > The buffer level should not be converted back and forth between samples and packets in case of variable packet lengths.
> > 
> > Bug: webrtc:10736
> > Change-Id: Ia08dcfac3d8104dc79fbad0704a5f6f12a050a01
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142178
> > Reviewed-by: Minyue Li <minyue@webrtc.org>
> > Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28368}
> 
> Bug: webrtc:10736
> Change-Id: I1ff603e65cdd31c7429f36b035dcc00a17b68f3b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143787
> Commit-Queue: Minyue Li <minyue@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28393}

Bug: webrtc:10736
Change-Id: I251b8321e5a5fd870e018bc7c8083ec0a41de81b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144023
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28398}
2019-06-27 09:16:27 +00:00
Jakob Ivarsson
b93af8543d Revert "Reland "Change buffer level filter to store current level in number of samples.""
This reverts commit 0ded32d5a3.

Reason for revert: breaks downstream projects.

Original change's description:
> Reland "Change buffer level filter to store current level in number of samples."
> 
> This is a reland of 87977dd06e
> 
> Original change's description:
> > Change buffer level filter to store current level in number of samples.
> > 
> > The buffer level should not be converted back and forth between samples and packets in case of variable packet lengths.
> > 
> > Bug: webrtc:10736
> > Change-Id: Ia08dcfac3d8104dc79fbad0704a5f6f12a050a01
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142178
> > Reviewed-by: Minyue Li <minyue@webrtc.org>
> > Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28368}
> 
> Bug: webrtc:10736
> Change-Id: I1ff603e65cdd31c7429f36b035dcc00a17b68f3b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143787
> Commit-Queue: Minyue Li <minyue@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28393}

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

Change-Id: I570c83ec3a88a24d7a1f883a351748dd71bea015
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10736
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144022
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28397}
2019-06-27 08:07:21 +00:00
Jakob Ivarsson
0ded32d5a3 Reland "Change buffer level filter to store current level in number of samples."
This is a reland of 87977dd06e

Original change's description:
> Change buffer level filter to store current level in number of samples.
> 
> The buffer level should not be converted back and forth between samples and packets in case of variable packet lengths.
> 
> Bug: webrtc:10736
> Change-Id: Ia08dcfac3d8104dc79fbad0704a5f6f12a050a01
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142178
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28368}

Bug: webrtc:10736
Change-Id: I1ff603e65cdd31c7429f36b035dcc00a17b68f3b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143787
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28393}
2019-06-26 20:30:05 +00:00
Jakob Ivarsson
d3fc161c16 Revert "Change buffer level filter to store current level in number of samples."
This reverts commit 87977dd06e.

Reason for revert: Breaks downstream project

Original change's description:
> Change buffer level filter to store current level in number of samples.
> 
> The buffer level should not be converted back and forth between samples and packets in case of variable packet lengths.
> 
> Bug: webrtc:10736
> Change-Id: Ia08dcfac3d8104dc79fbad0704a5f6f12a050a01
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142178
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28368}

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

Change-Id: I3900c9f6071fce51d13fb3b7c886157304d7a5c3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10736
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143786
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28369}
2019-06-25 12:33:01 +00:00
Jakob Ivarsson
87977dd06e Change buffer level filter to store current level in number of samples.
The buffer level should not be converted back and forth between samples and packets in case of variable packet lengths.

Bug: webrtc:10736
Change-Id: Ia08dcfac3d8104dc79fbad0704a5f6f12a050a01
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142178
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28368}
2019-06-25 11:21:51 +00:00
Jakob Ivarsson
d487a558ef Revert "Remove sync buffer length from FilteredCurrentDelayMs."
This reverts commit 79890ef91f.

Reason for revert: the sync buffer was actually not counted when the buffer level filter was updated since the value was rounded down to the closest whole packet.

Original change's description:
> Remove sync buffer length from FilteredCurrentDelayMs.
> 
> The sync buffer length is already added when the buffer level filter is updated.
> 
> Bug: webrtc:10736
> Change-Id: Icbd411d4fd7b16f31b800142d1b6a8de79365d91
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140950
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28261}

TBR=minyue@webrtc.org,jakobi@webrtc.org

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

Bug: webrtc:10736
Change-Id: Ibf4ce566484ff01421b186e03fe97fe633ba066d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143167
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28335}
2019-06-20 12:51:25 +00:00
Jakob Ivarsson
79890ef91f Remove sync buffer length from FilteredCurrentDelayMs.
The sync buffer length is already added when the buffer level filter is updated.

Bug: webrtc:10736
Change-Id: Icbd411d4fd7b16f31b800142d1b6a8de79365d91
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140950
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28261}
2019-06-13 09:38:22 +00:00
Jonas Olsson
5b2eda4895 Sanity-check field trial string at initialization.
It's easy to make small errors when building field trial strings, and
those errors can cause all sorts of weird problems. This CL checks if
the FT string has an odd number of delimiters, duplicate
names or any trailing chars.

If so we'll log a error message. On debug builds we'll also crash.

Bug: webrtc:10729
Change-Id: Iebf7155d9b117a02d1e9cfe7f64408e11df2aec5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140866
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28234}
2019-06-11 14:11:06 +00:00
Pablo Barrera González
7541141b99 Fix assert check in neteq_quality_test
While reading inpùt files until their end, the assert should be
ASSERT_TRUE.

Change-Id: Ib60b68173b58b77d9789c544c7cb647a752a24d1
Bug: webrtc:10690
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140280
Commit-Queue: Pablo Barrera González <barrerap@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28202}
2019-06-10 08:01:26 +00:00
Pablo Barrera González
c8501f7ae3 Fix bug in neteq_quality_test
Insert first packet before calling to decode.

Bug: webrtc:10690
Change-Id: I721b7af0506f0dbaf4fa2ed6a9ba6a87250d08f1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139103
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Pablo Barrera González <barrerap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28149}
2019-06-04 08:53:07 +00:00
Pablo Barrera González
4e34c18c4b Check input file extension is not wav
This is an usual error while using neteq_quality_test. This tool
does not support wav files as input. Adding a validation.

Bug: webrtc:10690
Change-Id: I18ed308d2f688106728df5df25e0a58c7170f411
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139104
Commit-Queue: Pablo Barrera González <barrerap@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28141}
2019-06-03 15:43:10 +00:00
Pablo Barrera González
89bbf379ce Allow neteq_quality_test to read a complete file
Instead of setting a runtime, allow neteq_quality_test to
consume a complete file using --runtime_ms -1

Bug: webrtc:10690
Change-Id: I90d35cf31996d9336fef817b9332a2cd1d04e77e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139101
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Pablo Barrera González <barrerap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28134}
2019-06-03 10:25:29 +00:00
Pablo Barrera González
62838fe300 Expose audio decoder factory in neteq_quality_test
Bug: webrtc:10690
Change-Id: Ic9073fad82963d4a953a80d1eff043bf9430deff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139102
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Pablo Barrera González <barrerap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28132}
2019-06-03 09:14:33 +00:00
Karl Wiberg
7eb0a5e210 AudioDecoderOpus: Add support for 16 kHz output sample rate
In addition to the 48 kHz that we've always used.

Bug: webrtc:10631
Change-Id: If73bf7ff9c1c0d22e0d1caa245128612850f8e41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138268
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28104}
2019-05-29 12:42:38 +00:00
Karl Wiberg
a1d1a1e976 WebRTC Opus C interface: Add support for non-48 kHz decode sample rate
Plus tests for 16 kHz.

Bug: webrtc:10631
Change-Id: I2d89bc6d0d9548f0ad7bb1e36d6dfde6b6b31f83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138072
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28099}
2019-05-29 10:33:03 +00:00
Karl Wiberg
126f2b37ac AudioEncoderOpus: Add support for 16 kHz input sample rate
In addition to the 48 kHz that we've always used.

Bug: webrtc:10631
Change-Id: I5e4f6600e39a463d20d3988db098c7e38281f4a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138264
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28074}
2019-05-27 13:01:04 +00:00
Karl Wiberg
e0eb325d0d AudioEncoderOpusImpl: Remove unused static methods
Bug: webrtc:10631
Change-Id: I17583ff04f461a281c4ab0ad9322506431c9cade
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138074
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28070}
2019-05-27 12:02:38 +00:00
Jakob Ivarsson
e9a2ee2631 Improve NetEq network adaptation in the beginning of the call.
Change the way the forget factor converge to the steady state so that we don't overemphasize the first packets received.

The logic is controlled by the delay histogram field trial which has an added parameter to control if emphasis should be even (c=1, default) or put on later packets (c>1) until we reach our steady state forget factor.

Bug: webrtc:10411
Change-Id: Ia5d46c22d1a4a66994652f71c8cde664362bfacb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137050
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Chen Xing <chxg@google.com>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28039}
2019-05-23 14:19:30 +00:00
Karl Wiberg
7e7c5c3c25 WebRTC Opus C interface: Add support for non-48 kHz encode sample rate
Plus tests fo 16 kHz.

Bug: webrtc:10631
Change-Id: I162c40b6120d7e308e535faba7501e437b0b5dc4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137047
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28029}
2019-05-22 22:56:58 +00:00
Jakob Ivarsson
9ce451a03f End NetEq simulation if there are no more packets to decode.
Bug: b/133217334
Change-Id: Ibd696011f390ef60a6ac44e603ab4380ae5e759a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138060
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28026}
2019-05-22 15:21:44 +00:00
Karl Wiberg
053c371552 Audio coding: Don't choke when RTP timestamp rate > sample rate
Bug: webrtc:10631
Change-Id: If0422786172502f039acc2cac5e8c13b637af54c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137048
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27998}
2019-05-21 03:10:49 +00:00
Karl Wiberg
eb16697259 AudioEncoderOpus: Don't mix up sample rate and RTP timestamp rate
A later change will allow them to differ.

Bug: webrtc:10631
Change-Id: I4e13f41980261990b3bbbc6897cd754369265ca0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137046
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27991}
2019-05-20 17:33:56 +00:00
Ruslan Burakov
1e193faaf1 Add DecelerationTargetLevelOffset Field Trial.
This change allows NetEq to reach preferred jitter buffer size much faster
for high target delays because it uses absolute units instead of relative ones
during computation of lower_limit.

More details can be found here:
https://docs.google.com/document/d/12qPMJYFhGXrA_o_nvz9VshpzAJX6aULxFig1fTzBzDI/edit

Change-Id: I21ce0e35e25166d935fdf0325c083bcf990899f5

Bug: webrtc:10619
Change-Id: I21ce0e35e25166d935fdf0325c083bcf990899f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135745
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Cr-Commit-Position: refs/heads/master@{#27970}
2019-05-17 08:08:12 +00:00
Ruslan Burakov
0ac1d993be Remove streaming_mode as it is always false.
Change-Id: I489b72985f36fd98413ecf729f7d69476c342851

Bug: webrtc:10618
Change-Id: I489b72985f36fd98413ecf729f7d69476c342851
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136803
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Cr-Commit-Position: refs/heads/master@{#27948}
2019-05-15 11:12:46 +00:00
Niels Möller
035ee11f78 Delete left-over tests NetEqExternalDecoderUnitTest
Related code was deleted in
https://webrtc-review.googlesource.com/c/112081.

Bug: webrtc:10080
Change-Id: I3adc1238df6e80380cae3403c108403a59fd4a05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135740
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27890}
2019-05-09 08:14:32 +00:00
Jakob Ivarsson
8fc92e640a Add lifetime concealment stats to NetEqStatsPlotter.
Bug: None
Change-Id: Iaf91218e3ebedf301e991083fe32cb26ba5b7476
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135562
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27875}
2019-05-08 08:40:08 +00:00
Henrik Lundin
e360c09c86 NetEq: Minor change to print-out format for interruption stats
Going back to a ratio in [0.0, 1.0] instead of a % number. Also changed
the format of the tag to match the others.

Bug: webrtc:10549
Change-Id: I03216718156843e345f8d0a76258a15f1a355fbe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135104
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27840}
2019-05-03 10:31:35 +00:00
Ivo Creusen
8d8ffdbcca Expose new audio stats on the API
Several new audio stats were recently standardized and implemented in
WebRTC in https://webrtc-review.googlesource.com/c/src/+/133887. This CL
adds these to the GetStats API.

Bug: webrtc:10442, webrtc:10443, webrtc:10444
Change-Id: I0e898ac14777e82b1a9099b5e0a5584eb9cb5934
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134213
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27839}
2019-05-03 10:10:15 +00:00
Niels Möller
4731f0062e Delete deprecated PlatformThread looping
Bug: webrtc:10594, webrtc:7187
Change-Id: Icba3a5cf6dbe817ead427c27645b3ad7bc8819be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134642
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27833}
2019-05-03 08:35:42 +00:00
Henrik Lundin
44125faba5 Reland "Piping audio interruption metrics to API layer"
The metrics are now added as RTCNonStandardStatsMember objects in
RTCMediaStreamTrackStats. Unit tests are updated.

This is a reland of https://webrtc-review.googlesource.com/c/src/+/134303,
with fixes.

TBR=kwiberg@webrtc.org

Bug: webrtc:10549
Change-Id: I29dcc6fbfc69156715664e71acfa054c1b2d9038
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134500
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27806}
2019-04-29 15:39:50 +00:00
Henrik Andreassson
fc02a793c2 Revert "Piping audio interruption metrics to API layer"
This reverts commit 299c4e6846.

Reason for revert: https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Win10%20Tester/2753

../../chrome/browser/media/webrtc/webrtc_browsertest_base.cc(539): error: Expected equality of these values:
  "ok-got-stats"
  ExecuteJavascript("verifyLegacyStatsGenerated()", tab)
    Which is: "Test failed: Error: \"googInterruptionCount\" is not a whitelisted stat. Exposing new metrics in the legacy getStats() API is not allowed. Please follow the standardization process: https://docs.google.com/document/d/1q1CJVUqJ6YW9NNRc0tENkLNny8AHrKZfqjy3SL89zjc/edit?usp=sharing\n    at failTest (http://127.0.0.1:50650/webrtc/test_functions.js:46:15)\n    at http://127.0.0.1:50650/webrtc/peerconnection.js:481:19"
With diff:
@@ -1,1 +1,3 @@
-ok-got-stats
+Test failed: Error: \"googInterruptionCount\" is not a whitelisted stat. Exposing new metrics in the legacy getStats() API is not allowed. Please follow the standardization process: https://docs.google.com/document/d/1q1CJVUqJ6YW9NNRc0tENkLNny8AHrKZfqjy3SL89zjc/edit?usp=sharing
+    at failTest (http://127.0.0.1:50650/webrtc/test_functions.js:46:15)
+    at http://127.0.0.1:50650/webrtc/peerconnection.js:481:19

Original change's description:
> Piping audio interruption metrics to API layer
>
> Bug: webrtc:10549
> Change-Id: Ie6abe5819c5b73dc5f5f89bdc375bad77f44ce97
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134303
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27788}

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

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

Bug: webrtc:10549
Change-Id: I345306ba9758c0a3b1597724fa860d3e3fdb8995
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134464
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27802}
2019-04-29 11:23:16 +00:00
Niels Möller
4babc68eee Delete deprecated version of AudioPacketizationCallback::SendData.
Followup to https://webrtc-review.googlesource.com/c/src/+/134212

Bug: webrtc:6471
Change-Id: I5f2be134bddf8aada2b9c94b6d986c26a6fd23ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134309
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27797}
2019-04-29 09:18:19 +00:00
Bjorn A Mellem
413ccc49ec Stop DCHECK which occurs in ANA BitrateController when overhead is zero.
https://webrtc-review.googlesource.com/c/src/+/119121 added two calls to set the observed overhead.  Both SetupSendCodec() and ReconfigureSendCodec() update the encoder's overhead.  However, these calls happen before RTP has issued any callbacks to set the overhead, so they tell the encoder that the overhead is zero.

This change checks whether the overhead has been set to a non-zero value before each of the new calls and adds a DCHECK to quickly catch future cases which attempt to set overhead to zero.

Bug: webrtc:10150
Change-Id: Ieb3345ecfcda1cf25538d5d424383df17a71b4a2
TBR: solenberg@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134260
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27793}
2019-04-27 00:20:37 +00:00
Henrik Lundin
299c4e6846 Piping audio interruption metrics to API layer
Bug: webrtc:10549
Change-Id: Ie6abe5819c5b73dc5f5f89bdc375bad77f44ce97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134303
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27788}
2019-04-26 13:32:34 +00:00
Niels Möller
c35b6e675a Deprecate RTPFragmentationHeader argument to AudioPacketizationCallback::SendData
It appears unused everywhere. It will be deleted in a followup cl.

Bug: webrtc:6471
Change-Id: Ief992db6e52aee3cf1bc77ffd659ffbc072672ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134212
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27787}
2019-04-26 12:58:14 +00:00
Henrik Lundin
2a8bd090a3 NetEq: Create an audio interruption metric
This CL adds a new metric to NetEq, which logs whenever a loss
concealment event has lasted longer than 150 ms (an "interruption").
The number of such events, as well as the sum length of them, is kept
in a SampleCounter, which can be queried at any time.

Any initial PLC at the beginning of a call, before the first packet is
decoded, is ignored.

Unit tests and piping to neteq_rtpplay are included.

Bug: webrtc:10549
Change-Id: I8a224a34254c47c74317617f420f6de997232d88
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132796
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27781}
2019-04-26 09:48:05 +00:00
Alex Loiko
44c21f48ee Encoder side of Multistream Opus.
Follows https://webrtc-review.googlesource.com/c/src/+/129768 closely.
Adds an ENCODER and sets it up to parse SDP config for multistream
opus.

E.g. this is the new SDP syntax for 6.1 surround sound:
"multiopus/48000/6 channel_mapping=0,4,1,2,3,5 num_streams=4 coupled_streams=2"


Bug: webrtc:8649
Change-Id: I3fc341e76f5c41dab0243cf65f6461e4c3d9d67d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132001
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27775}
2019-04-25 15:07:38 +00:00
Ivo Creusen
bf4a221187 Implement newly standardized stats
Several new audio stats have been added to the standard, and this CL
implements those inside of NetEq. Exposing these metrics on the API will
be done in a follow-up CL.

Bug: webrtc:10442, webrtc:10443, webrtc:10444
Change-Id: Ia7aa5a6d76685fc0fdb446172a0a3fd0310f6cb7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133887
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27755}
2019-04-25 08:58:23 +00:00
Ivo Creusen
67fb919b5e Handle event log parsing errors without crashing.
Instead of crashing when encountering an event log that cannot be parsed
it is better to print an error message, skip the file and continue.

Bug: webrtc:10337
Change-Id: I5dbca18e456c14e5a92af068f82e88cb17e8de9c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133185
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27727}
2019-04-24 07:49:23 +00:00
Sebastian Jansson
40889f35fc Removes TimeMicros interface from ThreadProcessingFakeClock.
Bug: webrtc:9883
Change-Id: Ib48872f81f734b09e3ffa4d9d26da79177b02303
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133341
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27668}
2019-04-17 15:37:48 +00:00
Minyue Li
7d204d5ce9 Disallow buffer level filtering for DTX packets.
We knew that we should not update buffer level during DTX period. We already fulfill this upon no packet receipt. But we missed doing it for DTX-signaling packets. This CL is to fix that.

Bug: b/129521878
Change-Id: I72ca18e3b21e956123fe6e3119ef0d7c981c9eec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133183
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27643}
2019-04-16 13:31:32 +00:00
Minyue Li
f9846bc172 Adding DTX logic to FakeDecodeFromFile (used be NetEqTest).
Bug: b/129521878
Change-Id: Ifcf868048a39ef1d2cc736988479f921e668167b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132799
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27626}
2019-04-15 15:03:39 +00:00
Minyue Li
54c6640efb Disallow time stretching during DTX.
Bug: b/129521878
Change-Id: I32f60c661c6cae001840c9fe83fc848fe23acabc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132789
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27622}
2019-04-15 14:05:11 +00:00
Alessio Bazzica
7e53be0555 NetEQ: GenerateBackgroundNoise moved to BackgrounNoise
Bug: webrtc:10548
Change-Id: Ie9da0755793078b81c60c3751abcbff13da40ede
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132788
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27619}
2019-04-15 12:23:15 +00:00
Mirko Bonadei
6a489f22c7 Fully qualify googletest symbols.
Semi-automatically created with:

git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format

After this, two .cc files failed to compile and I have fixed them
manually.

Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
2019-04-09 17:18:20 +00:00
Alex Loiko
e5b94160b5 Decoder for multistream Opus.
See https://webrtc-review.googlesource.com/c/src/+/121764 for the
overall vision.

This CL adds a multistream Opus decoder. It's a new code-path to not
interfere with the standard Opus decoder. We introduce new SDP syntax,
which uses terminology of RFC 7845. We also set up the decoder side to
parse it. The encoder part will come in a later CL.

E.g. this is the new SDP syntax for 6.1 surround sound:
"multiopus/48000/6 channel_mapping=0,4,1,2,3,5 num_streams=4 coupled_streams=2"

Bug: webrtc:8649
Change-Id: Ifbc584cbb6d07aed373f223512a20d6d72cec5ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129768
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27493}
2019-04-08 16:15:37 +00:00
Alex Loiko
50b8c399c9 Generalize the C-language Opus interface.
Switch to explicit channel mappings (RFC 7845) when creating
multi-stream Opus en/de-coders. The responsibility of setting up the
channel mappings will shift from WebRTC to the WebRTC user.

See https://webrtc-review.googlesource.com/c/src/+/121764 for the
current vision. See also the first child CL
https://webrtc-review.googlesource.com/c/src/+/129768
that sets up the Decoder to use this code.

Bug: webrtc:8649
Change-Id: I55959a293d54bb4c982eff68ec107c5ef8666c5c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129767
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27452}
2019-04-04 14:06:44 +00:00
Mirko Bonadei
e46f5db8bf Add missing using declarations for names in testing namespace.
This code was unnecessarily depending on ADL
(https://abseil.io/tips/49).

Bug: None
Change-Id: I4f130fbd46bf3c7cc3b4313c9c85f1ac9dc64cc9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129764
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27340}
2019-03-28 13:20:00 +00:00
Niels Möller
a533e00fa0 Reland "Replace RTPHeader memset with assignment from a fresh object."
This is a reland of 50686460ca

Original change's description:
> Replace RTPHeader memset with assignment from a fresh object.
> 
> Since RTPHeader contains std::string members, memset results in
> undefined behavior, with memory leaks being the best case.
> 
> Bug: chromium:945598
> Change-Id: I5c04e6b2fb08816fc036abfbb6ba7aaf19469687
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129720
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27282}

Bug: chromium:945598
Change-Id: Id75c1fa022575b76a1b03f1213f5017d158d9c2d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128875
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27290}
2019-03-26 14:06:17 +00:00
Niels Möller
8f7ce222e7 Make VideoFrameType an enum class, and move to separate file and target
Bug: webrtc:5876, webrtc:6883
Change-Id: I1435cfa9e8e54c4ba2978261048ff3fbb993ce0e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126225
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27239}
2019-03-22 12:44:51 +00:00
Artem Titov
741daaf039 Move rtc::FunctionView to the public API
Bug: webrtc:10138
Change-Id: Icc25a2a277a9608701aaddd546882366739991ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127898
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27227}
2019-03-21 15:23:05 +00:00
Ivo Creusen
ab9735f6ca Return nullptr instead of crashing in NetEqTestFactory
Currently the code in NetEqTestFactory will crash when something
unexpected happens. It would be better to return a nullptr instead and
let the caller decide how to proceed.

Bug: webrtc:10337
Change-Id: I3cfdffa7e6f2016eeaa5d6e80c5dd6c954ef8485
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127894
Reviewed-by: Pablo Barrera González <barrerap@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27226}
2019-03-21 15:19:13 +00:00
Artem Titov
94b57c044e Cleanup BUILD.gn files from imports like foo:foo
Repalce all occurrences of foo:foo in deps with just foo in BUILD.gn
files.

Done with Sublime regex replace.
Find: \b([-a-zA-Z0-9_]+):+\1\b
In: *.gn
Replace with: \1

Bug: None
Change-Id: I40aba1b14face687a595b852ffe443cb20197611
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127899
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27225}
2019-03-21 13:05:28 +00:00
Niels Möller
ef1052a134 Reland "Move api/rtp_headers.h to its own build target."
This is a reland of a67050debc

Original change's description:
> Move api/rtp_headers.h to its own build target.
>
> Reduces dependencies on the libjingle_peerconnection_api target from
> lower-level code.
>
> Bug: None
> Change-Id: I98576fc718c396cc0f720c3770acd2b696b9df89
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128565
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27213}

Bug: None
Tbr: kwiberg@webrtc.org
Change-Id: If15b05957e50bb8f18a33c2ed1321e672311b626
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127895
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27216}
2019-03-21 09:17:07 +00:00
Steve Anton
2baef3509f Revert "Move api/rtp_headers.h to its own build target."
This reverts commit a67050debc.

Reason for revert: breaks downstream projects

Original change's description:
> Move api/rtp_headers.h to its own build target.
> 
> Reduces dependencies on the libjingle_peerconnection_api target from
> lower-level code.
> 
> Bug: None
> Change-Id: I98576fc718c396cc0f720c3770acd2b696b9df89
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128565
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27213}

TBR=danilchap@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org

Change-Id: I8cccaa8be1700ca8db141db7252eb6ce588ba2e0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128645
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27215}
2019-03-20 16:47:30 +00:00
Niels Möller
a67050debc Move api/rtp_headers.h to its own build target.
Reduces dependencies on the libjingle_peerconnection_api target from
lower-level code.

Bug: None
Change-Id: I98576fc718c396cc0f720c3770acd2b696b9df89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128565
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27213}
2019-03-20 16:00:49 +00:00
Ivo Creusen
5ec61565cb Allow passing an event log as string to NetEqSimulator.
Previously only reading from the filesystem was supported, this CL
allows parsing an event log from a string.

Bug: webrtc:10337
Change-Id: Iadde3319eb8fb4175625f510201fac9c01c80ed9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127296
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27202}
2019-03-20 10:27:14 +00:00
Niels Möller
c936cb6a86 Make AudioFrameType an enum class, and move to audio_coding_module_typedefs.h
Bug: webrtc:5876
Change-Id: I0c92f9410fcf0832bfa321229b3437134255dba6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128085
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27190}
2019-03-19 16:59:27 +00:00
Mirko Bonadei
93e2120716 Qualify cmath functions.
Use std::pow instead of ::pow.

Bug: None
Change-Id: Ia08921312e8fc7f82edc859a2d598468c5f2b66a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128081
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27173}
2019-03-19 09:46:54 +00:00
Jakob Ivarsson
37b5662a5c Remove zero lower bound of estimated inter-arrival time.
When we offset the measured inter-arrival time due to packet loss, it will sometimes be less than zero. This is the correct value to use when calculating the relative packet arrival delay.

Bug: webrtc:10333
Change-Id: I14a68563a379fa0b9444684304362503a6f1bfca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127547
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27164}
2019-03-18 16:52:01 +00:00
Mirko Bonadei
7edc49cb31 Mark neteq_rtpplay as publicly visible.
Bug: None
Change-Id: I051c7c23851ab15345c8e0f0322458d4f9a7e187
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128123
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27162}
2019-03-18 14:51:50 +00:00
Jakob Ivarsson
647d5e6d91 Increase the default maximum jitter buffer size to 200 packets.
Bug: webrtc:10415
Change-Id: Iec5a5a263c11d92a23290c1c2de053fe9e5d5839
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128082
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27142}
2019-03-15 10:25:11 +00:00
Alessio Bazzica
5ad789ceff Reland "NetEQ RTP Play: Optionally write output audio file"
This reverts commit c4b391a257.

Reason for revert: issue fixed

Original change's description:
> Revert "NetEQ RTP Play: Optionally write output audio file"
>
> This reverts commit 6330818ec8.
>
> Reason for revert: This breaks api/test/neteq_simulator_factory.cc, which unfortunately was not caught by our bots.
>
> Original change's description:
> > NetEQ RTP Play: Optionally write output audio file
> >
> > This CL makes the output audio file optional to more
> > quickly run neteq_rtpplay when no audio output is needed.
> > The CL also includes necessary adaptations because of pre-existing
> > dependencies (e.g., the output audio file name is used to create
> > the plotting script file names).
> >
> > The command line arguments are retro-compatible - i.e., same behavior
> > when specifying the output audio file and the new flag
> > --output_files_base_name is not used.
> >
> > This CL also includes a test script with which the retro-compatibility
> > has been verified.
> >
> > Bug: webrtc:10337
> > Change-Id: Ie3f301b3b2ed0682fb74426d9cf452396f2b112b
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126224
> > Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> > Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#27067}
>
> TBR=henrik.lundin@webrtc.org,alessiob@webrtc.org,ivoc@webrtc.org
>
> Change-Id: I0c63a8ba9566ef567ee398f571f2a511916fa742
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10337
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127293
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27078}

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

Change-Id: Ia7061f7c2d69db61638ad612e82cd429eb49d539
Bug: webrtc:10337
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127540
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27106}
2019-03-13 15:33:29 +00:00
Piasy
cc3503248f Replace abs with std::abs in audio_coding/neteq/histogram.cc
Bug: None
Change-Id: Ie3277558aa27dd76e06ec1fc3cb49cdcf3d982d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125703
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27098}
2019-03-13 14:18:18 +00:00
Jakob Ivarsson
1b4254ada5 Check current buffer time span instead of number of samples in postpone decoding after expand.
Bug: webrtc:10392
Change-Id: I2ad4d8c7a3f87cab32e2ea097b2e05aa179e0bc0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126761
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27080}
2019-03-12 16:25:24 +00:00
Ivo Creusen
c4b391a257 Revert "NetEQ RTP Play: Optionally write output audio file"
This reverts commit 6330818ec8.

Reason for revert: This breaks api/test/neteq_simulator_factory.cc, which unfortunately was not caught by our bots.

Original change's description:
> NetEQ RTP Play: Optionally write output audio file
> 
> This CL makes the output audio file optional to more
> quickly run neteq_rtpplay when no audio output is needed.
> The CL also includes necessary adaptations because of pre-existing
> dependencies (e.g., the output audio file name is used to create
> the plotting script file names).
> 
> The command line arguments are retro-compatible - i.e., same behavior
> when specifying the output audio file and the new flag
> --output_files_base_name is not used.
> 
> This CL also includes a test script with which the retro-compatibility
> has been verified.
> 
> Bug: webrtc:10337
> Change-Id: Ie3f301b3b2ed0682fb74426d9cf452396f2b112b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126224
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27067}

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

Change-Id: I0c63a8ba9566ef567ee398f571f2a511916fa742
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10337
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127293
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27078}
2019-03-12 14:28:23 +00:00
Alessio Bazzica
6330818ec8 NetEQ RTP Play: Optionally write output audio file
This CL makes the output audio file optional to more
quickly run neteq_rtpplay when no audio output is needed.
The CL also includes necessary adaptations because of pre-existing
dependencies (e.g., the output audio file name is used to create
the plotting script file names).

The command line arguments are retro-compatible - i.e., same behavior
when specifying the output audio file and the new flag
--output_files_base_name is not used.

This CL also includes a test script with which the retro-compatibility
has been verified.

Bug: webrtc:10337
Change-Id: Ie3f301b3b2ed0682fb74426d9cf452396f2b112b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126224
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27067}
2019-03-12 08:37:57 +00:00
Niels Möller
87e2d785a0 Prepare for splitting FrameType into AudioFrameType and VideoFrameType
This cl deprecates the FrameType enum, and adds aliases AudioFrameType
and VideoFrameType.

After downstream usage is updated, the enums will be separated
and be moved out of common_types.h.

Bug: webrtc:6883
Change-Id: I2aaf660169da45f22574b4cbb16aea8522cc07a6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123184
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27011}
2019-03-07 10:12:57 +00:00
Jakob Ivarsson
232b3fda92 Expose relative packet arrival delay metric in stats API.
The metric is non-standard and documented in: https://github.com/henbos/webrtc-provisional-stats/pull/14

Bug: webrtc:10333
Change-Id: Ie5b4bbad5b1e2c9104742931529bab8f48f51f8c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125861
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26999}
2019-03-06 16:35:16 +00:00
Takuto Ikuta
745cfb9997 use link_deps in ana_debug_dump_proto
I will deprecate deps in proto_library for improved build throughput.
We can use link_deps here instead.

Bug: chromium:938011
Change-Id: Iafa83000c3f7f9ffdc0c376a2297b4a9380b7594
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125820
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Takuto Ikuta <tikuta@google.com>
Cr-Commit-Position: refs/heads/master@{#26989}
2019-03-06 12:12:10 +00:00
Jakob Ivarsson
4eb5c1487e Reland "Remove field trial include from decision logic."
This is a reland of d9f798a6b3

Original change's description:
> Remove field trial include from decision logic.
> 
> Bug: webrtc:9289
> Change-Id: I2e465bf9eddda8bde50daeb14cfd51405e536ff4
> Reviewed-on: https://webrtc-review.googlesource.com/c/125097
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26925}

Bug: webrtc:9289
Change-Id: I40fbd999fc8495beaeb46799c333f91d72b5be37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125720
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26978}
2019-03-05 21:26:04 +00:00
Jakob Ivarsson
445070818c Add relative_packet_arrival_delay and jitter_buffer_packets_received statistics.
Bug: webrtc:10333
Change-Id: I415e2286b426cbca940fe3a187957531847272ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/124780
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26976}
2019-03-05 18:50:34 +00:00
Jakob Ivarsson‎
423bae437c Revert "Remove field trial include from decision logic."
This reverts commit d9f798a6b3.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Remove field trial include from decision logic.
> 
> Bug: webrtc:9289
> Change-Id: I2e465bf9eddda8bde50daeb14cfd51405e536ff4
> Reviewed-on: https://webrtc-review.googlesource.com/c/125097
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26925}

TBR=minyue@webrtc.org,jakobi@webrtc.org

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

Bug: webrtc:9289
Change-Id: I439a7477c9b0d94abe815b375b05b7545e3617f1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125683
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26967}
2019-03-05 10:08:49 +00:00
Jakob Ivarsson
d9f798a6b3 Remove field trial include from decision logic.
Bug: webrtc:9289
Change-Id: I2e465bf9eddda8bde50daeb14cfd51405e536ff4
Reviewed-on: https://webrtc-review.googlesource.com/c/125097
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26925}
2019-03-01 13:51:46 +00:00
Mirko Bonadei
fc52b912a3 Implicitly suppress //build/config/clang:find_bad_constructs.
Since there is no way to enable/disable these diagnostics at runtime,
this CL moves the suppression into the rtc_* templates in order to
remove the need to explicitly add the snippet of code needed to
suppress it (currently copy/pasted in 144 locations).

The diagnostic that causes the most problems is the one about "complex
class/struct explicit ctor/dtor" [1] because WebRTC doesn't find
it useful enough.

Other diagnostics are good (for example the one that warns about
using "virtual" instead of "override", but that will be covered by
this clang-tidy check [2]) while others are Chromium related so
they have never triggered.

[1] - https://cs.chromium.org/chromium/src/tools/clang/plugins/FindBadConstructsConsumer.cpp?l=147-167&rcl=b4bebe1aa15dba7ca5fcc6456a81a55665327c3a
[2] - https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html

Bug: webrtc:163
Change-Id: Icbf27efa5b369100a31e6a32df1a0913729b3b34
Reviewed-on: https://webrtc-review.googlesource.com/c/125088
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26918}
2019-03-01 10:18:17 +00:00
Jakob Ivarsson
26c59ff6ca Fix jitter buffer delay reporting.
Previously, if more than one packet is extracted in a GetAudio call then
an incorrect number of samples will be reported.

Bug: webrtc:10363
Change-Id: Ia1bcc87a0e0082060e4f746d37a4008735eec6b3
Reviewed-on: https://webrtc-review.googlesource.com/c/124829
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26903}
2019-02-28 15:51:31 +00:00
Jakob Ivarsson
d3a780b476 Cleanup NetEqPostponeDecodingAfterExpand field trial.
Change-Id: Ie96e9b35ced4b6ca8daa78f1fa80816386a6643b
Bug: webrtc:9289
Reviewed-on: https://webrtc-review.googlesource.com/c/124127
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26899}
2019-02-28 14:45:59 +00:00
Ivo Creusen
ba7886b076 Move command line flags out of NetEqTestFactory
This replaces the use of command-line flags with the use of a config
struct. This makes it easier for non command-line applications to use
the NetEqTestFactory to run simulations.

Bug: webrtc:10337
Change-Id: I24533bf206e70e12db9af8d9675769c1ff7c7d48
Reviewed-on: https://webrtc-review.googlesource.com/c/123600
Reviewed-by: Pablo Barrera González <barrerap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26887}
2019-02-28 10:01:25 +00:00
Jakob Ivarsson
db42ed299a Add RELATIVE_ARRIVAL_DELAY histogram mode to DelayManager.
- This mode estimates relative packet arrival delay for each incoming packet and adds that value to the histogram.
- The histogram buckets are 20 milliseconds each instead of whole packets.
- The functionality is enabled with a field trial for experimentation.

Bug: webrtc:10333
Change-Id: I8f7499c56802fc1aa1ced2f5310fdd2ef1403515
Reviewed-on: https://webrtc-review.googlesource.com/c/123923
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26871}
2019-02-27 10:15:14 +00:00
Kimmo Kinnunen
08f6a6c672 Import proto_library.gni when rtc_enable_protobuf is true
Import proto_library.gni when rtc_enable_protobuf is true instead of when
build_with_mozilla is false.

Makes it maybe easier to reason about the intention (e.g. intention is to not
compile any protobuf in, hence flag rtc_enable_protobuf)

The build file could not work if build_with_mozilla = true but
rtc_enable_protobuf = true.

Bug: webrtc:10338
Change-Id: I26e5983bd1519aa46c308b11796d518de5ef7597
Reviewed-on: https://webrtc-review.googlesource.com/c/123763
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26868}
2019-02-27 09:56:42 +00:00
Ruslan Burakov
76a74e6dc8 Delay bug during audio receiver stream recreation.
For e.g. when audio receiver is recreated during SetRtpExtensionsAndRecreateStream in webrtc_voice_engine.h,
the audio minimum delay can't go down.

Imagine we set base minimum playout delay when audio receiver stream is created, then its value will be cached, to be applied during recreation. Then SetRtpExtensionsAndRecreateStream is fired, and audio receiver stream is recreated with the cached value, but currently it in the constructor it is used to initialize both base minimum playout delay and minimum playout delay. Which leads to the bug that effective minimum playout delay can't go down anymore as if you set base minimum playout delay to the low value then effective delay use the biggest value which minimum playout delay.

This didn't come up during previous trials because of
https://webrtc-review.googlesource.com/c/src/+/122280
It was reseting minimum playout delay to 0 asynchronously, that is why you couldn't see this bug.


Bug: webrtc:10287
Change-Id: I924446bfcb33ac94f7e5bf987a1868acaf1b0346
Reviewed-on: https://webrtc-review.googlesource.com/c/124000
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Cr-Commit-Position: refs/heads/master@{#26832}
2019-02-25 09:23:56 +00:00
Mirko Bonadei
c4dd730765 Fix -Wextra-semi warnings.
Starting from https://chromium-review.googlesource.com/c/1485012,
-Wextra-semi is enabled and WebRTC has some violations to fix.

This is a follow-up of https://webrtc-review.googlesource.com/c/123560.

Bug: webrtc:10355
Change-Id: I012b7497fc8991037fd77aa98f1579c22e08206f
Reviewed-on: https://webrtc-review.googlesource.com/c/124126
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26831}
2019-02-25 09:22:51 +00:00
Alex Loiko
65438812ba 2nd reland of https://webrtc-review.googlesource.com/c/src/+/114883
The difference to the original is new bitexactness strings.  The
reason for reland is breaking downstream projects.

Original CL description:

Tests for multi-stream Opus.

This CL (mainly) adds bit-exactness tests for multi-stream Opus. The
tests are in audio_coding_unittest.cc. Some refactoring of
AcmSendTestOldApi, AcmSenderBitExactnessOldApi is done to make it
possible. A few checks for "channels \in {1, 2}" are replaced with
"channels \in {1, 2, 4, 6, 8}" in the WebRTC Opus codec wrapper. A few
other changes are made to be able to write and read multi-channel WAV
files.

The SDP changes are NOT included; as of this CL there is no way to set
up a multi-stream opus en/de-coder from SDP strings.

TBR=ossu@webrtc.org

Bug: webrtc:8649
Change-Id: I6261b18c69fd666d43ab34ed8f1bc9d5cc82b21f
Reviewed-on: https://webrtc-review.googlesource.com/c/123882
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26809}
2019-02-22 09:59:01 +00:00
Jakob Ivarsson
1eb3d7ea0f Refactor DelayManager into separate Histogram class and make it injectable for testing purposes.
Change-Id: I98aa3f992169e598fc1a3dd850400183395fe1fe
Bug: webrtc:10333
Reviewed-on: https://webrtc-review.googlesource.com/c/123445
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26797}
2019-02-21 15:45:31 +00:00
Nico Weber
22f9925b3e webrtc: Remove semicolons.
Bug: chromium:926235
Change-Id: I66c10ab3df38adf87152d1f18cc8162afedca7e4
Reviewed-on: https://webrtc-review.googlesource.com/c/123560
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26780}
2019-02-20 16:02:59 +00:00
Alex Loiko
8b3db59b6e Revert "Reland of https://webrtc-review.googlesource.com/c/src/+/114883"
This reverts commit 5341aaccdb.

Reason for revert: Order of initialization of global static strings.

Original change's description:
> Reland of https://webrtc-review.googlesource.com/c/src/+/114883
> 
> The difference to the original is new bitexactness strings AND
> global static file string constants. The reason for reland is breaking
> downstream projects.
> 
> Original CL description:
> 
> Tests for multi-stream Opus.
> 
> This CL (mainly) adds bit-exactness tests for multi-stream Opus. The
> tests are in audio_coding_unittest.cc. Some refactoring of
> AcmSendTestOldApi, AcmSenderBitExactnessOldApi is done to make it
> possible. A few checks for "channels \in {1, 2}" are replaced with
> "channels \in {1, 2, 4, 6, 8}" in the WebRTC Opus codec wrapper. A few
> other changes are made to be able to write and read multi-channel WAV
> files.
> 
> The SDP changes are NOT included; as of this CL there is no way to set
> up a multi-stream opus en/de-coder from SDP strings.
> 
> Bug: webrtc:8649
> Change-Id: I9fd47c790c241c1876c4a731b0840bec30b4f1b2
> Reviewed-on: https://webrtc-review.googlesource.com/c/123387
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Commit-Queue: Alex Loiko <aleloi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26774}

TBR=aleloi@webrtc.org,ossu@webrtc.org

Change-Id: I88060f2050ccee83d6091b042a10f79b3c4edc47
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8649
Reviewed-on: https://webrtc-review.googlesource.com/c/123580
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26777}
2019-02-20 15:17:49 +00:00
Alex Loiko
5341aaccdb Reland of https://webrtc-review.googlesource.com/c/src/+/114883
The difference to the original is new bitexactness strings AND
global static file string constants. The reason for reland is breaking
downstream projects.

Original CL description:

Tests for multi-stream Opus.

This CL (mainly) adds bit-exactness tests for multi-stream Opus. The
tests are in audio_coding_unittest.cc. Some refactoring of
AcmSendTestOldApi, AcmSenderBitExactnessOldApi is done to make it
possible. A few checks for "channels \in {1, 2}" are replaced with
"channels \in {1, 2, 4, 6, 8}" in the WebRTC Opus codec wrapper. A few
other changes are made to be able to write and read multi-channel WAV
files.

The SDP changes are NOT included; as of this CL there is no way to set
up a multi-stream opus en/de-coder from SDP strings.

Bug: webrtc:8649
Change-Id: I9fd47c790c241c1876c4a731b0840bec30b4f1b2
Reviewed-on: https://webrtc-review.googlesource.com/c/123387
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26774}
2019-02-20 14:57:01 +00:00
Ruslan Burakov
b35baccd6f Fix NetEq minimum and maximum delay always reset on acm creation.
Bug: webrtc:10305
Change-Id: Iecc55c3b4bb8416e2fd0cf26532b43dcd70a7cca
Reviewed-on: https://webrtc-review.googlesource.com/c/122280
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Cr-Commit-Position: refs/heads/master@{#26771}
2019-02-20 14:04:51 +00:00
Niels Möller
1925b5a1d3 Delete deprecated version of AudioCodingModule::IncomingPacket
Followup to https://webrtc-review.googlesource.com/c/123188

Bug: webrtc:5876
Change-Id: Ia1cf7ebafddeb4fe2caece644739fbc2b55e4d66
Reviewed-on: https://webrtc-review.googlesource.com/c/123238
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26749}
2019-02-19 08:46:40 +00:00
Mirko Bonadei
ffd1f93a8d Revert "Tests for multi-stream Opus."
This reverts commit 9c31ac2323.

Reason for revert: Breaks downstream project.

Original change's description:
> Tests for multi-stream Opus.
> 
> This CL (mainly) adds bit-exactness tests for multi-stream Opus. The
> tests are in audio_coding_unittest.cc. Some refactoring of
> AcmSendTestOldApi, AcmSenderBitExactnessOldApi is done to make it
> possible. A few checks for "channels \in {1, 2}" are replaced with
> "channels \in {1, 2, 4, 6, 8}" in the WebRTC Opus codec wrapper. A few
> other changes are made to be able to write and read multi-channel WAV
> files.
> 
> The SDP changes are NOT included; as of this CL there is no way to set
> up a multi-stream opus en/de-coder from SDP strings.
> 
> Bug: webrtc:8649
> Change-Id: I1d93a9b8eecc3f6e19896ff2e2ce9b63da77a23c
> Reviewed-on: https://webrtc-review.googlesource.com/c/114883
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Commit-Queue: Alex Loiko <aleloi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26742}

TBR=aleloi@webrtc.org,ossu@webrtc.org

Change-Id: I0ac48b7320d31d3e7af33bf8714c3db6c807b82e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8649
Reviewed-on: https://webrtc-review.googlesource.com/c/123385
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26747}
2019-02-18 23:10:05 +00:00
Alex Loiko
9c31ac2323 Tests for multi-stream Opus.
This CL (mainly) adds bit-exactness tests for multi-stream Opus. The
tests are in audio_coding_unittest.cc. Some refactoring of
AcmSendTestOldApi, AcmSenderBitExactnessOldApi is done to make it
possible. A few checks for "channels \in {1, 2}" are replaced with
"channels \in {1, 2, 4, 6, 8}" in the WebRTC Opus codec wrapper. A few
other changes are made to be able to write and read multi-channel WAV
files.

The SDP changes are NOT included; as of this CL there is no way to set
up a multi-stream opus en/de-coder from SDP strings.

Bug: webrtc:8649
Change-Id: I1d93a9b8eecc3f6e19896ff2e2ce9b63da77a23c
Reviewed-on: https://webrtc-review.googlesource.com/c/114883
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26742}
2019-02-18 17:09:59 +00:00
Niels Möller
bf47495979 Update remaining audio test code to not use WebRtcRTPHeader.
Bug: webrtc:5876
Change-Id: I5b1abcec4a0ef52b6dd36d1fe94dbfd3f88f28a7
Reviewed-on: https://webrtc-review.googlesource.com/c/123235
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26736}
2019-02-18 13:29:35 +00:00
Niels Möller
afb5dbbf4e Update ACM to use RTPHeader instead of WebRtcRTPHeader
Bug: webrtc:5876
Change-Id: Id3311dcf508cca34495349197eeac2edf8783772
Reviewed-on: https://webrtc-review.googlesource.com/c/123188
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26729}
2019-02-18 08:01:31 +00:00
Mirko Bonadei
e45c688e67 Remove webrtc::ProtoString.
Bug: None
Change-Id: If99a977532eda41eada25f57ff0ff6fe17085986
Reviewed-on: https://webrtc-review.googlesource.com/c/122581
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26726}
2019-02-16 11:11:45 +00:00
Ruslan Burakov
4a68fb9ab4 Separate base minimum delay and minimum delay.
On NetEq level latency corresponds to delay and two terms can be used interchangeably here.

In order to implement latency constraint we need to provide a range of possible values which should be constant. See getCapabilities() here:
https://www.w3.org/TR/mediacapture-streams/#dfn-applyconstraints-algorithm

Lowest possible value accepted value is constant and equals 0. But because |packet_len_ms_| and |maximum_delay_ms_| may be updated during live of DelayManager upper bound is not constant. Moreover, due to change in |packet_len_ms_| the |minimum_delay_ms_| which was valid when its was set may be considered invalid later on.

To circumvent that and provide constant range for capabilities we separate base minimum delay and minimum delay. ApplyConstraints algorithm will set base minimum delay. Base minimum delay will act as recommendation for lower bound of minimum delay and will be used to limit target delay. If user sets base minimum delay through ApplyConstraints which is bigger than currently
possible maximum (e.g. bigger than NetEq maximum buffer size in milliseconds) then base minimum delay will be clamped to currently possible maximum to match user's intentions as best as possible.

Note, that we keep original behavior when minimum_delay_ms_ (effective_minimum_delay_ms after this CL) in LimitTargetLevel method may be above upper bound due to changing packet audio length.

Bug: webrtc:10287
Change-Id: I06b8f5cd3fd1bc36800af0447f91f7c4dc21a766
Reviewed-on: https://webrtc-review.googlesource.com/c/121700
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26666}
2019-02-13 15:54:43 +00:00
Jakob Ivarsson
e98954c35e Prevent updating state in the delay manager if the packet was reordered.
Currently, if the last packet was reordered (e.g. due to retransmission) then the next packet's inter-arrival time will be estimated incorrectly due to the jump in sequence numbers. This change prevents that by not resetting the stopwatch on reordered packets.

This will also better estimate inter-arrival times when we have multiple reordered packets in a burst. Currently we would only measure the iat of the first reordered packet correctly and not the ones coming after it.

There is a slight risk introducing this: If we would receive an out of order packet far into the future (in sequence numbers) and then continue getting packets in the normal order, then we would not update the current sequence number for these and incorrectly estimate their inter-arrival times since they would all be considered reordered.

Change-Id: Ic938a37cbddf1cb9c30b610218f56794568d3d01
Bug: webrtc:10178
Reviewed-on: https://webrtc-review.googlesource.com/c/119949
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26572}
2019-02-06 15:30:54 +00:00
Ruslan Burakov
3b50f9f9ce Propagate base minimum delay to audio_receiver_stream
Bug: webrtc:10287
Change-Id: Id7914976ef5b7eb708802119932b554d9ce4879e
Reviewed-on: https://webrtc-review.googlesource.com/c/121563
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26563}
2019-02-06 11:07:42 +00:00
Ruslan Burakov
9bee67c5c9 Add get/set base min delay to neteq and acm_receiver.
Bug: webrtc:10287
Change-Id: Ia25f11eda1e2ac65e58a060c4f5332189214e189
Reviewed-on: https://webrtc-review.googlesource.com/c/121560
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26547}
2019-02-05 13:27:59 +00:00
Ruslan Burakov
edbea46295 Allow to change base minimum delay on NetEq.
This is first step to allow to set latency
from client code in Chromium.
Existing minimum latency hasn't been used because it can clash
with video syncronization code.

Bug: webrtc:10287
Change-Id: Ia38906506069a1abfa01698dc62df283fc15cfbc
Reviewed-on: https://webrtc-review.googlesource.com/c/121423
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Cr-Commit-Position: refs/heads/master@{#26536}
2019-02-04 17:19:55 +00:00
Mirko Bonadei
05cf6be726 [clang-tidy] Apply performance-move-const-arg fixes.
This CL is a manual spin-off of [1], which tried to apply clang-tidy's
performance-move-const-arg [1] to the WebRTC codebase.

Since there are some wrong fixes to correct, this CL collects all the
fixes that could be landed as is.

[1] - https://webrtc-review.googlesource.com/c/src/+/120350
[2] - https://clang.llvm.org/extra/clang-tidy/checks/performance-move-const-arg.html

Bug: webrtc:10252
Change-Id: Ic4882213556344e65c66e27415e91ff6f89134d7
Reviewed-on: https://webrtc-review.googlesource.com/c/120814
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26515}
2019-02-01 15:02:36 +00:00
Mirko Bonadei
c84f661b10 Stop using Googletest legacy APIs.
Googletest recently started replacing the term Test Case by Test Suite.
From now on, the preferred API is TestSuite*; the older TestCase* API
will be slowly deprecated.

This CL moves WebRTC to the new set of APIs.

More info in [1].

This CL has been generated with this script:

declare -A items
items[TYPED_TEST_CASE]=TYPED_TEST_SUITE
items[TYPED_TEST_CASE_P]=TYPED_TEST_SUITE_P
items[REGISTER_TYPED_TEST_CASE_P]=REGISTER_TYPED_TEST_SUITE_P
items[INSTANTIATE_TYPED_TEST_CASE_P]=INSTANTIATE_TYPED_TEST_SUITE_P
items[INSTANTIATE_TEST_CASE_P]=INSTANTIATE_TEST_SUITE_P
for i in "${!items[@]}"
do
  git ls-files | xargs sed -i "s/\b$i\b/${items[$i]}/g"
done
git cl format

[1] - https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature

Bug: None
Change-Id: I5ae191e3046caf347aeee01554d5743548ab0e3f
Reviewed-on: https://webrtc-review.googlesource.com/c/118701
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26494}
2019-01-31 13:23:33 +00:00
Sebastian Jansson
aa01f27667 Removes all const Clock*.
This prepares for making the Clock interface fully mutable.

Calls to the time functions in Clock can have side effects in some
circumstances. It's also questionable if it's a good idea to allow
repeated calls to a const method return different values without
any changed to the class instance.

Bug: webrtc:9883
Change-Id: I96fb9230705f7c80a4c0702132fd9dc73899fc5e
Reviewed-on: https://webrtc-review.googlesource.com/c/120347
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26467}
2019-01-30 13:03:37 +00:00
Alex Loiko
7a3e43a5d7 Reland of Opus multistream.
This is a reland of
https://webrtc-review.googlesource.com/c/src/+/111750.

This time we don't use the multistream decoder unless we have to.
(Which is when #channels >2). Pros: don't make downstream projects
crash due to used up stack space, a few % more efficiency for the
typical case (because multistream adds some overhead). Cons: Messy
C-code with "union" types and #define MACROs, probably more
maintenance.

Bug: webrtc:8649
Change-Id: I4253a5e0c382f67ac7c6731dc6602a31e6779e63
Reviewed-on: https://webrtc-review.googlesource.com/c/120049
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26445}
2019-01-29 12:16:19 +00:00
Mirko Bonadei
649a4c2ea3 [clang-tidy] Apply performance-inefficient-vector-operation fixes.
This CL applies clang-tidy's performance-inefficient-vector-operation
[1] on the WebRTC codebase.

All changes in this CL are automatically generated by both clang-tidy
and 'git cl format'.

[1] - https://clang.llvm.org/extra/clang-tidy/checks/performance-inefficient-vector-operation.html

Bug: webrtc:10252
Change-Id: I824caab2a5746036852e00d714b89aa5ec030ee3
Reviewed-on: https://webrtc-review.googlesource.com/c/120052
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26442}
2019-01-29 09:45:21 +00:00
Mirko Bonadei
739baf097b [clang-tidy] Apply performance-for-range-copy fixes.
This CL applies clang-tidy's performance-for-range-copy [1] on the
WebRTC codebase.

All changes in this CL are automatically generated by both clang-tidy
and 'git cl format'.

[1] - https://clang.llvm.org/extra/clang-tidy/checks/performance-for-range-copy.html

Bug: webrtc:10215
Change-Id: I7c83290b8866d76129bbec4e24e6701f5014102e
Reviewed-on: https://webrtc-review.googlesource.com/c/120043
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26420}
2019-01-28 09:53:50 +00:00
Mirko Bonadei
d970807e0c Remove rtc_base/scoped_ref_ptr.h.
The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.

More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.

Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
2019-01-25 20:29:58 +00:00
Niels Möller
5a6ae02e90 Reland "Trim down FileWrapper class to be merely a wrapper owning a FILE*"
This is a reland of 80b95de765

Original change's description:
> Trim down FileWrapper class to be merely a wrapper owning a FILE*
> 
> Bug: webrtc:6463
> Change-Id: If71e2f3a75dc1863bc805ab71de1e2d33294f805
> Reviewed-on: https://webrtc-review.googlesource.com/c/117881
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26311}

Bug: webrtc:6463
Change-Id: I12154ef65744c1b7811974a1d871e05ed3fbbc27
Reviewed-on: https://webrtc-review.googlesource.com/c/118660
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26337}
2019-01-21 12:46:25 +00:00
Bjorn Terelius
5c2f1f053f Add some missing includes and dependencies.
In particular, time_utils.h is currently pulled in via rtc_event.h
This CL is in preparation of moving parts of the RTC event log to api/.

Bug: webrtc:10206
Change-Id: Idd35aa9404afded4d29b1296344996c45b8c2e91
Reviewed-on: https://webrtc-review.googlesource.com/c/117921
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26326}
2019-01-18 15:30:26 +00:00
Minyue Li
9dac02d939 Adding text log on actual opus bitrate.
Bug: None
Change-Id: I18b117a446fb629257af31c1c12bef52ccd4f467
Reviewed-on: https://webrtc-review.googlesource.com/c/118300
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26324}
2019-01-18 15:03:55 +00:00
Niels Moller
466472796c Revert "Trim down FileWrapper class to be merely a wrapper owning a FILE*"
This reverts commit 80b95de765.

Reason for revert: Speculative revert for downstream breakage. Possibly FileAudioDevice broken?

Original change's description:
> Trim down FileWrapper class to be merely a wrapper owning a FILE*
> 
> Bug: webrtc:6463
> Change-Id: If71e2f3a75dc1863bc805ab71de1e2d33294f805
> Reviewed-on: https://webrtc-review.googlesource.com/c/117881
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26311}

TBR=aleloi@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,tommi@webrtc.org

Change-Id: I46d37afbf9acb5f62f04e09d944114c1da96eb36
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6463
Reviewed-on: https://webrtc-review.googlesource.com/c/118380
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26318}
2019-01-18 12:04:55 +00:00
Niels Möller
80b95de765 Trim down FileWrapper class to be merely a wrapper owning a FILE*
Bug: webrtc:6463
Change-Id: If71e2f3a75dc1863bc805ab71de1e2d33294f805
Reviewed-on: https://webrtc-review.googlesource.com/c/117881
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26311}
2019-01-18 07:25:30 +00:00
Amit Hilbuch
1fa51d6905 Revert "Opus multistream."
This reverts commit 83ed89a45f.

Reason for revert: breaks downstream project

Original change's description:
> Opus multistream.
> 
> This is a backwards-compatible change. It makes WebRTC use the Opus
> multistream decoder for all Opus packets. Single-stream packets are a
> special case of multistream ones (with stream=1).
> 
> The tricky parts are 'WebRtcOpus_GetMaxPlaybackRate' and
> 'WebRtcOpus_GetSurroundParameters'. GetMaxPlaybackRate is supposed to
> do what opus_encoder_ctl(encoder, OPUS_GET_MAX_BANDWIDTH(&bandwidth))
> did when we had single-stream encoders. Now there may be several
> independent encoders with possibly different BANDWIDTH. The new
> GetMaxPlaybackRate queries all of them, and returns a playback rate if
> all the encoder's rates are equal.
> 
> WebRtcOpus_GetSurroundParameters is a configuration convention. It
> maps the number of channels to a multi-stream encoder/decoder
> configuration. As described in RFC 7845
> https://tools.ietf.org/html/rfc7845#section-5.1.1, a multi-stream
> encoder/decoder needs a number of streams, number of coupled streams
> and a 255-byte mapping array. The function GetSurroundParameters
> computes all of these from the number of channels. [1, 2, 4, 6, 8]
> channels are supported.
> 
> Bug: webrtc:8649
> Change-Id: I271de8e387d738254d6aa53af7fcf8644a53edb5
> Reviewed-on: https://webrtc-review.googlesource.com/c/111750
> Commit-Queue: Alex Loiko <aleloi@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26293}

TBR=aleloi@webrtc.org,minyue@webrtc.org

Change-Id: I1002e3273b44d3cccacdba84b8c363eefd537c4b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8649
Reviewed-on: https://webrtc-review.googlesource.com/c/118201
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26306}
2019-01-17 22:38:57 +00:00
Alex Loiko
83ed89a45f Opus multistream.
This is a backwards-compatible change. It makes WebRTC use the Opus
multistream decoder for all Opus packets. Single-stream packets are a
special case of multistream ones (with stream=1).

The tricky parts are 'WebRtcOpus_GetMaxPlaybackRate' and
'WebRtcOpus_GetSurroundParameters'. GetMaxPlaybackRate is supposed to
do what opus_encoder_ctl(encoder, OPUS_GET_MAX_BANDWIDTH(&bandwidth))
did when we had single-stream encoders. Now there may be several
independent encoders with possibly different BANDWIDTH. The new
GetMaxPlaybackRate queries all of them, and returns a playback rate if
all the encoder's rates are equal.

WebRtcOpus_GetSurroundParameters is a configuration convention. It
maps the number of channels to a multi-stream encoder/decoder
configuration. As described in RFC 7845
https://tools.ietf.org/html/rfc7845#section-5.1.1, a multi-stream
encoder/decoder needs a number of streams, number of coupled streams
and a 255-byte mapping array. The function GetSurroundParameters
computes all of these from the number of channels. [1, 2, 4, 6, 8]
channels are supported.

Bug: webrtc:8649
Change-Id: I271de8e387d738254d6aa53af7fcf8644a53edb5
Reviewed-on: https://webrtc-review.googlesource.com/c/111750
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26293}
2019-01-17 12:23:23 +00:00
Chen Xing
0acffb5b36 Expose jitterBufferEmittedCount in addition to the existing jitterBufferDelay for getStats().
NetEq currently only passes `jitterBufferDelay` to `getStats()`. We need its paired `jitterBufferEmittedCount` denominator stat for the calculations to be accurate.

Bug: webrtc:10192
Change-Id: I655aea629026ce9101409c2e0f18c2fa57a1c3ab
Reviewed-on: https://webrtc-review.googlesource.com/c/117320
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#26276}
2019-01-16 11:44:10 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Niels Möller
7289906437 Delete enum NetEqDecoder.
A trimmed down version is moved to legacy_encoded_audio_frame_unittest.cc
where it's used for test parameterization.

Bug: webrtc:10185
Change-Id: I9abda22f9806b831b6ca4b27d6bcc888285f50f2
Reviewed-on: https://webrtc-review.googlesource.com/c/116961
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26218}
2019-01-11 13:52:25 +00:00
Niels Möller
0554368eed Delete method DecoderDatabase::RegisterPayload(...NetEqDecoder...)
Bug: webrtc:10185
Change-Id: I69ce40b1c7267b039cd1d2237c5d5bbae3a81875
Reviewed-on: https://webrtc-review.googlesource.com/c/116683
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26208}
2019-01-11 07:39:45 +00:00
Niels Möller
f7d636644f Delete method NetEqImpl::CurrentDelayMs, used only by tests
Bug: None
Change-Id: If94695f60ed804f6b43be828dd93f02826269140
Reviewed-on: https://webrtc-review.googlesource.com/c/116687
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26193}
2019-01-10 12:49:12 +00:00
Jakob Ivarsson
39b934ba2e Add NetEq config flag that enables RTX handling.
When enabled, the delay manager is updated with reordered packets. It also makes the peak detector ignore the reordered packets.

Change-Id: I2bdc99764cc76b15e613ed3dc75f83aaf66eee4e
Bug: webrtc:10178
Reviewed-on: https://webrtc-review.googlesource.com/c/116481
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26187}
2019-01-10 10:04:34 +00:00
Jakob Ivarsson
00a6ab568b Check timestamp difference when choosing to extract multiple packets from the jitter buffer.
This fixes a bug where we sometimes extract an Opus CNG packet and the packet after, even though there was big timestamp gap between the packets, which causes expansion during the next GetAudio calls.

Change-Id: I2409ac08df58afc496f74b91981657b7206e8bb1
Bug: webrtc:10167
Reviewed-on: https://webrtc-review.googlesource.com/c/115419
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26179}
2019-01-09 16:21:11 +00:00
Niels Möller
9c277dd1dd Delete NetEq::RegisterExternalDecoder.
Bug: webrtc:10080
Change-Id: Ie36b10af6ab22f498636e38f36bef11f28fc7f7e
Reviewed-on: https://webrtc-review.googlesource.com/c/112081
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26174}
2019-01-09 10:38:08 +00:00
Steve Anton
40d55331d7 Include absl/memory/memory.h if absl::make_unique is used
Tbr: kwiberg@webrtc.org
Bug: None
Change-Id: Iaf4533d2ce0e80b351a8a664ef8cf7ba0e5ec583
Reviewed-on: https://webrtc-review.googlesource.com/c/115746
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Yves Gerey <yvesg@google.com>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26168}
2019-01-08 20:08:32 +00:00
Niels Möller
bd6dee89d4 Delete NetEqTest::ExtDecoderMap
Bug: webrtc:10080
Change-Id: Ica2c3b8b94bd31cd3af98b2e918dafc223c341ef
Reviewed-on: https://webrtc-review.googlesource.com/c/115417
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26164}
2019-01-08 16:25:05 +00:00
Sebastian Jansson
03fbf1eb4b Simplifies RtcEventProcessor interface.
Bug: webrtc:10170
Change-Id: Ie643e47c55b8c35ca9b8ef31eda5b1673f19d7b3
Reviewed-on: https://webrtc-review.googlesource.com/c/116066
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26160}
2019-01-08 15:16:19 +00:00
Sebastian Jansson
b290a6d767 Renames RtcEventLogParseNew to RtcEventLogParser
Bug: webrtc:10170
Change-Id: I9232c276229a64fa4d8321b6c996387fe130f68b
Reviewed-on: https://webrtc-review.googlesource.com/c/116064
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26128}
2019-01-03 19:39:04 +00:00
Minyue Li
8319e7f8ab Use ordered data structure for supported frame lengths in ANA.
The ANA frame length controller requires the provided frame lengths supported by the encoder to be ordered. A data structural guarantee of such was in an earlier version but was accidentally removed since https://codereview.webrtc.org/2429503002. This CL uses std::set to ensure that again.

Change-Id: Ia197dbf6a34f02506e81c9f49d6cd60e4cdacef4
BUG: webrtc:6303
Reviewed-on: https://webrtc-review.googlesource.com/c/115946
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26119}
2019-01-03 11:56:09 +00:00
Niels Möller
d375f1c8d1 Refactor NetEqTestFactory to not use "external" decoders
Bug: webrtc:10080
Change-Id: Icfca98d6d91fc5139e678c1aa3de1e2c35abff5c
Reviewed-on: https://webrtc-review.googlesource.com/c/115240
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26090}
2018-12-21 15:05:03 +00:00
Niels Möller
29a935a7fe Refactor NetEqDecoderPlc to use AudioDecoderProxyFactory
Bug: webrtc:10080
Change-Id: I651efc70fa020e345776c44d9510245c45f9b092
Reviewed-on: https://webrtc-review.googlesource.com/c/114547
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26067}
2018-12-20 10:17:15 +00:00
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
Fredrik Solenberg
41f3a43c74 Remove CodecInst pt.3
Finally remove CodecInst from common_types.h, including remaining code referencing it.

TBR=kwiberg

Bug: webrtc:7626
Change-Id: I5e6b949ae9093641e33972af8438d1126fc48556
Reviewed-on: https://webrtc-review.googlesource.com/c/114546
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26036}
2018-12-18 07:42:21 +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
Fredrik Solenberg
f693bfae5f Remove CodecInst pt.2
The following APIs on AudioCodingModule are deprecated with this CL:
  static int NumberOfCodecs();
  static int Codec(int, CodecInst*);
  static int Codec(const char*, CodecInst*, int, size_t);
  static int Codec(const char*, int, size_t);
  absl::optional<CodecInst> SendCodec() const;
  bool RegisterReceiveCodec(int, const SdpAudioFormat&);
  int RegisterExternalReceiveCodec(int, AudioDecoder*, int, int, const std::string&);
  int UnregisterReceiveCodec(uint8_t);
  int32_t ReceiveCodec(CodecInst*);
  absl::optional<SdpAudioFormat> ReceiveFormat();

As well as this method on RtpRtcp module:
  int32_t RegisterSendPayload(const CodecInst&);

Bug: webrtc:7626
Change-Id: I1230732136f1fe9048cf74afdeab767ca57ac9ce
Reviewed-on: https://webrtc-review.googlesource.com/c/113816
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26025}
2018-12-17 10:33:55 +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
Ivo Creusen
94f107454e Only use GetAudio events that correspond to an ssrc matching at least one incoming packet.
Using GetAudio events from SSRCs without incoming packets doesn't make sense, and should be prevented.

Bug: b/116685514
Change-Id: I48e38bb780549c71cb5f68d370a6819634ad487d
Reviewed-on: https://webrtc-review.googlesource.com/c/114321
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26017}
2018-12-14 15:05:15 +00:00
Mirko Bonadei
e10b163dd4 Stop using 'using namespace'.
This CL removes all the instances of 'using namespace' from C++ code
(more info https://abseil.io/tips/153).

Bug: webrtc:9855
Change-Id: Ic940fe87c5047742cfa6d60857d2f97be380ed18
Reviewed-on: https://webrtc-review.googlesource.com/c/113948
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25985}
2018-12-12 11:08:40 +00:00
Niels Möller
50b66d55f8 Convert NetEq Cng-related test to not use RegisterExternalDecoder
Bug: webrtc:10080
Change-Id: Ie91e967cd68efede71108458b912bf1e062ffea6
Reviewed-on: https://webrtc-review.googlesource.com/c/113943
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25982}
2018-12-12 09:19:22 +00:00
Sam Zackrisson
698d6c4f30 Change the type of indW32 back to int32_t
It was changed to size_t in https://codereview.webrtc.org/1227163003,
which makes sense if the pitch lags in the code are also guaranteed
to be non-negative. Otherwise, integer wraparounds may happen, which
causes the code to circumvent the check for too low values here:
https://cs.chromium.org/chromium/src/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c?q=webrtcisacfix_pitchfilter&sq=package:chromium&g=0&l=112



Bug: chromium:906379
Change-Id: Id88c6c38bf30059181ed593968cea29ca87adf76
Reviewed-on: https://webrtc-review.googlesource.com/c/113810
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25964}
2018-12-11 13:10:12 +00:00
Niels Möller
a1eb9c7e9b Convert NetEq tests to not use RegisterExternalDecoder.
This change converts all tests but CodecInternalCng and
DecodingErrorDuringInternalCng, which depend on the obsolete Decode
method.

Bug: webrtc:10080
Change-Id: I34b068b3aa7139ed24bd63b417a5adcfc1de7922
Reviewed-on: https://webrtc-review.googlesource.com/c/113506
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25946}
2018-12-10 13:01:21 +00:00
Fredrik Solenberg
a59db7481c Remove unnecessary includes of common_types.h
Bug: webrtc:7626
Change-Id: I2d9275e5dc8eea6419d3c80cd68c4a01deafa9b7
Reviewed-on: https://webrtc-review.googlesource.com/c/113524
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25940}
2018-12-07 21:21:13 +00:00
Niels Möller
b7180c09fc Replace RegisterExternalDecoder in NetEq test VerifyTimestampPropagation.
Bug: webrtc:10080
Change-Id: Ie93f130863115c2d288cfd9f3e273a9fbc982ed6
Reviewed-on: https://webrtc-review.googlesource.com/c/112904
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25927}
2018-12-07 09:28:47 +00:00
Fredrik Solenberg
657b296ff5 Reland "Remove CodecInst pt.1"
This is a reland of 056f9738bf

Original change's description:
> Remove CodecInst pt.1
> 
> Update audio_coding tests to not use CodecInst.
> 
> Bug: webrtc:7626
> Change-Id: I880fb8d72d7d0a915d274e67feb6106f023697c2
> Reviewed-on: https://webrtc-review.googlesource.com/c/112594
> Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25879}

Bug: webrtc:7626
Change-Id: I5d6ca0baf6230bfe9bf95c2c25496d2a56812d90
Reviewed-on: https://webrtc-review.googlesource.com/c/112942
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25902}
2018-12-05 10:38:23 +00:00
Fredrik Solenberg
ec0f45be11 Revert "Remove CodecInst pt.1"
This reverts commit 056f9738bf.

Reason for revert: breaks downstream

Original change's description:
> Remove CodecInst pt.1
> 
> Update audio_coding tests to not use CodecInst.
> 
> Bug: webrtc:7626
> Change-Id: I880fb8d72d7d0a915d274e67feb6106f023697c2
> Reviewed-on: https://webrtc-review.googlesource.com/c/112594
> Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25879}

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

Change-Id: I51d666969bcd63e2b7cb7d669ec2f59b5f8f9dde
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7626
Reviewed-on: https://webrtc-review.googlesource.com/c/112906
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25881}
2018-12-03 15:50:51 +00:00
Fredrik Solenberg
056f9738bf Remove CodecInst pt.1
Update audio_coding tests to not use CodecInst.

Bug: webrtc:7626
Change-Id: I880fb8d72d7d0a915d274e67feb6106f023697c2
Reviewed-on: https://webrtc-review.googlesource.com/c/112594
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25879}
2018-12-03 15:16:20 +00:00
Niels Möller
a0f4430b3a Replace RegisterExternalDecoder with decoder factory in NetEqImplTest120ms
Change-Id: I86b5f748f556be186f020a97fcc1211f953fd219

Bug: webrtc:10080
Change-Id: I86b5f748f556be186f020a97fcc1211f953fd219
Reviewed-on: https://webrtc-review.googlesource.com/c/112600
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25869}
2018-12-03 08:34:50 +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