Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Issue 2072753002: WebRtcVoiceEngine: Use AudioDecoderFactory to generate recv codecs. (Closed)

Created:
4 years, 6 months ago by ossu
Modified:
4 years, 5 months ago
Reviewers:
ivoc, tlegrand-webrtc, tommi
CC:
webrtc-reviews_webrtc.org, peah-webrtc, tlegrand-webrtc, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, kwiberg-webrtc, minyue-webrtc, the sun
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

WebRtcVoiceEngine: Use AudioDecoderFactory to generate recv codecs. Changed WebRtcVoiceEngine to present receive codecs from the formats provided by its decoder factory. Added supported formats to BuiltinAudioDecoderFactory. Added helper functions for creating some simple decoder factories for mocking. Created a PayloadTypeMapper for assigning payload types to formats. I think we'll eventually want to use this further up, or possibly in both the audio and video sides. It would be best if the engines didn't have to talk payload types at all, but it might be more difficult to get around when payload types depend on each-other, like the RTX codecs for video. This CL also includes some changes to rtc::Optional. I've put them in a separate CL that should (or should not) land first, making these changes void. See: https://codereview.webrtc.org/2072713002/ BUG=webrtc:5805 Committed: https://crrev.com/95eb1ba0db79d8fd134ae61b0a24648598684e8a Cr-Commit-Position: refs/heads/master@{#13459}

Patch Set 1 #

Total comments: 27

Patch Set 2 : Rewrote PayloadMapperTest to not rely on value comparison operators of rtc::Optional. #

Total comments: 15

Patch Set 3 : Moved CN generation into main loop in CollectRecvCodecs. Also small cleanups. #

Patch Set 4 : Fixed PayloadTypeMapper not increasing next_unused_payload_type_. #

Total comments: 5

Patch Set 5 : Combined map_format, used initializer list and improved PayloadTypeMapperTest. #

Total comments: 1

Patch Set 6 : Moved SdpAudioFormat comparator into PayloadTypeMapper for now. #

Patch Set 7 : BuiltinAudioDecoderFactory::GetSupportedFormats now considers build flags, CN codecs ordered like before CL #

Total comments: 2

Patch Set 8 : #include <functional> #

Total comments: 8

Patch Set 9 : Rebase #

