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

Issue 2466613002: Adds thread safety annotations to the AudioDeviceBuffer class (Closed)

Created:
4 years, 1 month ago by henrika_webrtc
Modified:
4 years, 1 month ago
Reviewers:
kwiberg-webrtc
CC:
webrtc-reviews_webrtc.org
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

- Adds thread safety annotations to the AudioDeviceBuffer class. - Removes the lock that was used to protect the audio transport object. It is now protected "by design" instead. - Removes rec/play_bytes_per_sample_ since we only support 16-bit samples. BUG=webrtc:6560 R=kwiberg@webrtc.org Committed: https://crrev.com/f50222244371fdcb00190017a40afa2c0796fed1 Cr-Commit-Position: refs/heads/master@{#14950}

Patch Set 1 #

Patch Set 2 : Adds race checker and removes test of ResetAudioDevice #

Total comments: 17

Patch Set 3 : Removed race checker #

Patch Set 4 : Initial feedback from kwiberg@ #

Patch Set 5 : Improved thread annotation #

Total comments: 14

Patch Set 6 : More changes based on feedback from kwiberg@ #

Patch Set 7 : Improved annotation and removed unused logging of playout difftimes #

Patch Set 8 : Removed race checkers #

Patch Set 9 : improved comment #

Total comments: 2

Patch Set 10 : Minor changes to ensure that all unit tests works #

Patch Set 11 : Minor thread change for Windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -256 lines) Patch
M webrtc/modules/audio_device/audio_device_buffer.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +66 lines, -59 lines 0 comments Download
M webrtc/modules/audio_device/audio_device_buffer.cc View 1 2 3 4 5 6 7 8 9 10 21 chunks +67 lines, -101 lines 0 comments Download
M webrtc/modules/audio_device/audio_device_impl.cc View 1 2 chunks +3 lines, -10 lines 0 comments Download
M webrtc/modules/audio_device/mac/audio_device_mac.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_device/test/audio_device_test_api.cc View 1 7 chunks +10 lines, -84 lines 0 comments Download

Messages

Total messages: 32 (13 generated)
henrika_webrtc
PTAL
4 years, 1 month ago (2016-11-01 15:19:48 UTC) #4
kwiberg-webrtc
(I reviewed patch set #2, where there was still a race checker.) Nice, but I ...
4 years, 1 month ago (2016-11-01 15:53:50 UTC) #7
henrika_webrtc
Thanks! Don't review yet. Will upload new version. If you have time, please check my ...
4 years, 1 month ago (2016-11-02 10:29:10 UTC) #8
henrika_webrtc
https://codereview.webrtc.org/2466613002/diff/20001/webrtc/modules/audio_device/audio_device_buffer.cc File webrtc/modules/audio_device/audio_device_buffer.cc (right): https://codereview.webrtc.org/2466613002/diff/20001/webrtc/modules/audio_device/audio_device_buffer.cc#newcode209 webrtc/modules/audio_device/audio_device_buffer.cc:209: rtc::CritScope lock(&lock_); Please correct me if I am wrong ...
4 years, 1 month ago (2016-11-02 10:29:18 UTC) #9
kwiberg-webrtc
https://codereview.webrtc.org/2466613002/diff/20001/webrtc/modules/audio_device/audio_device_buffer.cc File webrtc/modules/audio_device/audio_device_buffer.cc (right): https://codereview.webrtc.org/2466613002/diff/20001/webrtc/modules/audio_device/audio_device_buffer.cc#newcode209 webrtc/modules/audio_device/audio_device_buffer.cc:209: rtc::CritScope lock(&lock_); On 2016/11/02 10:29:17, henrika_webrtc wrote: > Please ...
4 years, 1 month ago (2016-11-02 11:27:56 UTC) #10
henrika_webrtc
I was able to annotate almost all members. Not sure if I can add for ...
4 years, 1 month ago (2016-11-02 13:36:17 UTC) #11
kwiberg-webrtc
https://codereview.webrtc.org/2466613002/diff/80001/webrtc/modules/audio_device/audio_device_buffer.cc File webrtc/modules/audio_device/audio_device_buffer.cc (right): https://codereview.webrtc.org/2466613002/diff/80001/webrtc/modules/audio_device/audio_device_buffer.cc#newcode117 webrtc/modules/audio_device/audio_device_buffer.cc:117: // here since the media has not started yet ...
4 years, 1 month ago (2016-11-02 14:14:57 UTC) #12
kwiberg-webrtc
On 2016/11/02 13:36:17, henrika_webrtc wrote: > I was able to annotate almost all members. > ...
4 years, 1 month ago (2016-11-02 14:15:44 UTC) #13
henrika_webrtc
Was able to come up with a version without any locks at all. It is ...
4 years, 1 month ago (2016-11-02 16:23:24 UTC) #14
henrika_webrtc
I think it is perfect now ;-) PTAL
4 years, 1 month ago (2016-11-03 09:57:35 UTC) #15
kwiberg-webrtc
lgtm, but see comment. Too bad you didn't get all the way there, but annotating ...
4 years, 1 month ago (2016-11-03 13:15:17 UTC) #16
henrika_webrtc
Thanks. Might need some minor changes to ensure that all unit tests works. Trust me ...
4 years, 1 month ago (2016-11-03 14:36:32 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2466613002/180001
4 years, 1 month ago (2016-11-03 14:55:53 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: win_baremetal on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/win_baremetal/builds/15753)
4 years, 1 month ago (2016-11-03 15:38:11 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2466613002/200001
4 years, 1 month ago (2016-11-07 13:00:05 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: win_x64_rel on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/win_x64_rel/builds/19338)
4 years, 1 month ago (2016-11-07 13:45:57 UTC) #27
henrika_webrtc
Landing manually since I am unable to reproduce the issues above locally. Must be flake.
4 years, 1 month ago (2016-11-07 14:54:35 UTC) #28
henrika_webrtc
Landing manually since I am unable to reproduce the issues above locally. Must be flake.
4 years, 1 month ago (2016-11-07 14:54:39 UTC) #29
henrika_webrtc
4 years, 1 month ago (2016-11-07 14:57:16 UTC) #31
Message was sent while issue was closed.
Committed patchset #11 (id:200001) manually as
f50222244371fdcb00190017a40afa2c0796fed1 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698