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

Issue 314713002: Modifies AudioInputCallback::OnData and use media::AudioBus instead of plain byte vector (Closed)

Created:
6 years, 6 months ago by henrika (OOO until Aug 14)
Modified:
6 years, 6 months ago
CC:
chromium-reviews, fischman+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, miu+watch_chromium.org
Visibility:
Public.

Description

Modifies AudioInputCallback::OnData and use media::AudioBus instead of plain byte vector BUG=375155 TEST=WebRTC and WebSpeech demos Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=277794

Patch Set 1 #

Total comments: 6

Patch Set 2 : rebased and git cl format #

Patch Set 3 : Now uses AudioBus::WrapMemory instead of From/ToInterleaved #

Total comments: 9

Patch Set 4 : xians@ #

Total comments: 3

Patch Set 5 : Added support for ScopedVector in browser side #

Patch Set 6 : AudioBus now also used for WebSpeech clients #

Patch Set 7 : Fixed fake input stream as well #

Total comments: 1

Patch Set 8 : nits #

Total comments: 3

Patch Set 9 : Minor changes based on feedback from Dale #

Patch Set 10 : Chrome now builds and works for Windows as well #

Patch Set 11 : Fixed disabled unit test for Windows #

Patch Set 12 : Added support for Mac OS X #

Patch Set 13 : Added initial support for Android (unit test remains) #

Patch Set 14 : Now works for content_unittests as well #

Patch Set 15 : Fixed disabled Android unit tests #

Patch Set 16 : fixed SpeechRecognitionBrowserTest #

Total comments: 10

Patch Set 17 : final review comments #

Patch Set 18 : Fixed Chrome OS #

