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

Issue 1272223003: Implement writing mic audio input data to file for debugging purposes. (Closed)

Created:
5 years, 4 months ago by Henrik Grunell
Modified:
5 years, 3 months ago
CC:
chromium-reviews, creis+watch_chromium.org, posciak+watch_chromium.org, nasko+codewatch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement writing mic audio input data to file for debugging purposes. This is enabled in chrome://webrtc-internals with the current "enable diagnostic audio recordings" checkbox. The user chooses a base filename, on which extensions are added as: <base name>.<process id>.source_input.<stream id>.pcm WebRTCInternals tells all RenderProcessHosts to enable recording, which in turn calls the AudioInputRenderHost. The AIRH tells all AudioInputControllers (if any) to enable recording and gives it a pointer to an AudioInputWriter. When audio data reaches AIC it tells the AudioInputWriter to write the data to file. When a new AudioInputController is created in AIRH, the recording status is checked, and if enabled it's enabled for the new AIC. BUG=516584 NOTRY=true TEST=Browser test. Manually by enabling in http://webrtc-internals and make WebRTC audio call. Committed: https://crrev.com/7566ffc1f76281738648633c1e7e5fc919d70e13 Cr-Commit-Position: refs/heads/master@{#347605}

Patch Set 1 #

Total comments: 30

Patch Set 2 : Rebase #

Patch Set 3 : Code review #

Total comments: 12

Patch Set 4 : Code review + rebase. #

Total comments: 16

Patch Set 5 : Code review. Moved adding pid to filename to RPHI. #

Total comments: 2

Patch Set 6 : Code review #

Total comments: 4

Patch Set 7 : Code review and rebase. #

Patch Set 8 : Fixed compile error on Win - fixed file path constants. #

Patch Set 9 : Fix incorrect filename if new tab is opened when logging already enabled. #

Patch Set 10 : Renamed and updated browser test. Rebase. #

Total comments: 14

Patch Set 11 : Code review + rebase. #

Patch Set 12 : Fixed compile error. #

Patch Set 13 : Fixed build with WebRTC disabled. Rebase. #

