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

Issue 2390153006: Audio input debug recording refactoring to reduce thread hops and simplify object ownership (Closed)

Created:
4 years, 2 months ago by o1ka
Modified:
4 years, 2 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, miu+watch_chromium.org, Max Morin, audio-mojo-cl_google.com, tommi (sloooow) - chröme, chcunningham
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Audio input debug recording refactoring to reduce thread hops and simplify object ownership AudioInputRendererHost has to do too many thread hops to handle debug recording enable/disable. This CL: * Passes recording file management to AudioInputDebugWriter, which takes care of file operations executed on the correct thread. Now it can be deleted on any thread, and thus: * AudioInputDebugWriter ownership is passed to AudioInputController, AIRH does not care about its lifetime any more. * AudioEntry does not store audio parameters (required for debug recording only) any more. AudioInputDebugWriter holds them, and recording is controlled with Start()/Stop() instead of creation/deletion of the writer. See the diagram: https://drive.google.com/open?id=0Bw1QgdA2sQtMbDFXeUdvUnZzTE0. Red arrows are going away, blue arrows remain. So, now AIRH only (1) communicates with UI thread to get debug recording settings and (2) issues enable/disable recording calls for each registered AudioInputController. BUG=586431, 653861 TESTING=updated unit tests + manual debug recording Committed: https://crrev.com/6b2e94b644dc909c077430e3ae6fcec341ccf5c6 Cr-Commit-Position: refs/heads/master@{#425360}

Patch Set 1 #

Total comments: 30

Patch Set 2 : review comments addressed #

Total comments: 23

Patch Set 3 : nit fixes + AudioFileWriter deletion changed #

Patch Set 4 : cleaning up file writer deletion on FILE thread #

Total comments: 5

Patch Set 5 : Ending a comment with a dot. #

