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

Issue 1435293003: Improved error handling in iOS ADM to avoid race during init (Closed)

Created:
5 years, 1 month ago by henrika_webrtc
Modified:
5 years, 1 month ago
CC:
webrtc-reviews_webrtc.org
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Improved error handling in iOS ADM to avoid race during init BUG=webrtc:5166 R=pbos@webrtc.org, tkchin@webrtc.org Committed: https://crrev.com/34911ad55c4c4c549fe60e1b4cc127420b15666b Cr-Commit-Position: refs/heads/master@{#10728}

Patch Set 1 #

Patch Set 2 : Fine tuned audio session deactivation scheme #

Total comments: 10

Patch Set 3 : Feedback from tkchin@ #

Patch Set 4 : Adding rtc::GlobalLockPod and counts number of active audio sessions at Start/Stop #

Total comments: 14

Patch Set 5 : Feedback from pbos@ #

Total comments: 25

Patch Set 6 : More feedback from pbos #

Patch Set 7 : Stability improvements #

Total comments: 8

Patch Set 8 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+227 lines, -73 lines) Patch
M webrtc/modules/audio_device/ios/audio_device_ios.h View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M webrtc/modules/audio_device/ios/audio_device_ios.mm View 1 2 3 4 5 6 7 19 chunks +223 lines, -72 lines 0 comments Download

Messages

