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

Issue 2778783002: AecDump interface (Closed)

Created:
3 years, 8 months ago by aleloi
Modified:
3 years, 7 months ago
Reviewers:
the sun, peah-webrtc
CC:
webrtc-reviews_webrtc.org, AleBzk, Andrew MacDonald, aleloi, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, kwiberg-webrtc, minyue-webrtc, aluebs-webrtc, bjornv1
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

AudioProcessingModule has a feature to make a recording of its configuration, inputs and outputs over a period of time. It is activated by AudioProcessing::StartRecording. The data is stored in binary protobuf format in a specified file. The file IO is, as of this CL, done from the real-time audio thread. This CL contains an interface for AecDump, a new APM submodule that will handle the recordings. Calls to the new interface from the AudioProcessingModule are added. These calls have no effect, and for a short while, audio_processing_impl.cc will contain two copies of recording calls. The original calls are guarded by the WEBRTC_AUDIOPROC_DEBUG_DUMP preprocessor define. They still have an effect, while the new ones do not. In the following CLs, the old recording calls will be removed, and an implementation of AecDump added. The reasons for the refactoring is to move file IO operations from the real-time audio thread, to add a top-level low-priority task queue for logging tasks like this, to simplify and modularize audio_processing_impl.cc and remove some of the preprocessor directives. These goals will be archived by the upcoming CLs. The implementation is in https://codereview.webrtc.org/2865113002. BUG=webrtc:7404 Review-Url: https://codereview.webrtc.org/2778783002 Cr-Commit-Position: refs/heads/master@{#18233} Committed: https://chromium.googlesource.com/external/webrtc/+/868f32f4230140c72a7b7abd6c3a5bb9d7feef67

Patch Set 1 : Implemented most of Karl's suggestions. #

Total comments: 63

Patch Set 2 : Next version; large changes to interface. #

Total comments: 30

Patch Set 3 : Removed factory and empty impl. #

Total comments: 11

Patch Set 4 : Small changes in response to reviewer comments. #

Total comments: 20

Patch Set 5 : vector -> array, split WriteConfigMessage, minor fixes. #

Total comments: 13

Patch Set 6 : Reorder, reduce code duplication, improve readability. #

Total comments: 12

Patch Set 7 : Put capture logging in methods. #

Total comments: 16

Patch Set 8 : New FloatAudioFrame class for passing float** audio. #

Total comments: 15

Patch Set 9 : Renamed new Start/Stop DebugRecording into Attach/Detach AecDump. #

Total comments: 9

Patch Set 10 : Update to changed CaptureStreamInfo interface. #

Total comments: 16

Patch Set 11 : Update comments and naming to reflect new usage. #

Total comments: 8

Patch Set 12 : Fix locks. #

Total comments: 1

Patch Set 13 : Default unique_ptr constructor. #

Total comments: 16

Patch Set 14 : Moved 'forced' config logic from AecDump to AudioProcessingImpl. Plus minor other issues. #

Total comments: 9

Patch Set 15 : Minor changes. #

