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

Issue 2076793002: Cleanup AudioDeviceThread to reduce locking and unused features. (Closed)

Created:
4 years, 6 months ago by DaleCurtis
Modified:
4 years, 5 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cleanup AudioDeviceThread to reduce locking and unused features. While reviewing some of the other AudioOutputDevice changes, I noticed this class is exceedingly crufty. This removes an extra layer and associated locking from the audio callback thread. AudioInputDevice/AudioOutputDevice both always use synchronized buffers now, so that option is no longer necessary. Removes the silly ref-counting from AudioDeviceThread in favor of ownership by an already ref counted class :) Removes the Start/Stop API from AudioDeviceThread since it's easier to just construct and destruct it. BUG=612792 TEST=audio plays, all unittests still pass. Committed: https://crrev.com/47f99faeb277c3fbd9eb709f803ce788b9c1e64f Cr-Commit-Position: refs/heads/master@{#400734}

Patch Set 1 #

Total comments: 7

Patch Set 2 : Remove silliness. #

Patch Set 3 : Rebase. Relocate one-time use variables. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -285 lines) Patch
M media/audio/audio_device_thread.h View 1 2 4 chunks +19 lines, -52 lines 0 comments Download
M media/audio/audio_device_thread.cc View 1 2 2 chunks +58 lines, -203 lines 0 comments Download
M media/audio/audio_input_device.h View 1 chunk +1 line, -1 line 0 comments Download
M media/audio/audio_input_device.cc View 1 2 7 chunks +21 lines, -16 lines 0 comments Download
M media/audio/audio_output_device.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M media/audio/audio_output_device.cc View 1 2 7 chunks +15 lines, -12 lines 0 comments Download

Messages

Total messages: 32 (12 generated)
DaleCurtis
While reviewing grunell@'s CL this mess became apparent, cleaned up!
4 years, 6 months ago (2016-06-16 21:57:04 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2076793002/1
4 years, 6 months ago (2016-06-16 22:02:28 UTC) #4
tommi (sloooow) - chröme
https://codereview.chromium.org/2076793002/diff/1/media/audio/audio_device_thread.cc File media/audio/audio_device_thread.cc (right): https://codereview.chromium.org/2076793002/diff/1/media/audio/audio_device_thread.cc#newcode42 media/audio/audio_device_thread.cc:42: CHECK(shared_memory_.memory()); should there be a [D]CHECK for memory() being ...
4 years, 6 months ago (2016-06-16 22:19:22 UTC) #5
DaleCurtis
https://codereview.chromium.org/2076793002/diff/1/media/audio/audio_device_thread.cc File media/audio/audio_device_thread.cc (right): https://codereview.chromium.org/2076793002/diff/1/media/audio/audio_device_thread.cc#newcode42 media/audio/audio_device_thread.cc:42: CHECK(shared_memory_.memory()); On 2016/06/16 at 22:19:22, tommi-chrömium wrote: > should ...
4 years, 6 months ago (2016-06-16 22:24:59 UTC) #6
tommi (sloooow) - chröme
https://codereview.chromium.org/2076793002/diff/1/media/audio/audio_device_thread.cc File media/audio/audio_device_thread.cc (right): https://codereview.chromium.org/2076793002/diff/1/media/audio/audio_device_thread.cc#newcode106 media/audio/audio_device_thread.cc:106: thread_handle_ = base::PlatformThreadHandle(); On 2016/06/16 22:24:59, DaleCurtis wrote: > ...
4 years, 6 months ago (2016-06-16 22:36:18 UTC) #7
DaleCurtis
https://codereview.chromium.org/2076793002/diff/1/media/audio/audio_device_thread.cc File media/audio/audio_device_thread.cc (right): https://codereview.chromium.org/2076793002/diff/1/media/audio/audio_device_thread.cc#newcode106 media/audio/audio_device_thread.cc:106: thread_handle_ = base::PlatformThreadHandle(); On 2016/06/16 at 22:36:18, tommi-chrömium wrote: ...
4 years, 6 months ago (2016-06-16 22:55:16 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2076793002/40001
4 years, 6 months ago (2016-06-17 06:38:42 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-17 08:13:29 UTC) #14
tommi (sloooow) - chröme
Lgtm. Great simplification. I hope everything continues to work :-)
4 years, 6 months ago (2016-06-17 18:51:09 UTC) #15
DaleCurtis
Thanks! Me too :) Henrik, any comments?
4 years, 6 months ago (2016-06-17 19:12:33 UTC) #16
Henrik Grunell
lgtm This makes sense now when we won't re-use the thread (removing the extra layer ...
4 years, 6 months ago (2016-06-20 07:39:27 UTC) #17
Henrik Grunell
On 2016/06/20 07:39:27, Henrik Grunell wrote: > lgtm > > This makes sense now when ...
4 years, 6 months ago (2016-06-20 07:44:21 UTC) #18
DaleCurtis
Thanks for the reviews!
4 years, 6 months ago (2016-06-20 16:28:03 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2076793002/40001
4 years, 6 months ago (2016-06-20 16:28:09 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/23546) ios-simulator on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 6 months ago (2016-06-20 16:29:40 UTC) #23
DaleCurtis
4 years, 6 months ago (2016-06-20 17:14:18 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2076793002/60001
4 years, 6 months ago (2016-06-20 17:14:39 UTC) #27
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years, 6 months ago (2016-06-20 18:30:49 UTC) #28
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/47f99faeb277c3fbd9eb709f803ce788b9c1e64f Cr-Commit-Position: refs/heads/master@{#400734}
4 years, 6 months ago (2016-06-20 18:39:52 UTC) #30
Henrik Grunell
4 years, 5 months ago (2016-06-30 13:31:07 UTC) #32
Message was sent while issue was closed.
Just FYI: There is a bug for removing the extra class layer, added it to the
description.

Powered by Google App Engine
This is Rietveld 408576698