Patch Set 19 : More Chrome OS fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+399 lines, -282 lines) Patch
M content/browser/media/capture/web_contents_audio_input_stream_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_renderer_host.h View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_renderer_host.cc View 1 2 3 4 5 6 7 8 9 10 12 4 chunks +7 lines, -7 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_sync_writer.h View 1 2 3 4 3 chunks +16 lines, -6 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_sync_writer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +31 lines, -12 lines 0 comments Download
M content/browser/speech/speech_recognition_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -3 lines 0 comments Download
M content/browser/speech/speech_recognizer_impl.h View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/speech/speech_recognizer_impl.cc View 1 2 3 4 5 3 chunks +7 lines, -11 lines 0 comments Download
M content/browser/speech/speech_recognizer_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 13 chunks +29 lines, -22 lines 0 comments Download
M media/audio/agc_audio_stream.h View 3 chunks +0 lines, -4 lines 0 comments Download
M media/audio/alsa/alsa_input.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/audio/alsa/alsa_input.cc View 1 2 chunks +8 lines, -3 lines 0 comments Download
M media/audio/android/audio_android_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +21 lines, -15 lines 0 comments Download
M media/audio/android/audio_record_input.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -0 lines 0 comments Download
M media/audio/android/audio_record_input.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +11 lines, -4 lines 0 comments Download
M media/audio/android/opensles_input.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -0 lines 0 comments Download
M media/audio/android/opensles_input.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +9 lines, -6 lines 0 comments Download
M media/audio/audio_input_controller.h View 1 2 3 4 5 5 chunks +11 lines, -12 lines 0 comments Download
M media/audio/audio_input_controller.cc View 1 2 3 4 5 5 chunks +12 lines, -14 lines 0 comments Download
M media/audio/audio_input_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +8 lines, -8 lines 0 comments Download
M media/audio/audio_input_device.cc View 1 2 3 4 5 5 chunks +21 lines, -13 lines 0 comments Download
M media/audio/audio_input_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M media/audio/audio_io.h View 1 chunk +3 lines, -2 lines 0 comments Download
M media/audio/audio_low_latency_input_output_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +9 lines, -8 lines 0 comments Download
M media/audio/cras/cras_input.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M media/audio/cras/cras_input.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +5 lines, -1 line 0 comments Download
M media/audio/cras/cras_input_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +3 lines, -7 lines 0 comments Download
M media/audio/fake_audio_input_stream.h View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M media/audio/fake_audio_input_stream.cc View 1 2 3 4 5 6 4 chunks +13 lines, -6 lines 0 comments Download
M media/audio/mac/audio_input_mac.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
M media/audio/mac/audio_input_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -7 lines 0 comments Download
M media/audio/mac/audio_low_latency_input_mac.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -0 lines 0 comments Download
M media/audio/mac/audio_low_latency_input_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +13 lines, -11 lines 0 comments Download
M media/audio/mac/audio_low_latency_input_mac_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +17 lines, -18 lines 0 comments Download
M media/audio/pulse/pulse_input.h View 1 chunk +2 lines, -0 lines 0 comments Download
M media/audio/pulse/pulse_input.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -2 lines 0 comments Download
M media/audio/pulse/pulse_output.h View 2 chunks +3 lines, -0 lines 0 comments Download
M media/audio/pulse/pulse_output.cc View 6 chunks +6 lines, -8 lines 0 comments Download
M media/audio/virtual_audio_input_stream.cc View 1 1 chunk +1 line, -8 lines 0 comments Download
M media/audio/virtual_audio_input_stream_unittest.cc View 1 2 chunks +8 lines, -8 lines 0 comments Download
M media/audio/win/audio_low_latency_input_win.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M media/audio/win/audio_low_latency_input_win.cc View 1 2 3 4 5 6 7 8 9 4 chunks +12 lines, -12 lines 0 comments Download
M media/audio/win/audio_low_latency_input_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 13 chunks +35 lines, -25 lines 0 comments Download
M media/audio/win/wavein_input_win.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M media/audio/win/wavein_input_win.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +11 lines, -7 lines 0 comments Download
M media/base/audio_bus.h View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
henrika (OOO until Aug 14)
https://codereview.chromium.org/314713002/diff/1/content/browser/renderer_host/media/audio_input_sync_writer.cc File content/browser/renderer_host/media/audio_input_sync_writer.cc (right): https://codereview.chromium.org/314713002/diff/1/content/browser/renderer_host/media/audio_input_sync_writer.cc#newcode71 content/browser/renderer_host/media/audio_input_sync_writer.cc:71: data->ToInterleaved(data->frames(), params_.bits_per_sample() / 8, Can we do something here ...
6 years, 6 months ago (2014-06-03 14:43:51 UTC) #1
DaleCurtis
https://codereview.chromium.org/314713002/diff/1/content/browser/renderer_host/media/audio_input_sync_writer.cc File content/browser/renderer_host/media/audio_input_sync_writer.cc (right): https://codereview.chromium.org/314713002/diff/1/content/browser/renderer_host/media/audio_input_sync_writer.cc#newcode71 content/browser/renderer_host/media/audio_input_sync_writer.cc:71: data->ToInterleaved(data->frames(), params_.bits_per_sample() / 8, On 2014/06/03 14:43:51, henrika wrote: ...
6 years, 6 months ago (2014-06-03 21:03:05 UTC) #2
henrika (OOO until Aug 14)
https://codereview.chromium.org/314713002/diff/1/content/browser/renderer_host/media/audio_input_sync_writer.cc File content/browser/renderer_host/media/audio_input_sync_writer.cc (right): https://codereview.chromium.org/314713002/diff/1/content/browser/renderer_host/media/audio_input_sync_writer.cc#newcode71 content/browser/renderer_host/media/audio_input_sync_writer.cc:71: data->ToInterleaved(data->frames(), params_.bits_per_sample() / 8, Thanks Dale! I will use ...
6 years, 6 months ago (2014-06-04 07:50:23 UTC) #3
henrika (OOO until Aug 14)
Dale, could you please check the essential parts (AudioBus::WrapMemory) in #3. I hope I got ...
6 years, 6 months ago (2014-06-04 11:57:07 UTC) #4
henrika (OOO until Aug 14)
https://codereview.chromium.org/314713002/diff/40001/content/browser/renderer_host/media/audio_input_renderer_host.cc File content/browser/renderer_host/media/audio_input_renderer_host.cc (right): https://codereview.chromium.org/314713002/diff/40001/content/browser/renderer_host/media/audio_input_renderer_host.cc#newcode298 content/browser/renderer_host/media/audio_input_renderer_host.cc:298: const uint32 segment_size = (sizeof(media::AudioInputBufferParameters) + ..and here https://codereview.chromium.org/314713002/diff/40001/content/browser/renderer_host/media/audio_input_sync_writer.cc ...
6 years, 6 months ago (2014-06-04 11:58:50 UTC) #5
no longer working on chromium
Thanks Henrik, it looks really good, but it seems some more work is needed on ...
6 years, 6 months ago (2014-06-04 12:38:13 UTC) #6
henrika (OOO until Aug 14)
Minor changes based on quick review by xians. https://codereview.chromium.org/314713002/diff/40001/content/browser/renderer_host/media/audio_input_sync_writer.cc File content/browser/renderer_host/media/audio_input_sync_writer.cc (right): https://codereview.chromium.org/314713002/diff/40001/content/browser/renderer_host/media/audio_input_sync_writer.cc#newcode72 content/browser/renderer_host/media/audio_input_sync_writer.cc:72: buffer->params.size ...
6 years, 6 months ago (2014-06-04 13:52:32 UTC) #7
DaleCurtis
WrapMemory changes look good modulo pre-construction. https://codereview.chromium.org/314713002/diff/60001/content/browser/renderer_host/media/audio_input_sync_writer.cc File content/browser/renderer_host/media/audio_input_sync_writer.cc (right): https://codereview.chromium.org/314713002/diff/60001/content/browser/renderer_host/media/audio_input_sync_writer.cc#newcode26 content/browser/renderer_host/media/audio_input_sync_writer.cc:26: DVLOG(1) << __FUNCTION__; ...
6 years, 6 months ago (2014-06-04 17:39:17 UTC) #8
henrika (OOO until Aug 14)
https://codereview.chromium.org/314713002/diff/140001/media/audio/audio_low_latency_input_output_unittest.cc File media/audio/audio_low_latency_input_output_unittest.cc (right): https://codereview.chromium.org/314713002/diff/140001/media/audio/audio_low_latency_input_output_unittest.cc#newcode213 media/audio/audio_low_latency_input_output_unittest.cc:213: // Store the captured audio packet in a seekable ...
6 years, 6 months ago (2014-06-10 15:08:34 UTC) #9
henrika (OOO until Aug 14)
Dale and Shijing. I have now: - fixed the memory handling and ensured that we ...
6 years, 6 months ago (2014-06-10 15:12:25 UTC) #10
henrika (OOO until Aug 14)
https://codereview.chromium.org/314713002/diff/160001/media/audio/audio_low_latency_input_output_unittest.cc File media/audio/audio_low_latency_input_output_unittest.cc (right): https://codereview.chromium.org/314713002/diff/160001/media/audio/audio_low_latency_input_output_unittest.cc#newcode87 media/audio/audio_low_latency_input_output_unittest.cc:87: /* This complete test is actually disabled. I only ...
6 years, 6 months ago (2014-06-10 15:14:06 UTC) #11
DaleCurtis
Style looks fine to me, let me know when it's ready for full review. https://codereview.chromium.org/314713002/diff/160001/content/browser/renderer_host/media/audio_input_renderer_host.cc ...
6 years, 6 months ago (2014-06-10 17:03:15 UTC) #12
henrika (OOO until Aug 14)
https://codereview.chromium.org/314713002/diff/160001/content/browser/renderer_host/media/audio_input_renderer_host.cc File content/browser/renderer_host/media/audio_input_renderer_host.cc (right): https://codereview.chromium.org/314713002/diff/160001/content/browser/renderer_host/media/audio_input_renderer_host.cc#newcode22 content/browser/renderer_host/media/audio_input_renderer_host.cc:22: using media::AudioBus; On 2014/06/10 17:03:14, DaleCurtis wrote: > I'd ...
6 years, 6 months ago (2014-06-12 12:00:33 UTC) #13
henrika (OOO until Aug 14)
Dale and Shijing, I am almost done now. All that remains is to fix it ...
6 years, 6 months ago (2014-06-13 13:27:07 UTC) #14
henrika (OOO until Aug 14)
...and it looks like I will have to fix content_unittests as well. Should be simple ...
6 years, 6 months ago (2014-06-13 13:38:03 UTC) #15
henrika (OOO until Aug 14)
Done more changes; should be more or less complete now. Dale and Shijing; I would ...
6 years, 6 months ago (2014-06-16 15:49:23 UTC) #16
DaleCurtis
lgtm % Qs. https://codereview.chromium.org/314713002/diff/320001/media/audio/audio_low_latency_input_output_unittest.cc File media/audio/audio_low_latency_input_output_unittest.cc (right): https://codereview.chromium.org/314713002/diff/320001/media/audio/audio_low_latency_input_output_unittest.cc#newcode210 media/audio/audio_low_latency_input_output_unittest.cc:210: #if (false) What is this actually ...
6 years, 6 months ago (2014-06-17 01:03:50 UTC) #17
no longer working on chromium
lgtm with nits. https://codereview.chromium.org/314713002/diff/320001/content/browser/renderer_host/media/audio_input_sync_writer.cc File content/browser/renderer_host/media/audio_input_sync_writer.cc (right): https://codereview.chromium.org/314713002/diff/320001/content/browser/renderer_host/media/audio_input_sync_writer.cc#newcode8 content/browser/renderer_host/media/audio_input_sync_writer.cc:8: #include <algorithm> ?? remove https://codereview.chromium.org/314713002/diff/320001/content/browser/renderer_host/media/audio_input_sync_writer.cc#newcode52 content/browser/renderer_host/media/audio_input_sync_writer.cc:52: ...
6 years, 6 months ago (2014-06-17 06:59:58 UTC) #18
henrika (OOO until Aug 14)
Thanks guys! https://codereview.chromium.org/314713002/diff/320001/content/browser/renderer_host/media/audio_input_sync_writer.cc File content/browser/renderer_host/media/audio_input_sync_writer.cc (right): https://codereview.chromium.org/314713002/diff/320001/content/browser/renderer_host/media/audio_input_sync_writer.cc#newcode8 content/browser/renderer_host/media/audio_input_sync_writer.cc:8: #include <algorithm> On 2014/06/17 06:59:58, xians1 wrote: ...
6 years, 6 months ago (2014-06-17 11:39:44 UTC) #19
henrika (OOO until Aug 14)
The CQ bit was checked by henrika@chromium.org
6 years, 6 months ago (2014-06-17 11:41:48 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/henrika@chromium.org/314713002/340001
6 years, 6 months ago (2014-06-17 11:43:07 UTC) #21
henrika (OOO until Aug 14)
The CQ bit was checked by henrika@chromium.org
6 years, 6 months ago (2014-06-17 14:57:56 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/henrika@chromium.org/314713002/380001
6 years, 6 months ago (2014-06-17 14:58:25 UTC) #23
commit-bot: I haz the power
Change committed as 277794
6 years, 6 months ago (2014-06-17 17:27:15 UTC) #24
henrika (OOO until Aug 14)
This CL has been reverted. https://codereview.chromium.org/335343004/
6 years, 6 months ago (2014-06-18 08:24:23 UTC) #25
henrika (OOO until Aug 14)
6 years, 6 months ago (2014-06-18 08:52:47 UTC) #26
Message was sent while issue was closed.
See
http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Chrome...
for details.

Powered by Google App Engine
This is Rietveld 408576698