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

Issue 2365653004: AudioCodingModule: Specify decoders using SdpAudioFormat (Closed)

Created:
4 years, 3 months ago by kwiberg-webrtc
Modified:
4 years, 2 months ago
Reviewers:
ossu, hlundin-webrtc
CC:
webrtc-reviews_webrtc.org, kwiberg-webrtc, tlegrand-webrtc, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, peah-webrtc, minyue-webrtc
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

AudioCodingModule: Specify decoders using SdpAudioFormat NetEq already uses SdpAudioFormat internally; this CL adds an AudioCodingModule::RegisterReceiveCodec overload that accepts SdpAudioFormat, and propagates it through AcmReceiver into NetEq. The intention is to get rid of the other ways to specify decoders and always use SdpAudioFormat. (And eventually to do the same for encoders too.) NOTRY=true BUG=5801 Committed: https://crrev.com/5adaf735dc8caba2cd082b61bc0760ce9f0450f9 Cr-Commit-Position: refs/heads/master@{#14506}

Patch Set 1 #

Total comments: 11

Patch Set 2 : rebase #

Patch Set 3 : rebase #

Patch Set 4 : review comments #

Patch Set 5 : rebase #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+286 lines, -123 lines) Patch
M webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.h View 3 chunks +6 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc View 1 2 3 4 3 chunks +20 lines, -7 lines 0 comments Download
M webrtc/modules/audio_coding/acm2/acm_receiver.h View 1 chunk +4 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/acm2/acm_receiver.cc View 1 chunk +25 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/acm2/audio_coding_module.cc View 1 2 3 2 chunks +18 lines, -0 lines 2 comments Download
M webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc View 1 2 3 4 9 chunks +107 lines, -77 lines 0 comments Download
M webrtc/modules/audio_coding/include/audio_coding_module.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/decoder_database.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/decoder_database.cc View 1 2 3 4 2 chunks +20 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/include/neteq.h View 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_impl.cc View 1 chunk +29 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc View 1 2 3 4 2 chunks +10 lines, -1 line 2 comments Download
M webrtc/modules/audio_coding/neteq/neteq_unittest.cc View 1 2 3 4 2 chunks +25 lines, -33 lines 0 comments Download

Messages

Total messages: 20 (9 generated)
kwiberg-webrtc
4 years, 2 months ago (2016-09-28 12:29:11 UTC) #3
ossu
https://codereview.webrtc.org/2365653004/diff/20001/webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc File webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc (left): https://codereview.webrtc.org/2365653004/diff/20001/webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc#oldcode108 webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc:108: acm_(webrtc::AudioCodingModule::Create(0, &clock_)), Hooray! Can we now start deprecating the ...
4 years, 2 months ago (2016-09-28 14:12:28 UTC) #4
kwiberg-webrtc
New patch set posted. https://codereview.webrtc.org/2365653004/diff/20001/webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc File webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc (left): https://codereview.webrtc.org/2365653004/diff/20001/webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc#oldcode108 webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc:108: acm_(webrtc::AudioCodingModule::Create(0, &clock_)), On 2016/09/28 14:12:28, ...
4 years, 2 months ago (2016-09-29 12:38:35 UTC) #5
ossu
lgtm, go, go, go! https://codereview.webrtc.org/2365653004/diff/20001/webrtc/modules/audio_coding/neteq/neteq_impl.cc File webrtc/modules/audio_coding/neteq/neteq_impl.cc (right): https://codereview.webrtc.org/2365653004/diff/20001/webrtc/modules/audio_coding/neteq/neteq_impl.cc#newcode288 webrtc/modules/audio_coding/neteq/neteq_impl.cc:288: case DecoderDatabase::kOK: On 2016/09/29 12:38:35, ...
4 years, 2 months ago (2016-10-03 09:16:00 UTC) #6
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/2365653004/80001
4 years, 2 months ago (2016-10-03 09:33:12 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_x86_dbg on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_compile_x86_dbg/builds/7504) ios64_gyp_dbg on master.tryserver.webrtc (JOB_FAILED, ...
4 years, 2 months ago (2016-10-03 09:34:22 UTC) #10
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/2365653004/100001
4 years, 2 months ago (2016-10-04 16:31:52 UTC) #14
commit-bot: I haz the power
Committed patchset #5 (id:100001)
4 years, 2 months ago (2016-10-04 16:33:31 UTC) #16
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/5adaf735dc8caba2cd082b61bc0760ce9f0450f9 Cr-Commit-Position: refs/heads/master@{#14506}
4 years, 2 months ago (2016-10-04 16:33:41 UTC) #18
hlundin-webrtc
LGTM, but with a question and a nit. https://codereview.webrtc.org/2365653004/diff/100001/webrtc/modules/audio_coding/acm2/audio_coding_module.cc File webrtc/modules/audio_coding/acm2/audio_coding_module.cc (right): https://codereview.webrtc.org/2365653004/diff/100001/webrtc/modules/audio_coding/acm2/audio_coding_module.cc#newcode993 webrtc/modules/audio_coding/acm2/audio_coding_module.cc:993: bool ...
4 years, 2 months ago (2016-10-05 13:39:15 UTC) #19
kwiberg-webrtc
4 years, 2 months ago (2016-10-06 09:20:47 UTC) #20
Message was sent while issue was closed.
https://codereview.webrtc.org/2365653004/diff/100001/webrtc/modules/audio_cod...
File webrtc/modules/audio_coding/acm2/audio_coding_module.cc (right):

https://codereview.webrtc.org/2365653004/diff/100001/webrtc/modules/audio_cod...
webrtc/modules/audio_coding/acm2/audio_coding_module.cc:993: bool
AudioCodingModuleImpl::RegisterReceiveCodec(
On 2016/10/05 13:39:14, hlundin-webrtc wrote:
> Why do you not have to handle the "iSAC case" like we do in the other
> RegisterReceiveCodec methods?

In principle: Because the user has previously injected (or had the option of
injecting) the factory that'll be used to instantiate the decoders. That factory
can take care of things like coupling the state of iSAC decoders with iSAC
encoders.

In practice: Because we never used the same ACM for sending and receiving, the
encoder and decoder were never coupled anyway.

https://codereview.webrtc.org/2365653004/diff/100001/webrtc/modules/audio_cod...
File webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc (right):

https://codereview.webrtc.org/2365653004/diff/100001/webrtc/modules/audio_cod...
webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc:226: constexpr int
rtp_payload_type = 0;
On 2016/10/05 13:39:14, hlundin-webrtc wrote:
> Compile-time constant => kRtpPayloadType.

That naming rule is mandatory only for variables with static storage duration.
For variables with automatic storage duration, it's optional (and since I don't
particularly like how names look in that style, I chose not to use it).

Speculation: The reason to enforce a special style for static but not automatic
constants is probably that the latter are typically used far from where they're
declared, whereas the latter are used much more locally. In this case, the
variable goes out of scope four lines after it's declared, so it isn't hard to
see what's going on even without the kNamingStyle.

Powered by Google App Engine
This is Rietveld 408576698