Patch Set 16 : Comment formatting. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+467 lines, -5 lines) Patch
M webrtc/modules/audio_processing/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +12 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +39 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 11 chunks +188 lines, -5 lines 0 comments Download
A webrtc/modules/audio_processing/include/aec_dump.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +141 lines, -0 lines 0 comments Download
A webrtc/modules/audio_processing/include/aec_dump.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +40 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/include/audio_processing.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +21 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/include/audio_processing.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +21 lines, -0 lines 0 comments Download
M webrtc/modules/audio_processing/include/mock_audio_processing.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 168 (120 generated)
aleloi
PTAL!
3 years, 8 months ago (2017-03-27 13:58:11 UTC) #23
the sun
https://codereview.webrtc.org/2778783002/diff/140001/webrtc/media/engine/webrtcvoiceengine.cc File webrtc/media/engine/webrtcvoiceengine.cc (right): https://codereview.webrtc.org/2778783002/diff/140001/webrtc/media/engine/webrtcvoiceengine.cc#newcode1002 webrtc/media/engine/webrtcvoiceengine.cc:1002: if (apm()->StartDebugRecording(aec_dump_file_stream, max_size_bytes, Could we get rid of these ...
3 years, 8 months ago (2017-03-28 22:35:29 UTC) #29
tommi
Just checking - will this fix the "io on the audio thread" bug? Great if ...
3 years, 8 months ago (2017-03-29 06:44:45 UTC) #30
peah-webrtc
Great work! I have some comments though! https://codereview.webrtc.org/2778783002/diff/140001/webrtc/modules/audio_processing/aec_dumper/BUILD.gn File webrtc/modules/audio_processing/aec_dumper/BUILD.gn (right): https://codereview.webrtc.org/2778783002/diff/140001/webrtc/modules/audio_processing/aec_dumper/BUILD.gn#newcode2 webrtc/modules/audio_processing/aec_dumper/BUILD.gn:2: import("../../../webrtc.gni") Should ...
3 years, 8 months ago (2017-03-31 07:24:43 UTC) #31
the sun
Some unsolicited comments which you'll love! https://codereview.webrtc.org/2778783002/diff/140001/webrtc/modules/audio_processing/aec_dumper/aec_dumper.h File webrtc/modules/audio_processing/aec_dumper/aec_dumper.h (right): https://codereview.webrtc.org/2778783002/diff/140001/webrtc/modules/audio_processing/aec_dumper/aec_dumper.h#newcode36 webrtc/modules/audio_processing/aec_dumper/aec_dumper.h:36: struct InternalAPMConfig { ...
3 years, 8 months ago (2017-04-03 14:33:02 UTC) #32
peah-webrtc
https://codereview.webrtc.org/2778783002/diff/140001/webrtc/modules/audio_processing/aec_dumper/aec_dumper.h File webrtc/modules/audio_processing/aec_dumper/aec_dumper.h (right): https://codereview.webrtc.org/2778783002/diff/140001/webrtc/modules/audio_processing/aec_dumper/aec_dumper.h#newcode62 webrtc/modules/audio_processing/aec_dumper/aec_dumper.h:62: class AecDumper { On 2017/04/03 14:33:02, the sun wrote: ...
3 years, 8 months ago (2017-04-05 04:41:50 UTC) #33
aleloi
I've responded to the comments and uploaded a new version. PTAL! https://codereview.webrtc.org/2778783002/diff/140001/webrtc/media/engine/webrtcvoiceengine.cc File webrtc/media/engine/webrtcvoiceengine.cc (right): ...
3 years, 8 months ago (2017-04-06 15:46:12 UTC) #48
the sun
Quick reply to clear up a misunderstanding. I'll take a closer look... https://codereview.webrtc.org/2778783002/diff/140001/webrtc/modules/audio_processing/aec_dumper/aec_dumper.h File webrtc/modules/audio_processing/aec_dumper/aec_dumper.h ...
3 years, 8 months ago (2017-04-06 17:39:37 UTC) #51
peah-webrtc
Thanks for the new patch. I have some further comments. https://codereview.webrtc.org/2778783002/diff/140001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/140001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode309 ...
3 years, 8 months ago (2017-04-07 12:57:16 UTC) #52
aleloi
New patch set and responses to comments. https://codereview.webrtc.org/2778783002/diff/140001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/140001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode309 webrtc/modules/audio_processing/audio_processing_impl.cc:309: aec_dumper_(AecDumper::CreateNullDumper()), On ...
3 years, 8 months ago (2017-04-12 11:05:30 UTC) #55
the sun
Looking pretty good. Can we get rid of the Internal... structs? https://codereview.webrtc.org/2778783002/diff/300001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): ...
3 years, 8 months ago (2017-04-18 08:46:12 UTC) #56
aleloi
Thanks for the comments! I've made some small changes. I think it will be difficult ...
3 years, 8 months ago (2017-04-18 14:08:15 UTC) #58
aleloi
I've looked carefully at the locking scheme. It's safe as it is now: * The ...
3 years, 8 months ago (2017-04-19 09:13:40 UTC) #63
peah-webrtc
Great! Thanks for the new version. I have added some comments. PTAL. https://codereview.webrtc.org/2778783002/diff/340001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc ...
3 years, 8 months ago (2017-04-19 12:30:29 UTC) #64
aleloi
Thanks for the comments, here is a new version! https://codereview.webrtc.org/2778783002/diff/340001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/340001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode848 webrtc/modules/audio_processing/audio_processing_impl.cc:848: ...
3 years, 8 months ago (2017-04-20 15:26:24 UTC) #70
peah-webrtc
Hi, Thanks for the patch! Looks great! I have some more comments though. https://codereview.webrtc.org/2778783002/diff/440001/webrtc/modules/audio_processing/audio_processing_impl.cc File ...
3 years, 8 months ago (2017-04-21 05:15:05 UTC) #78
aleloi
Thanks for the comments! Now there is less code duplication and the verbosity is hidden. ...
3 years, 8 months ago (2017-04-21 13:47:55 UTC) #82
peah-webrtc
Thanks for the new patch! Here are some more comments. https://codereview.webrtc.org/2778783002/diff/440001/webrtc/modules/audio_processing/include/aec_dump.h File webrtc/modules/audio_processing/include/aec_dump.h (right): https://codereview.webrtc.org/2778783002/diff/440001/webrtc/modules/audio_processing/include/aec_dump.h#newcode82 ...
3 years, 8 months ago (2017-04-21 14:05:15 UTC) #83
aleloi
All done, PTAL! https://codereview.webrtc.org/2778783002/diff/480001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/480001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode133 webrtc/modules/audio_processing/audio_processing_impl.cc:133: constexpr size_t kMaxNumChannels = 4; On ...
3 years, 8 months ago (2017-04-24 11:10:09 UTC) #87
peah-webrtc
Great! The partitioning of the aecdump functionality into separate methods looks great! lgtm, but please ...
3 years, 7 months ago (2017-04-25 21:04:46 UTC) #92
aleloi
https://codereview.webrtc.org/2778783002/diff/520001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/520001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode865 webrtc/modules/audio_processing/audio_processing_impl.cc:865: aec_dump_ ? RecordUnprocessedCaptureStream(src) : nullptr; On 2017/04/25 21:04:46, peah-webrtc ...
3 years, 7 months ago (2017-04-26 09:16:49 UTC) #96
the sun
Incomplete feedback, but there's one thing you probably want to fix so I'm sending it ...
3 years, 7 months ago (2017-04-28 11:06:00 UTC) #100
peah-webrtc
https://codereview.webrtc.org/2778783002/diff/520001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/520001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode133 webrtc/modules/audio_processing/audio_processing_impl.cc:133: constexpr size_t kMaxNumChannelsToRecord = 4; On 2017/04/28 11:06:00, the ...
3 years, 7 months ago (2017-04-28 11:21:10 UTC) #101
kwiberg-webrtc
https://codereview.webrtc.org/2778783002/diff/520001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/520001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode187 webrtc/modules/audio_processing/audio_processing_impl.cc:187: return rtc::ArrayView<rtc::ArrayView<const float>>(&array_stream_view[0], On 2017/04/28 11:06:00, the sun wrote: ...
3 years, 7 months ago (2017-04-28 12:13:06 UTC) #102
aleloi
PTAL at the latest patch set! There are also (not yet completely finalized) dependent CLs ...
3 years, 7 months ago (2017-05-03 13:58:19 UTC) #105
kwiberg-webrtc
Just a quick drive-by comment. https://codereview.webrtc.org/2778783002/diff/640001/webrtc/modules/audio_processing/include/aec_dump.h File webrtc/modules/audio_processing/include/aec_dump.h (right): https://codereview.webrtc.org/2778783002/diff/640001/webrtc/modules/audio_processing/include/aec_dump.h#newcode73 webrtc/modules/audio_processing/include/aec_dump.h:73: size_t channel_size) These are ...
3 years, 7 months ago (2017-05-03 18:57:57 UTC) #108
peah-webrtc
Hi, This looks really nice! Awesome! I have some more comments. https://codereview.webrtc.org/2778783002/diff/640001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): ...
3 years, 7 months ago (2017-05-04 06:19:08 UTC) #109
aleloi
https://codereview.webrtc.org/2778783002/diff/640001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/640001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode2004 webrtc/modules/audio_processing/audio_processing_impl.cc:2004: void AudioProcessingImpl::PopulateStreamInfoWithConfig( On 2017/05/04 06:19:08, peah-webrtc wrote: > This ...
3 years, 7 months ago (2017-05-04 08:56:41 UTC) #110
peah-webrtc
Thanks for the update! I have some more comments/questions. PTAL. https://codereview.webrtc.org/2778783002/diff/640001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/640001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode2008 ...
3 years, 7 months ago (2017-05-04 10:57:53 UTC) #119
aleloi
Thanks for the comments! https://codereview.webrtc.org/2778783002/diff/680001/webrtc/modules/audio_processing/include/aec_dump.h File webrtc/modules/audio_processing/include/aec_dump.h (right): https://codereview.webrtc.org/2778783002/diff/680001/webrtc/modules/audio_processing/include/aec_dump.h#newcode106 webrtc/modules/audio_processing/include/aec_dump.h:106: // AecDump::GetCaptureStreamInfo. Add the input ...
3 years, 7 months ago (2017-05-04 11:35:00 UTC) #120
peah-webrtc
Some more comments. https://codereview.webrtc.org/2778783002/diff/680001/webrtc/modules/audio_processing/include/aec_dump.h File webrtc/modules/audio_processing/include/aec_dump.h (right): https://codereview.webrtc.org/2778783002/diff/680001/webrtc/modules/audio_processing/include/aec_dump.h#newcode108 webrtc/modules/audio_processing/include/aec_dump.h:108: class CaptureStreamInfo { On 2017/05/04 11:34:59, ...
3 years, 7 months ago (2017-05-04 14:41:05 UTC) #121
aleloi
PTAL on the changes of AecDump to make it non-polymorphic. See also the implementation CL ...
3 years, 7 months ago (2017-05-08 15:00:29 UTC) #127
the sun
On 2017/05/08 15:00:29, aleloi wrote: > PTAL on the changes of AecDump to make it ...
3 years, 7 months ago (2017-05-08 20:41:57 UTC) #128
peah-webrtc
On 2017/05/08 20:41:57, the sun wrote: > On 2017/05/08 15:00:29, aleloi wrote: > > PTAL ...
3 years, 7 months ago (2017-05-08 21:05:42 UTC) #129
peah-webrtc
Hi, Thanks for the new patch! I have some more comments. PTAL https://codereview.webrtc.org/2778783002/diff/760001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc ...
3 years, 7 months ago (2017-05-15 05:32:51 UTC) #134
peah-webrtc
https://codereview.webrtc.org/2778783002/diff/760001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/760001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode1966 webrtc/modules/audio_processing/audio_processing_impl.cc:1966: stream_info->AddInput(FloatAudioFrame(src, num_channels, channel_size)); On 2017/05/15 05:32:51, peah-webrtc wrote: > ...
3 years, 7 months ago (2017-05-15 05:57:07 UTC) #135
peah-webrtc
https://codereview.webrtc.org/2778783002/diff/760001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/760001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode1966 webrtc/modules/audio_processing/audio_processing_impl.cc:1966: stream_info->AddInput(FloatAudioFrame(src, num_channels, channel_size)); On 2017/05/15 05:57:07, peah-webrtc wrote: > ...
3 years, 7 months ago (2017-05-15 07:25:19 UTC) #136
aleloi
PTAL on the latest changes to interface & implementation! https://codereview.webrtc.org/2778783002/diff/760001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/760001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode1109 webrtc/modules/audio_processing/audio_processing_impl.cc:1109: ...
3 years, 7 months ago (2017-05-15 13:20:52 UTC) #148
peah-webrtc
Nice! Awesome! lgtm, but conditioned on that you address the issue in AttachAecDump and also ...
3 years, 7 months ago (2017-05-16 04:55:18 UTC) #149
aleloi
Thanks for the comments. I'll see if the interface can be landed tomorrow. https://codereview.webrtc.org/2778783002/diff/840001/webrtc/modules/audio_processing/audio_processing_impl.cc File ...
3 years, 7 months ago (2017-05-16 20:12:06 UTC) #150
peah-webrtc
Great! Awesome work! Still lgtm, I have one small comment though. https://codereview.webrtc.org/2778783002/diff/880001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): ...
3 years, 7 months ago (2017-05-17 04:43:02 UTC) #154
the sun
https://codereview.webrtc.org/2778783002/diff/900001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/900001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode1574 webrtc/modules/audio_processing/audio_processing_impl.cc:1574: old_aec_dump = std::move(aec_dump_); We don't have to use std::move ...
3 years, 7 months ago (2017-05-22 22:32:56 UTC) #155
peah-webrtc
https://codereview.webrtc.org/2778783002/diff/900001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/900001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode1978 webrtc/modules/audio_processing/audio_processing_impl.cc:1978: aec_dump_->WriteConfig(CollectApmConfig(), false); On 2017/05/22 22:32:55, the sun wrote: > ...
3 years, 7 months ago (2017-05-23 06:15:28 UTC) #156
aleloi
PTAL on latest (minor) changes and responses to comments. https://codereview.webrtc.org/2778783002/diff/900001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/900001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode1574 webrtc/modules/audio_processing/audio_processing_impl.cc:1574: ...
3 years, 7 months ago (2017-05-23 10:39:05 UTC) #157
the sun
lgtm % comments https://codereview.webrtc.org/2778783002/diff/920001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/920001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode1611 webrtc/modules/audio_processing/audio_processing_impl.cc:1611: RTC_DCHECK(aec_dump); super nit: DCHECK before the ...
3 years, 7 months ago (2017-05-23 12:00:22 UTC) #158
aleloi
https://codereview.webrtc.org/2778783002/diff/920001/webrtc/modules/audio_processing/audio_processing_impl.cc File webrtc/modules/audio_processing/audio_processing_impl.cc (right): https://codereview.webrtc.org/2778783002/diff/920001/webrtc/modules/audio_processing/audio_processing_impl.cc#newcode1611 webrtc/modules/audio_processing/audio_processing_impl.cc:1611: RTC_DCHECK(aec_dump); On 2017/05/23 12:00:22, the sun wrote: > super ...
3 years, 7 months ago (2017-05-23 12:24:10 UTC) #161
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/2778783002/980001
3 years, 7 months ago (2017-05-23 12:55:18 UTC) #165
commit-bot: I haz the power
3 years, 7 months ago (2017-05-23 14:20:17 UTC) #168
Message was sent while issue was closed.
Committed patchset #16 (id:980001) as
https://chromium.googlesource.com/external/webrtc/+/868f32f4230140c72a7b7abd6...

Powered by Google App Engine
This is Rietveld 408576698