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

Issue 54383003: Added an "enable-audio-processor" flag and WebRtcAudioProcessor class (Closed)

Created:
7 years, 1 month ago by no longer working on chromium
Modified:
7 years ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, tommi (sloooow) - chröme
Visibility:
Public.

Description

Added an "enable-audio-processor" flag and WebRtcAudioProcessor class. This CL is a break-down CL from https://codereview.chromium.org/37793005. As the first step to move WebRtc APM to Chrome, it adds a enable-audio-processor command line flag, the WebRtcAudioProcessor class and its unittest. WebRtcAudioProcessor is not hooked up the any of the code in Chrome yet, but it will be exercised and tested by its unittest. BUG=264611 TEST=content_unittest Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=237311

Patch Set 1 : #

Patch Set 2 : added unittest #

Total comments: 20

Patch Set 3 : addressed Henrik's comment. #

Total comments: 10

Patch Set 4 : addressed Per's comments #

Total comments: 93

Patch Set 5 : addressed most of Dale's comments. #

Total comments: 8

Patch Set 6 : addressed the rest of Dale's comments #

Total comments: 16

Patch Set 7 : addressed the comments. #

Total comments: 34

Patch Set 8 : changed to base::TimeDelta and addressed Joi's comments. #

Total comments: 4

Patch Set 9 : switched to Atomic32 and removed the lock, also fixed some nits. #

Total comments: 6

Patch Set 10 : used a temp int64 and added a check #

Total comments: 38

Patch Set 11 : addressed Henrik and Joi's comments. #

Patch Set 12 : fixed the comment in content_switches.cc #

Total comments: 11

Patch Set 13 : addressed piman's comments #

Patch Set 14 : fixed the bots #

Total comments: 12

Patch Set 15 : rebased and added an include #

Total comments: 12

Patch Set 16 : addressed Henrik's comments. #

Total comments: 2

Patch Set 17 : rebased with 77803004, and fixed the order of the methods. #

Total comments: 85

Patch Set 18 : addressed Tommi's and Henriks' comments. #

Total comments: 9

Patch Set 19 : changed names to media_stream_* frm webrtc_*, and fixed two nits. #

Patch Set 20 : added one comment. #