Patch Set 14 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+718 lines, -405 lines) Patch
M content/browser/media/webrtc_aecdump_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -223 lines 0 comments Download
A + content/browser/media/webrtc_audio_debug_recordings_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +106 lines, -58 lines 0 comments Download
M content/browser/media/webrtc_internals.h View 1 2 3 4 5 6 7 8 9 3 chunks +18 lines, -20 lines 0 comments Download
M content/browser/media/webrtc_internals.cc View 1 2 6 chunks +47 lines, -27 lines 0 comments Download
M content/browser/media/webrtc_internals_message_handler.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/media/webrtc_internals_message_handler.cc View 1 2 2 chunks +21 lines, -15 lines 0 comments Download
M content/browser/media/webrtc_internals_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
A content/browser/renderer_host/media/audio_input_debug_writer.h View 1 2 3 1 chunk +54 lines, -0 lines 0 comments Download
A content/browser/renderer_host/media/audio_input_debug_writer.cc View 1 2 3 1 chunk +46 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_renderer_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +34 lines, -0 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 11 12 8 chunks +183 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 7 8 4 chunks +6 lines, -2 lines 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 9 chunks +70 lines, -25 lines 0 comments Download
M content/browser/resources/media/dump_creator.js View 2 chunks +9 lines, -9 lines 0 comments Download
M content/browser/resources/media/webrtc_internals.js View 1 chunk +6 lines, -6 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/render_process_host.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/media/aec_dump_message_filter.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M media/audio/audio_input_controller.h View 1 2 3 4 5 6 5 chunks +20 lines, -0 lines 0 comments Download
M media/audio/audio_input_controller.cc View 1 2 3 4 5 6 6 chunks +59 lines, -1 line 0 comments Download
A media/audio/audio_input_writer.h View 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 42 (12 generated)
Henrik Grunell
PTAL.
5 years, 4 months ago (2015-08-07 10:25:01 UTC) #2
tommi (sloooow) - chröme
https://codereview.chromium.org/1272223003/diff/1/content/browser/media/webrtc_internals.cc File content/browser/media/webrtc_internals.cc (right): https://codereview.chromium.org/1272223003/diff/1/content/browser/media/webrtc_internals.cc#newcode265 content/browser/media/webrtc_internals.cc:265: audio_debug_recordings_ = false; add thread check here and elsewhere ...
5 years, 4 months ago (2015-08-07 12:09:51 UTC) #3
Henrik Grunell
https://codereview.chromium.org/1272223003/diff/1/content/browser/media/webrtc_internals.cc File content/browser/media/webrtc_internals.cc (right): https://codereview.chromium.org/1272223003/diff/1/content/browser/media/webrtc_internals.cc#newcode265 content/browser/media/webrtc_internals.cc:265: audio_debug_recordings_ = false; On 2015/08/07 12:09:50, tommi wrote: > ...
5 years, 4 months ago (2015-08-17 15:05:17 UTC) #4
Henrik Grunell
nasko@: Please review (as owner of) * content/browser/renderer_host/render_process_host_impl.h/cc * content/public/browser/render_process_host.h Tommi: another round please.
5 years, 4 months ago (2015-08-19 09:45:55 UTC) #6
tommi (sloooow) - chröme
https://codereview.chromium.org/1272223003/diff/1/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/1272223003/diff/1/content/browser/renderer_host/media/audio_input_renderer_host.cc#newcode91 content/browser/renderer_host/media/audio_input_renderer_host.cc:91: AudioInputDebugWriter* input_debug_writer; On 2015/08/17 15:05:17, Henrik Grunell wrote: > ...
5 years, 4 months ago (2015-08-19 11:32:21 UTC) #7
Henrik Grunell
https://codereview.chromium.org/1272223003/diff/1/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/1272223003/diff/1/content/browser/renderer_host/media/audio_input_renderer_host.cc#newcode91 content/browser/renderer_host/media/audio_input_renderer_host.cc:91: AudioInputDebugWriter* input_debug_writer; On 2015/08/19 11:32:21, tommi wrote: > On ...
5 years, 4 months ago (2015-08-19 19:57:16 UTC) #8
tommi (sloooow) - chröme
thanks for dealing with all the nits. I think you can remove the two reset()'s ...
5 years, 4 months ago (2015-08-19 20:06:34 UTC) #9
nasko
This CL has issues with accessing objects across threads and possibly object lifetime issues too. ...
5 years, 4 months ago (2015-08-19 22:04:15 UTC) #10
Henrik Grunell
Code review fixes. Moved getting pid for filename to RPHI. https://codereview.chromium.org/1272223003/diff/60001/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/1272223003/diff/60001/content/browser/renderer_host/media/audio_input_renderer_host.cc#newcode118 ...
5 years, 4 months ago (2015-08-20 07:26:19 UTC) #11
nasko
Would you please include a overview in the CL description about how this is supposed ...
5 years, 4 months ago (2015-08-20 19:08:56 UTC) #12
Henrik Grunell
Updated CL description. https://codereview.chromium.org/1272223003/diff/60001/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/1272223003/diff/60001/content/browser/renderer_host/media/audio_input_renderer_host.cc#newcode118 content/browser/renderer_host/media/audio_input_renderer_host.cc:118: render_process_host_(render_process_host), On 2015/08/20 19:08:56, nasko wrote: ...
5 years, 4 months ago (2015-08-20 20:03:50 UTC) #13
nasko
https://codereview.chromium.org/1272223003/diff/60001/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/1272223003/diff/60001/content/browser/renderer_host/media/audio_input_renderer_host.cc#newcode118 content/browser/renderer_host/media/audio_input_renderer_host.cc:118: render_process_host_(render_process_host), On 2015/08/20 20:03:49, Henrik Grunell wrote: > On ...
5 years, 4 months ago (2015-08-20 20:56:14 UTC) #14
Henrik Grunell
nasko@ ptal https://codereview.chromium.org/1272223003/diff/60001/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/1272223003/diff/60001/content/browser/renderer_host/media/audio_input_renderer_host.cc#newcode118 content/browser/renderer_host/media/audio_input_renderer_host.cc:118: render_process_host_(render_process_host), On 2015/08/20 20:56:13, nasko wrote: > ...
5 years, 4 months ago (2015-08-21 13:51:03 UTC) #15
Henrik Grunell
On 2015/08/21 13:51:03, Henrik Grunell wrote: > nasko@ ptal > > https://codereview.chromium.org/1272223003/diff/60001/content/browser/renderer_host/media/audio_input_renderer_host.cc > File content/browser/renderer_host/media/audio_input_renderer_host.cc ...
5 years, 4 months ago (2015-08-22 04:18:23 UTC) #16
nasko
Sorry for the delay, sheriffing has been surprisingly busy :(. LGTM
5 years, 4 months ago (2015-08-24 18:19:13 UTC) #17
Henrik Grunell
* Updated the browser test. (And added test for the new file.) * Fixed incorrect ...
5 years, 3 months ago (2015-08-26 11:10:40 UTC) #18
tommi (sloooow) - chröme
sorry for the delay. I didn't realize you were asking me to take another look. ...
5 years, 3 months ago (2015-08-31 17:19:07 UTC) #19
Henrik Grunell
Code review. nasko@: I had to do some changes since your lgtm. Please review * ...
5 years, 3 months ago (2015-09-04 12:37:38 UTC) #20
Henrik Grunell
On 2015/09/04 12:37:38, Henrik Grunell wrote: > Code review. > > nasko@: I had to ...
5 years, 3 months ago (2015-09-04 12:41:25 UTC) #21
tommi (sloooow) - chröme
lgtm
5 years, 3 months ago (2015-09-04 13:36:03 UTC) #22
nasko
Still LGTM
5 years, 3 months ago (2015-09-04 18:53:00 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1272223003/190001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1272223003/190001
5 years, 3 months ago (2015-09-05 09:38:20 UTC) #25
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/129394)
5 years, 3 months ago (2015-09-05 10:16:05 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1272223003/210001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1272223003/210001
5 years, 3 months ago (2015-09-06 11:21:18 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/129438)
5 years, 3 months ago (2015-09-06 11:49:02 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1272223003/230001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1272223003/230001
5 years, 3 months ago (2015-09-06 15:31:35 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/108856)
5 years, 3 months ago (2015-09-06 16:30:43 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1272223003/250001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1272223003/250001
5 years, 3 months ago (2015-09-07 07:35:36 UTC) #40
commit-bot: I haz the power
Committed patchset #14 (id:250001)
5 years, 3 months ago (2015-09-07 07:39:52 UTC) #41
commit-bot: I haz the power
5 years, 3 months ago (2015-09-07 07:40:33 UTC) #42
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/7566ffc1f76281738648633c1e7e5fc919d70e13
Cr-Commit-Position: refs/heads/master@{#347605}

Powered by Google App Engine
This is Rietveld 408576698