Patch Set 6 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -214 lines) Patch
M content/browser/renderer_host/media/audio_input_debug_writer.h View 1 2 3 4 1 chunk +14 lines, -33 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_debug_writer.cc View 1 2 3 4 chunks +137 lines, -28 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_debug_writer_unittest.cc View 1 2 3 8 chunks +93 lines, -14 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_renderer_host.cc View 1 2 3 4 5 10 chunks +17 lines, -101 lines 0 comments Download
M media/audio/audio_input_controller.h View 1 6 chunks +8 lines, -6 lines 0 comments Download
M media/audio/audio_input_controller.cc View 1 11 chunks +31 lines, -32 lines 0 comments Download
M media/audio/audio_input_writer.h View 1 2 1 chunk +15 lines, -0 lines 0 comments Download
M media/audio/test_audio_input_controller_factory.cc View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 56 (25 generated)
o1ka
Guido, could you PTAL?
4 years, 2 months ago (2016-10-07 13:22:13 UTC) #8
o1ka
4 years, 2 months ago (2016-10-07 13:23:39 UTC) #9
o1ka
+ tommi@chromium.org as an owner of everything - and a reviewer if you have time ...
4 years, 2 months ago (2016-10-07 13:25:53 UTC) #11
o1ka
+grunell@ as the author of the original code (since he's back now)
4 years, 2 months ago (2016-10-10 08:43:12 UTC) #16
o1ka
https://codereview.chromium.org/2390153006/diff/40001/content/browser/renderer_host/media/audio_input_debug_writer.cc File content/browser/renderer_host/media/audio_input_debug_writer.cc (right): https://codereview.chromium.org/2390153006/diff/40001/content/browser/renderer_host/media/audio_input_debug_writer.cc#newcode260 content/browser/renderer_host/media/audio_input_debug_writer.cc:260: // non-nestable to make sure it is executed after ...
4 years, 2 months ago (2016-10-10 08:44:58 UTC) #17
Guido Urdaneta
https://codereview.chromium.org/2390153006/diff/40001/content/browser/renderer_host/media/audio_input_debug_writer.cc File content/browser/renderer_host/media/audio_input_debug_writer.cc (right): https://codereview.chromium.org/2390153006/diff/40001/content/browser/renderer_host/media/audio_input_debug_writer.cc#newcode165 content/browser/renderer_host/media/audio_input_debug_writer.cc:165: int interleaved_data_size_; nit: should this be size_t? https://codereview.chromium.org/2390153006/diff/40001/content/browser/renderer_host/media/audio_input_debug_writer.cc#newcode173 content/browser/renderer_host/media/audio_input_debug_writer.cc:173: ...
4 years, 2 months ago (2016-10-10 10:09:24 UTC) #18
Henrik Grunell
https://codereview.chromium.org/2390153006/diff/40001/content/browser/renderer_host/media/audio_input_debug_writer.cc File content/browser/renderer_host/media/audio_input_debug_writer.cc (right): https://codereview.chromium.org/2390153006/diff/40001/content/browser/renderer_host/media/audio_input_debug_writer.cc#newcode259 content/browser/renderer_host/media/audio_input_debug_writer.cc:259: // Close() is executed or when FILE thread message ...
4 years, 2 months ago (2016-10-10 10:56:59 UTC) #19
o1ka
https://codereview.chromium.org/2390153006/diff/40001/content/browser/renderer_host/media/audio_input_debug_writer.cc File content/browser/renderer_host/media/audio_input_debug_writer.cc (right): https://codereview.chromium.org/2390153006/diff/40001/content/browser/renderer_host/media/audio_input_debug_writer.cc#newcode165 content/browser/renderer_host/media/audio_input_debug_writer.cc:165: int interleaved_data_size_; On 2016/10/10 10:09:24, Guido Urdaneta wrote: > ...
4 years, 2 months ago (2016-10-10 13:48:02 UTC) #20
Guido Urdaneta
https://codereview.chromium.org/2390153006/diff/40001/content/browser/renderer_host/media/audio_input_debug_writer.cc File content/browser/renderer_host/media/audio_input_debug_writer.cc (right): https://codereview.chromium.org/2390153006/diff/40001/content/browser/renderer_host/media/audio_input_debug_writer.cc#newcode165 content/browser/renderer_host/media/audio_input_debug_writer.cc:165: int interleaved_data_size_; On 2016/10/10 13:48:01, o1ka wrote: > On ...
4 years, 2 months ago (2016-10-10 14:53:22 UTC) #21
o1ka
PTAL at the new version. https://codereview.chromium.org/2390153006/diff/40001/content/browser/renderer_host/media/audio_input_debug_writer.cc File content/browser/renderer_host/media/audio_input_debug_writer.cc (right): https://codereview.chromium.org/2390153006/diff/40001/content/browser/renderer_host/media/audio_input_debug_writer.cc#newcode289 content/browser/renderer_host/media/audio_input_debug_writer.cc:289: // Posting On 2016/10/10 ...
4 years, 2 months ago (2016-10-11 12:11:24 UTC) #23
Guido Urdaneta
https://codereview.chromium.org/2390153006/diff/80001/content/browser/renderer_host/media/audio_input_debug_writer.cc File content/browser/renderer_host/media/audio_input_debug_writer.cc (right): https://codereview.chromium.org/2390153006/diff/80001/content/browser/renderer_host/media/audio_input_debug_writer.cc#newcode263 content/browser/renderer_host/media/audio_input_debug_writer.cc:263: // be written to the file. This also won't ...
4 years, 2 months ago (2016-10-11 12:39:25 UTC) #24
Henrik Grunell
https://codereview.chromium.org/2390153006/diff/80001/content/browser/renderer_host/media/audio_input_debug_writer.cc File content/browser/renderer_host/media/audio_input_debug_writer.cc (right): https://codereview.chromium.org/2390153006/diff/80001/content/browser/renderer_host/media/audio_input_debug_writer.cc#newcode143 content/browser/renderer_host/media/audio_input_debug_writer.cc:143: // Must be called on FILE thread. Nit: Does ...
4 years, 2 months ago (2016-10-11 13:07:24 UTC) #25
o1ka
PTAL again https://codereview.chromium.org/2390153006/diff/80001/content/browser/renderer_host/media/audio_input_debug_writer.cc File content/browser/renderer_host/media/audio_input_debug_writer.cc (right): https://codereview.chromium.org/2390153006/diff/80001/content/browser/renderer_host/media/audio_input_debug_writer.cc#newcode143 content/browser/renderer_host/media/audio_input_debug_writer.cc:143: // Must be called on FILE thread. ...
4 years, 2 months ago (2016-10-11 14:04:37 UTC) #26
o1ka
Hold on! found a problem
4 years, 2 months ago (2016-10-11 14:07:54 UTC) #27
o1ka
PTAL now
4 years, 2 months ago (2016-10-12 08:32:13 UTC) #28
Henrik Grunell
lgtm But consider my comment about creating and passing the writer when enabling. This object ...
4 years, 2 months ago (2016-10-13 07:26:11 UTC) #29
o1ka
Thanks for the review! Re: creating the writer on demand, see https://bugs.chromium.org/p/chromium/issues/detail?id=586431. On 2016/10/13 07:26:11, ...
4 years, 2 months ago (2016-10-13 07:46:23 UTC) #30
Henrik Grunell
I know it's kind of the point with the change. If there's no reasonable way ...
4 years, 2 months ago (2016-10-13 07:56:09 UTC) #31
o1ka
I'm open for suggestions :) On 2016/10/13 07:56:09, Henrik Grunell wrote: > I know it's ...
4 years, 2 months ago (2016-10-13 08:09:51 UTC) #32
Guido Urdaneta
https://codereview.chromium.org/2390153006/diff/120001/content/browser/renderer_host/media/audio_input_debug_writer.cc File content/browser/renderer_host/media/audio_input_debug_writer.cc (right): https://codereview.chromium.org/2390153006/diff/120001/content/browser/renderer_host/media/audio_input_debug_writer.cc#newcode268 content/browser/renderer_host/media/audio_input_debug_writer.cc:268: // |file_writer_| will be deleted on FILE thread. Why ...
4 years, 2 months ago (2016-10-13 08:30:28 UTC) #33
o1ka
https://codereview.chromium.org/2390153006/diff/120001/content/browser/renderer_host/media/audio_input_debug_writer.cc File content/browser/renderer_host/media/audio_input_debug_writer.cc (right): https://codereview.chromium.org/2390153006/diff/120001/content/browser/renderer_host/media/audio_input_debug_writer.cc#newcode268 content/browser/renderer_host/media/audio_input_debug_writer.cc:268: // |file_writer_| will be deleted on FILE thread. On ...
4 years, 2 months ago (2016-10-13 09:13:34 UTC) #34
Guido Urdaneta
lgtm
4 years, 2 months ago (2016-10-13 12:03:20 UTC) #35
Guido Urdaneta
https://codereview.chromium.org/2390153006/diff/120001/content/browser/renderer_host/media/audio_input_debug_writer.cc File content/browser/renderer_host/media/audio_input_debug_writer.cc (right): https://codereview.chromium.org/2390153006/diff/120001/content/browser/renderer_host/media/audio_input_debug_writer.cc#newcode268 content/browser/renderer_host/media/audio_input_debug_writer.cc:268: // |file_writer_| will be deleted on FILE thread. On ...
4 years, 2 months ago (2016-10-13 12:06:31 UTC) #36
o1ka
Changing an OWNER, since Tommi is travelling. chcunningham@ - PTAL (or just RS)
4 years, 2 months ago (2016-10-13 12:15:37 UTC) #38
tommi (sloooow) - chröme
rs lgtm
4 years, 2 months ago (2016-10-13 12:33:40 UTC) #42
o1ka
Apologies for spam, switching OWNERs back since Tommi had a chance to look at the ...
4 years, 2 months ago (2016-10-13 13:40:31 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2390153006/140001
4 years, 2 months ago (2016-10-14 12:42:40 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/286273) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 2 months ago (2016-10-14 12:45:09 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2390153006/160001
4 years, 2 months ago (2016-10-14 13:08:21 UTC) #52
commit-bot: I haz the power
Committed patchset #6 (id:160001)
4 years, 2 months ago (2016-10-14 16:50:23 UTC) #54
commit-bot: I haz the power
4 years, 2 months ago (2016-10-14 16:53:19 UTC) #56
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/6b2e94b644dc909c077430e3ae6fcec341ccf5c6
Cr-Commit-Position: refs/heads/master@{#425360}

Powered by Google App Engine
This is Rietveld 408576698