Patch Set 10 : Addressed tommi's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+542 lines, -30 lines) Patch
M webrtc/media/BUILD.gn View 2 chunks +3 lines, -0 lines 0 comments Download
M webrtc/media/engine/nullwebrtcvideoengine_unittest.cc View 2 chunks +4 lines, -1 line 0 comments Download
A webrtc/media/engine/payload_type_mapper.h View 1 2 3 4 5 1 chunk +54 lines, -0 lines 0 comments Download
A webrtc/media/engine/payload_type_mapper.cc View 1 2 3 4 5 6 7 8 9 1 chunk +159 lines, -0 lines 0 comments Download
A webrtc/media/engine/payload_type_mapper_unittest.cc View 1 2 3 4 1 chunk +162 lines, -0 lines 0 comments Download
M webrtc/media/engine/webrtcmediaengine.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/media/engine/webrtcvoiceengine.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -1 line 0 comments Download
M webrtc/media/engine/webrtcvoiceengine.cc View 1 2 3 4 5 6 7 8 6 chunks +70 lines, -6 lines 0 comments Download
M webrtc/media/engine/webrtcvoiceengine_unittest.cc View 1 2 3 4 5 6 7 8 7 chunks +17 lines, -21 lines 0 comments Download
M webrtc/media/media.gyp View 2 chunks +3 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.cc View 1 2 3 4 5 6 1 chunk +25 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h View 2 chunks +40 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (28 generated)
ossu
More code reviews! \o_o/ https://codereview.webrtc.org/2072753002/diff/1/webrtc/base/optional.h File webrtc/base/optional.h (right): https://codereview.webrtc.org/2072753002/diff/1/webrtc/base/optional.h#newcode65 webrtc/base/optional.h:65: Optional(const T& value) : has_value_(true) ...
4 years, 6 months ago (2016-06-16 16:21:25 UTC) #3
ossu
Removed the rtc::Optional changes and rewrote the unittests to not rely on them, since they're ...
4 years, 6 months ago (2016-06-20 11:57:54 UTC) #4
ossu
Hi! I'm reassigning this one to you Ivo and Tina. You can fight among yourselves ...
4 years, 5 months ago (2016-07-04 13:30:14 UTC) #6
ivoc
Looks like a nice change! See some comments below. https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc File webrtc/media/engine/webrtcvoiceengine.cc (right): https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc#newcode528 webrtc/media/engine/webrtcvoiceengine.cc:528: ...
4 years, 5 months ago (2016-07-05 14:43:51 UTC) #7
ossu
https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc File webrtc/media/engine/webrtcvoiceengine.cc (right): https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc#newcode528 webrtc/media/engine/webrtcvoiceengine.cc:528: recv_codecs_ = CollectRecvCodecs(); On 2016/07/05 14:43:50, ivoc wrote: > ...
4 years, 5 months ago (2016-07-05 15:31:57 UTC) #8
ossu
https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc File webrtc/media/engine/webrtcvoiceengine.cc (right): https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc#newcode1107 webrtc/media/engine/webrtcvoiceengine.cc:1107: // TODO(ossu): Should we set this specifically for just ...
4 years, 5 months ago (2016-07-06 13:20:15 UTC) #9
ivoc
https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc File webrtc/media/engine/webrtcvoiceengine.cc (right): https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc#newcode528 webrtc/media/engine/webrtcvoiceengine.cc:528: recv_codecs_ = CollectRecvCodecs(); On 2016/07/05 15:31:56, ossu wrote: > ...
4 years, 5 months ago (2016-07-06 15:24:51 UTC) #10
ossu
https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc File webrtc/media/engine/webrtcvoiceengine.cc (right): https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc#newcode528 webrtc/media/engine/webrtcvoiceengine.cc:528: recv_codecs_ = CollectRecvCodecs(); On 2016/07/06 15:24:50, ivoc wrote: > ...
4 years, 5 months ago (2016-07-06 16:23:26 UTC) #11
ivoc
https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc File webrtc/media/engine/webrtcvoiceengine.cc (right): https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc#newcode1092 webrtc/media/engine/webrtcvoiceengine.cc:1092: auto map_format = [&mapper, &out] (const webrtc::SdpAudioFormat& format) { ...
4 years, 5 months ago (2016-07-08 12:50:33 UTC) #12
ossu
https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc File webrtc/media/engine/webrtcvoiceengine.cc (right): https://codereview.webrtc.org/2072753002/diff/1/webrtc/media/engine/webrtcvoiceengine.cc#newcode1092 webrtc/media/engine/webrtcvoiceengine.cc:1092: auto map_format = [&mapper, &out] (const webrtc::SdpAudioFormat& format) { ...
4 years, 5 months ago (2016-07-08 14:39:14 UTC) #13
ossu
After reading up on the style guide, I moved the SdpAudioFormat comparator into PayloadTypeMapper, rather ...
4 years, 5 months ago (2016-07-08 15:53:17 UTC) #14
ivoc
LGTM, nice work :) https://codereview.webrtc.org/2072753002/diff/60001/webrtc/media/engine/payload_type_mapper.cc File webrtc/media/engine/payload_type_mapper.cc (right): https://codereview.webrtc.org/2072753002/diff/60001/webrtc/media/engine/payload_type_mapper.cc#newcode21 webrtc/media/engine/payload_type_mapper.cc:21: mappings_[{"PCMU", 8000, 1}] = 0; ...
4 years, 5 months ago (2016-07-12 14:18:22 UTC) #19
ossu
Thanks! :) Bumped into a couple of issues highlighted when running the tests on android. ...
4 years, 5 months ago (2016-07-12 15:49:49 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2072753002/140001
4 years, 5 months ago (2016-07-13 09:05:47 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/6832)
4 years, 5 months ago (2016-07-13 09:17:18 UTC) #33
ossu
Hey! This one needs owner approval and most people are on vacation. PTAL.
4 years, 5 months ago (2016-07-13 11:08:19 UTC) #35
tommi
rs lgtm % nits and questions https://codereview.webrtc.org/2072753002/diff/140001/webrtc/media/engine/payload_type_mapper.cc File webrtc/media/engine/payload_type_mapper.cc (right): https://codereview.webrtc.org/2072753002/diff/140001/webrtc/media/engine/payload_type_mapper.cc#newcode19 webrtc/media/engine/payload_type_mapper.cc:19: : next_unused_payload_type_(96), what's ...
4 years, 5 months ago (2016-07-13 11:23:58 UTC) #36
ossu
https://codereview.webrtc.org/2072753002/diff/140001/webrtc/media/engine/payload_type_mapper.cc File webrtc/media/engine/payload_type_mapper.cc (right): https://codereview.webrtc.org/2072753002/diff/140001/webrtc/media/engine/payload_type_mapper.cc#newcode19 webrtc/media/engine/payload_type_mapper.cc:19: : next_unused_payload_type_(96), On 2016/07/13 11:23:58, tommi-webrtc wrote: > what's ...
4 years, 5 months ago (2016-07-13 11:48:17 UTC) #38
tommi
On 2016/07/13 11:48:17, ossu wrote: > https://codereview.webrtc.org/2072753002/diff/140001/webrtc/media/engine/payload_type_mapper.cc > File webrtc/media/engine/payload_type_mapper.cc (right): > > https://codereview.webrtc.org/2072753002/diff/140001/webrtc/media/engine/payload_type_mapper.cc#newcode19 > ...
4 years, 5 months ago (2016-07-13 11:58:21 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2072753002/200001
4 years, 5 months ago (2016-07-13 13:03:45 UTC) #46
commit-bot: I haz the power
Committed patchset #10 (id:200001)
4 years, 5 months ago (2016-07-13 13:05:32 UTC) #48
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/95eb1ba0db79d8fd134ae61b0a24648598684e8a Cr-Commit-Position: refs/heads/master@{#13459}
4 years, 5 months ago (2016-07-13 13:05:41 UTC) #50
ossu
4 years, 5 months ago (2016-07-13 13:31:15 UTC) #51
Message was sent while issue was closed.
A revert of this CL (patchset #10 id:200001) has been created in
https://codereview.webrtc.org/2151453002/ by ossu@webrtc.org.

The reason for reverting is: For some reason, payload_type_mapper.cc is not
being picked up in Chrome builds, leading to undefined references. Reverting
while investigating..

Powered by Google App Engine
This is Rietveld 408576698