DescriptionImproved timer implementation in AudioInputController since AudioInputController::DoResetNoDataTimer() has an extreme task execution count in chrome://profiler.
There is no longer a PostTask in OnData() to reset the data timer. Instead, a simple flag is set and this flag is checked, and reset, on a periodic basis. If packets no longer are generated, the cleared flag will be detected an and OnError() callback will be given to the event handler.
I have verified the new design in different ways:
1) Verified that no AudioInputController function pops up in the profiler.
2) media_unittest --gtest_filter=AudioInputControllerTest*RecordAndError
3) Tried out the speech input API and the removed the microphone while recording and verified that it worked.
4) Same as 3) but for WebRTC in loopback using the https://apprtc.appspot.com/?debug=loopback demo.
BUG=123588
TEST=media_unittest --gtest_filter=AudioInputControllerTest*RecordAndError
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=132583
Patch Set 1 #
Total comments: 18
Patch Set 2 : Changes based on first review round #
Total comments: 2
Patch Set 3 : Rebased and final nits #Patch Set 4 : Nits #Messages
Total messages: 13 (0 generated)
|