Total messages: 35 (6 generated)
henrika_webrtc
PTAL
5 years, 1 month ago (2015-11-12 15:48:59 UTC) #3
tkchin_webrtc
lgtm https://codereview.webrtc.org/1435293003/diff/20001/webrtc/modules/audio_device/ios/audio_device_ios.h File webrtc/modules/audio_device/ios/audio_device_ios.h (right): https://codereview.webrtc.org/1435293003/diff/20001/webrtc/modules/audio_device/ios/audio_device_ios.h#newcode217 webrtc/modules/audio_device/ios/audio_device_ios.h:217: static volatile int object_count_; nit: Add comment for ...
5 years, 1 month ago (2015-11-16 21:30:08 UTC) #4
henrika_webrtc
Thanks! https://codereview.webrtc.org/1435293003/diff/20001/webrtc/modules/audio_device/ios/audio_device_ios.h File webrtc/modules/audio_device/ios/audio_device_ios.h (right): https://codereview.webrtc.org/1435293003/diff/20001/webrtc/modules/audio_device/ios/audio_device_ios.h#newcode217 webrtc/modules/audio_device/ios/audio_device_ios.h:217: static volatile int object_count_; On 2015/11/16 21:30:08, tkchin_webrtc ...
5 years, 1 month ago (2015-11-17 14:46:11 UTC) #5
henrika_webrtc
I would like to make more improvements here related to how and when to activate ...
5 years, 1 month ago (2015-11-17 15:30:12 UTC) #6
tkchin_webrtc
https://codereview.webrtc.org/1435293003/diff/20001/webrtc/modules/audio_device/ios/audio_device_ios.mm File webrtc/modules/audio_device/ios/audio_device_ios.mm (right): https://codereview.webrtc.org/1435293003/diff/20001/webrtc/modules/audio_device/ios/audio_device_ios.mm#newcode218 webrtc/modules/audio_device/ios/audio_device_ios.mm:218: const int count = rtc::AtomicOps::Increment(&object_count_); On 2015/11/17 14:46:11, henrika_webrtc ...
5 years, 1 month ago (2015-11-17 21:08:47 UTC) #7
henrika_webrtc
Adding pbos@ for an upcoming thread safe implementation using global locks. https://codereview.webrtc.org/1435293003/diff/20001/webrtc/modules/audio_device/ios/audio_device_ios.mm File webrtc/modules/audio_device/ios/audio_device_ios.mm (right): ...
5 years, 1 month ago (2015-11-18 09:26:04 UTC) #9
henrika_webrtc
pbos@: I have added a solution that we have discussed off-line. Please check it out. ...
5 years, 1 month ago (2015-11-18 10:29:10 UTC) #10
henrika_webrtc
tkchin@: given the latest proposal where we add counters in combination with activate/deactivate of the ...
5 years, 1 month ago (2015-11-18 12:25:56 UTC) #11
pbos-webrtc
https://codereview.webrtc.org/1435293003/diff/60001/webrtc/modules/audio_device/ios/audio_device_ios.h File webrtc/modules/audio_device/ios/audio_device_ios.h (right): https://codereview.webrtc.org/1435293003/diff/60001/webrtc/modules/audio_device/ios/audio_device_ios.h#newcode223 webrtc/modules/audio_device/ios/audio_device_ios.h:223: static int audio_session_activation_count_; Put GUARDED_BY(lock_) between "count_" and ";" ...
5 years, 1 month ago (2015-11-18 12:54:22 UTC) #12
pbos-webrtc
On 2015/11/18 12:54:22, pbos-webrtc wrote: > https://codereview.webrtc.org/1435293003/diff/60001/webrtc/modules/audio_device/ios/audio_device_ios.h > File webrtc/modules/audio_device/ios/audio_device_ios.h (right): > > https://codereview.webrtc.org/1435293003/diff/60001/webrtc/modules/audio_device/ios/audio_device_ios.h#newcode223 > ...
5 years, 1 month ago (2015-11-18 12:57:18 UTC) #13
henrika_webrtc
Thanks Peter. Done changes as proposed and fixed some other issues as well. PTAL https://codereview.webrtc.org/1435293003/diff/60001/webrtc/modules/audio_device/ios/audio_device_ios.h ...
5 years, 1 month ago (2015-11-18 16:05:32 UTC) #14
henrika_webrtc
https://codereview.webrtc.org/1435293003/diff/60001/webrtc/modules/audio_device/ios/audio_device_ios.mm File webrtc/modules/audio_device/ios/audio_device_ios.mm (right): https://codereview.webrtc.org/1435293003/diff/60001/webrtc/modules/audio_device/ios/audio_device_ios.mm#newcode909 webrtc/modules/audio_device/ios/audio_device_ios.mm:909: if (audio_session_activation_count_ == 1) { Solved in a different ...
5 years, 1 month ago (2015-11-18 16:07:33 UTC) #15
henrika_webrtc
Executed media_unittests --gtest_filter=AudioDevice* --gtest_repeat=50 and also did 10 manual calls using AppRTCDemo (P2P, only trying ...
5 years, 1 month ago (2015-11-18 17:26:56 UTC) #16
pbos-webrtc
https://codereview.webrtc.org/1435293003/diff/80001/webrtc/modules/audio_device/ios/audio_device_ios.h File webrtc/modules/audio_device/ios/audio_device_ios.h (right): https://codereview.webrtc.org/1435293003/diff/80001/webrtc/modules/audio_device/ios/audio_device_ios.h#newcode16 webrtc/modules/audio_device/ios/audio_device_ios.h:16: #include "webrtc/base/criticalsection.h" Move to .cc file https://codereview.webrtc.org/1435293003/diff/80001/webrtc/modules/audio_device/ios/audio_device_ios.h#newcode18 webrtc/modules/audio_device/ios/audio_device_ios.h:18: #include ...
5 years, 1 month ago (2015-11-18 18:51:48 UTC) #17
tkchin_webrtc
https://codereview.webrtc.org/1435293003/diff/80001/webrtc/modules/audio_device/ios/audio_device_ios.mm File webrtc/modules/audio_device/ios/audio_device_ios.mm (right): https://codereview.webrtc.org/1435293003/diff/80001/webrtc/modules/audio_device/ios/audio_device_ios.mm#newcode474 webrtc/modules/audio_device/ios/audio_device_ios.mm:474: AVAudioSession* session = [AVAudioSession sharedInstance]; I don't know if ...
5 years, 1 month ago (2015-11-18 19:25:29 UTC) #18
henrika_webrtc
Comments only. Will make final changes tomorrow. Feels like we are in phase and that ...
5 years, 1 month ago (2015-11-18 19:48:21 UTC) #19
henrika_webrtc
pbos: let's discuss the final details off-line tomorrow.
5 years, 1 month ago (2015-11-18 19:50:54 UTC) #20
henrika_webrtc
Fixed. Uploading new version. https://codereview.webrtc.org/1435293003/diff/80001/webrtc/modules/audio_device/ios/audio_device_ios.h File webrtc/modules/audio_device/ios/audio_device_ios.h (right): https://codereview.webrtc.org/1435293003/diff/80001/webrtc/modules/audio_device/ios/audio_device_ios.h#newcode16 webrtc/modules/audio_device/ios/audio_device_ios.h:16: #include "webrtc/base/criticalsection.h" On 2015/11/18 18:51:48, ...
5 years, 1 month ago (2015-11-19 12:04:19 UTC) #21
henrika_webrtc
pbos: PTAL
5 years, 1 month ago (2015-11-19 12:07:11 UTC) #22
henrika_webrtc
pbos: done more tests and found some issues, please hold thanks.
5 years, 1 month ago (2015-11-19 14:26:31 UTC) #23
pbos-webrtc
On 2015/11/19 14:26:31, henrika_webrtc wrote: > pbos: done more tests and found some issues, please ...
5 years, 1 month ago (2015-11-19 14:26:50 UTC) #24
henrika_webrtc
pbos: many, many tests later. Please check the (final) version. Thanks!
5 years, 1 month ago (2015-11-20 11:54:13 UTC) #26
pbos-webrtc
https://codereview.webrtc.org/1435293003/diff/80001/webrtc/modules/audio_device/ios/audio_device_ios.mm File webrtc/modules/audio_device/ios/audio_device_ios.mm (right): https://codereview.webrtc.org/1435293003/diff/80001/webrtc/modules/audio_device/ios/audio_device_ios.mm#newcode922 webrtc/modules/audio_device/ios/audio_device_ios.mm:922: // TODO(henrika): remove CHECK when we are sure that ...
5 years, 1 month ago (2015-11-20 12:29:50 UTC) #27
henrika_webrtc
Thanks! https://codereview.webrtc.org/1435293003/diff/80001/webrtc/modules/audio_device/ios/audio_device_ios.mm File webrtc/modules/audio_device/ios/audio_device_ios.mm (right): https://codereview.webrtc.org/1435293003/diff/80001/webrtc/modules/audio_device/ios/audio_device_ios.mm#newcode922 webrtc/modules/audio_device/ios/audio_device_ios.mm:922: // TODO(henrika): remove CHECK when we are sure ...
5 years, 1 month ago (2015-11-20 12:53:48 UTC) #28
henrika_webrtc
PTAL
5 years, 1 month ago (2015-11-20 12:54:30 UTC) #29
pbos-webrtc
lgtm
5 years, 1 month ago (2015-11-20 14:16:22 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1435293003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1435293003/160001
5 years, 1 month ago (2015-11-20 14:25:36 UTC) #33
henrika_webrtc
Committed patchset #8 (id:160001) manually as 34911ad55c4c4c549fe60e1b4cc127420b15666b (presubmit successful).
5 years, 1 month ago (2015-11-20 14:47:23 UTC) #34
commit-bot: I haz the power
5 years, 1 month ago (2015-11-20 14:47:30 UTC) #35
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/34911ad55c4c4c549fe60e1b4cc127420b15666b
Cr-Commit-Position: refs/heads/master@{#10728}

Powered by Google App Engine
This is Rietveld 408576698