Patch Set 21 : added one comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+830 lines, -4 lines) Patch
M chrome/browser/chromeos/login/chrome_restart_request.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +4 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +7 lines, -3 lines 0 comments Download
A content/renderer/media/media_stream_audio_processor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +138 lines, -0 lines 0 comments Download
A content/renderer/media/media_stream_audio_processor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +361 lines, -0 lines 0 comments Download
A content/renderer/media/media_stream_audio_processor_options.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +53 lines, -0 lines 0 comments Download
A content/renderer/media/media_stream_audio_processor_options.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +96 lines, -0 lines 0 comments Download
A content/renderer/media/media_stream_audio_processor_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +166 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (0 generated)
no longer working on chromium
Hello guys, could you please review this CL? As the first step to add a ...
7 years, 1 month ago (2013-10-31 17:13:11 UTC) #1
Henrik Grunell
It seems like the switch and the new class are separate, can they be done ...
7 years, 1 month ago (2013-11-01 07:22:36 UTC) #2
no longer working on chromium
https://codereview.chromium.org/54383003/diff/50001/content/public/common/content_switches.cc File content/public/common/content_switches.cc (right): https://codereview.chromium.org/54383003/diff/50001/content/public/common/content_switches.cc#newcode916 content/public/common/content_switches.cc:916: // Enable WebRtc audio processor in Chrome. On 2013/11/01 ...
7 years, 1 month ago (2013-11-01 11:44:42 UTC) #3
perkj_chrome
I think you will need a better audio level reviewer than me but here are ...
7 years, 1 month ago (2013-11-04 12:30:13 UTC) #4
no longer working on chromium
Tommi is busy, cc Tommi and add Dale. Dale, could you please review this CL? ...
7 years, 1 month ago (2013-11-04 15:28:17 UTC) #5
DaleCurtis
I'm not sure what this is. Do you have a design doc anywhere?
7 years, 1 month ago (2013-11-04 18:05:21 UTC) #6
DaleCurtis
https://codereview.chromium.org/54383003/diff/200001/content/renderer/media/webrtc_audio_processor.cc File content/renderer/media/webrtc_audio_processor.cc (right): https://codereview.chromium.org/54383003/diff/200001/content/renderer/media/webrtc_audio_processor.cc#newcode37 content/renderer/media/webrtc_audio_processor.cc:37: // Extract all these methods to a helper class. ...
7 years, 1 month ago (2013-11-06 00:21:17 UTC) #7
no longer working on chromium
Hi Dale, I have addressed most of your comments, but missing 3 of the comments ...
7 years, 1 month ago (2013-11-06 16:45:14 UTC) #8
DaleCurtis
https://codereview.chromium.org/54383003/diff/200001/content/renderer/media/webrtc_audio_processor.cc File content/renderer/media/webrtc_audio_processor.cc (right): https://codereview.chromium.org/54383003/diff/200001/content/renderer/media/webrtc_audio_processor.cc#newcode191 content/renderer/media/webrtc_audio_processor.cc:191: // TODO(xians): consider using SincResampler to save some memcpy. ...
7 years, 1 month ago (2013-11-07 01:36:00 UTC) #9
no longer working on chromium
Hi Dale, how about now? I can change the code to base::TimeDelta once you confirm ...
7 years, 1 month ago (2013-11-07 14:43:11 UTC) #10
no longer working on chromium
Avi, may I have your stamp for content*.gypi files and content/browser/renderer_host/render_process_host_impl.cc Joi, content/public. Thanks, SX
7 years, 1 month ago (2013-11-07 14:46:27 UTC) #11
DaleCurtis
https://codereview.chromium.org/54383003/diff/200001/content/renderer/media/webrtc_audio_processor.h File content/renderer/media/webrtc_audio_processor.h (right): https://codereview.chromium.org/54383003/diff/200001/content/renderer/media/webrtc_audio_processor.h#newcode62 content/renderer/media/webrtc_audio_processor.h:62: int render_delay_ms); On 2013/11/07 14:43:12, xians1 wrote: > On ...
7 years, 1 month ago (2013-11-07 20:44:08 UTC) #12
no longer working on chromium
Thanks Dale. PTAL. And a gentle ping to others. https://codereview.chromium.org/54383003/diff/450001/content/renderer/media/webrtc_audio_processor.cc File content/renderer/media/webrtc_audio_processor.cc (right): https://codereview.chromium.org/54383003/diff/450001/content/renderer/media/webrtc_audio_processor.cc#newcode62 content/renderer/media/webrtc_audio_processor.cc:62: ...
7 years, 1 month ago (2013-11-08 13:01:14 UTC) #13
Jói
https://codereview.chromium.org/54383003/diff/600001/content/public/common/content_switches.cc File content/public/common/content_switches.cc (right): https://codereview.chromium.org/54383003/diff/600001/content/public/common/content_switches.cc#newcode920 content/public/common/content_switches.cc:920: // Enables audio processing in a MediaStreamTrack ? When ...
7 years, 1 month ago (2013-11-08 13:36:39 UTC) #14
no longer working on chromium
PTAL. Thanks, SX https://codereview.chromium.org/54383003/diff/600001/content/public/common/content_switches.cc File content/public/common/content_switches.cc (right): https://codereview.chromium.org/54383003/diff/600001/content/public/common/content_switches.cc#newcode920 content/public/common/content_switches.cc:920: // Enables audio processing in a ...
7 years, 1 month ago (2013-11-08 15:39:30 UTC) #15
Jói
https://codereview.chromium.org/54383003/diff/600001/content/renderer/media/webrtc_audio_processor.h File content/renderer/media/webrtc_audio_processor.h (right): https://codereview.chromium.org/54383003/diff/600001/content/renderer/media/webrtc_audio_processor.h#newcode59 content/renderer/media/webrtc_audio_processor.h:59: void PushRenderData(const int16* render_audio, On 2013/11/08 15:39:30, xians1 wrote: ...
7 years, 1 month ago (2013-11-08 16:44:21 UTC) #16
DaleCurtis
lgtm % nits. https://codereview.chromium.org/54383003/diff/600001/content/renderer/media/webrtc_audio_processor.h File content/renderer/media/webrtc_audio_processor.h (right): https://codereview.chromium.org/54383003/diff/600001/content/renderer/media/webrtc_audio_processor.h#newcode96 content/renderer/media/webrtc_audio_processor.h:96: // TODO(xians): Can we get rid ...
7 years, 1 month ago (2013-11-08 21:00:47 UTC) #17
no longer working on chromium
Thanks Dale, I switched to Atomic32 to remove the lock. Joi, is it fine to ...
7 years, 1 month ago (2013-11-11 14:35:24 UTC) #18
Jói
LGTM with a nit. https://codereview.chromium.org/54383003/diff/820001/content/renderer/media/webrtc_audio_processor.cc File content/renderer/media/webrtc_audio_processor.cc (right): https://codereview.chromium.org/54383003/diff/820001/content/renderer/media/webrtc_audio_processor.cc#newcode209 content/renderer/media/webrtc_audio_processor.cc:209: int total_delay_ms = capture_delay.InMilliseconds() + ...
7 years, 1 month ago (2013-11-11 14:45:21 UTC) #19
no longer working on chromium
Joi, one question. https://codereview.chromium.org/54383003/diff/820001/content/renderer/media/webrtc_audio_processor.cc File content/renderer/media/webrtc_audio_processor.cc (right): https://codereview.chromium.org/54383003/diff/820001/content/renderer/media/webrtc_audio_processor.cc#newcode209 content/renderer/media/webrtc_audio_processor.cc:209: int total_delay_ms = capture_delay.InMilliseconds() + render_delay_ms; ...
7 years, 1 month ago (2013-11-11 15:04:59 UTC) #20
Jói
Since you're storing it as an int32, it would make sense to read it into ...
7 years, 1 month ago (2013-11-11 15:14:40 UTC) #21
no longer working on chromium
Hi Joi, I have added temp int64 and a check. Avi and Henrik, please take ...
7 years, 1 month ago (2013-11-11 17:38:10 UTC) #22
Jói
Instead of INT_MAX, can you use std::numeric_limits<base::subtle::Atomic32>::max() ? On Mon, Nov 11, 2013 at 5:38 ...
7 years, 1 month ago (2013-11-11 17:40:50 UTC) #23
Henrik Grunell
https://codereview.chromium.org/54383003/diff/820001/content/public/common/content_switches.cc File content/public/common/content_switches.cc (right): https://codereview.chromium.org/54383003/diff/820001/content/public/common/content_switches.cc#newcode923 content/public/common/content_switches.cc:923: // Enables audio processing in a MediaStreamTrack. When this ...
7 years, 1 month ago (2013-11-12 12:46:37 UTC) #24
no longer working on chromium
Joi, I have already replaced INT_MAX with numeric_limits<base::subtle::Atomic32>::max(). Henrik, PTAL. Avi is busy, piman, can ...
7 years, 1 month ago (2013-11-12 13:31:55 UTC) #25
no longer working on chromium
https://codereview.chromium.org/54383003/diff/820001/content/public/common/content_switches.cc File content/public/common/content_switches.cc (right): https://codereview.chromium.org/54383003/diff/820001/content/public/common/content_switches.cc#newcode923 content/public/common/content_switches.cc:923: // Enables audio processing in a MediaStreamTrack. When this ...
7 years, 1 month ago (2013-11-12 13:43:22 UTC) #26
Jói
LGTM
7 years, 1 month ago (2013-11-12 13:43:43 UTC) #27
piman
https://codereview.chromium.org/54383003/diff/1130001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/54383003/diff/1130001/content/browser/renderer_host/render_process_host_impl.cc#newcode1051 content/browser/renderer_host/render_process_host_impl.cc:1051: switches::kEnableAudioTrackProcessing, Please add to kForwardSwitches in chrome/browser/chromeos/login/chrome_restart_request.cc so that ...
7 years, 1 month ago (2013-11-12 19:51:27 UTC) #28
no longer working on chromium
Thanks Piman, PTAL. SX https://codereview.chromium.org/54383003/diff/1130001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/54383003/diff/1130001/content/browser/renderer_host/render_process_host_impl.cc#newcode1051 content/browser/renderer_host/render_process_host_impl.cc:1051: switches::kEnableAudioTrackProcessing, On 2013/11/12 19:51:27, piman ...
7 years, 1 month ago (2013-11-13 17:19:32 UTC) #29
piman
LGTM for my part, but I don't understand the threading logic, so I'm unable to ...
7 years, 1 month ago (2013-11-13 19:28:15 UTC) #30
no longer working on chromium
On 2013/11/13 19:28:15, piman wrote: > LGTM for my part, but I don't understand the ...
7 years, 1 month ago (2013-11-15 16:19:41 UTC) #31
Henrik Grunell
https://codereview.chromium.org/54383003/diff/1760001/content/renderer/media/webrtc_audio_processor.cc File content/renderer/media/webrtc_audio_processor.cc (right): https://codereview.chromium.org/54383003/diff/1760001/content/renderer/media/webrtc_audio_processor.cc#newcode144 content/renderer/media/webrtc_audio_processor.cc:144: void WebRtcAudioProcessor::SetCaptureFormat( Put the function definitions in the same ...
7 years, 1 month ago (2013-11-18 13:19:33 UTC) #32
no longer working on chromium
Henrik, PTAL. SX https://codereview.chromium.org/54383003/diff/1760001/content/renderer/media/webrtc_audio_processor.cc File content/renderer/media/webrtc_audio_processor.cc (right): https://codereview.chromium.org/54383003/diff/1760001/content/renderer/media/webrtc_audio_processor.cc#newcode144 content/renderer/media/webrtc_audio_processor.cc:144: void WebRtcAudioProcessor::SetCaptureFormat( On 2013/11/18 13:19:34, Henrik ...
7 years, 1 month ago (2013-11-18 17:41:44 UTC) #33
Henrik Grunell
https://codereview.chromium.org/54383003/diff/1760001/content/renderer/media/webrtc_audio_processor.cc File content/renderer/media/webrtc_audio_processor.cc (right): https://codereview.chromium.org/54383003/diff/1760001/content/renderer/media/webrtc_audio_processor.cc#newcode144 content/renderer/media/webrtc_audio_processor.cc:144: void WebRtcAudioProcessor::SetCaptureFormat( On 2013/11/18 17:41:46, xians1 wrote: > On ...
7 years, 1 month ago (2013-11-19 08:52:21 UTC) #34
no longer working on chromium
Henrik, how is it now? SX https://codereview.chromium.org/54383003/diff/1760001/content/renderer/media/webrtc_audio_processor.cc File content/renderer/media/webrtc_audio_processor.cc (right): https://codereview.chromium.org/54383003/diff/1760001/content/renderer/media/webrtc_audio_processor.cc#newcode144 content/renderer/media/webrtc_audio_processor.cc:144: void WebRtcAudioProcessor::SetCaptureFormat( On ...
7 years, 1 month ago (2013-11-21 15:59:24 UTC) #35
tommi (sloooow) - chröme
drive-by https://codereview.chromium.org/54383003/diff/2260001/content/renderer/media/webrtc_audio_processor.cc File content/renderer/media/webrtc_audio_processor.cc (right): https://codereview.chromium.org/54383003/diff/2260001/content/renderer/media/webrtc_audio_processor.cc#newcode114 content/renderer/media/webrtc_audio_processor.cc:114: return 1.0; add a note that explains this ...
7 years, 1 month ago (2013-11-21 19:52:02 UTC) #36
Henrik Grunell
Some more comments and questions. https://codereview.chromium.org/54383003/diff/2260001/content/public/common/content_switches.cc File content/public/common/content_switches.cc (right): https://codereview.chromium.org/54383003/diff/2260001/content/public/common/content_switches.cc#newcode936 content/public/common/content_switches.cc:936: // Ns and AGC ...
7 years, 1 month ago (2013-11-22 09:03:35 UTC) #37
no longer working on chromium
Tommi and Henrik, PTAL. SX https://codereview.chromium.org/54383003/diff/2260001/content/public/common/content_switches.cc File content/public/common/content_switches.cc (right): https://codereview.chromium.org/54383003/diff/2260001/content/public/common/content_switches.cc#newcode936 content/public/common/content_switches.cc:936: // Ns and AGC ...
7 years, 1 month ago (2013-11-22 13:27:52 UTC) #38
tommi (sloooow) - chröme
https://codereview.chromium.org/54383003/diff/2260001/content/renderer/media/webrtc_audio_processor.cc File content/renderer/media/webrtc_audio_processor.cc (right): https://codereview.chromium.org/54383003/diff/2260001/content/renderer/media/webrtc_audio_processor.cc#newcode226 content/renderer/media/webrtc_audio_processor.cc:226: if (!constraints) On 2013/11/22 13:27:53, xians1 wrote: > On ...
7 years, 1 month ago (2013-11-22 14:32:41 UTC) #39
Henrik Grunell
https://codereview.chromium.org/54383003/diff/2260001/content/renderer/media/webrtc_audio_processor.h File content/renderer/media/webrtc_audio_processor.h (right): https://codereview.chromium.org/54383003/diff/2260001/content/renderer/media/webrtc_audio_processor.h#newcode58 content/renderer/media/webrtc_audio_processor.h:58: // of the data represeted by |out| is guaranteed ...
7 years ago (2013-11-25 10:52:01 UTC) #40
no longer working on chromium
Hi Tommi and Henrik, I changed the name from webrtc_audio_processor* to media_stream_audio_processor*, and fixed two ...
7 years ago (2013-11-25 16:36:25 UTC) #41
no longer working on chromium
https://codereview.chromium.org/54383003/diff/2260001/content/renderer/media/webrtc_audio_processor.h File content/renderer/media/webrtc_audio_processor.h (right): https://codereview.chromium.org/54383003/diff/2260001/content/renderer/media/webrtc_audio_processor.h#newcode58 content/renderer/media/webrtc_audio_processor.h:58: // of the data represeted by |out| is guaranteed ...
7 years ago (2013-11-25 16:46:34 UTC) #42
no longer working on chromium
Also, FYI, it compiles with "webrtc_enabled=0"
7 years ago (2013-11-25 16:49:47 UTC) #43
tommi (sloooow) - chröme
lgtm. thanks!
7 years ago (2013-11-25 17:34:02 UTC) #44
Henrik Grunell
LGTM Make sure to file a bug for additional testing. Appreciate your patience! :) https://codereview.chromium.org/54383003/diff/2260001/content/renderer/media/webrtc_audio_processor_unittest.cc ...
7 years ago (2013-11-26 08:08:43 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/54383003/2590001
7 years ago (2013-11-26 09:10:30 UTC) #46
commit-bot: I haz the power
7 years ago (2013-11-26 10:59:53 UTC) #47
Message was sent while issue was closed.
Change committed as 237311

Powered by Google App Engine
This is Rietveld 408576698