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

Issue 131213003: Fixed the racing in the resampler of webrtc when two streams are calling OnData() (Closed)

Created:
6 years, 11 months ago by no longer working on chromium
Modified:
6 years, 11 months ago
CC:
chromium-reviews, fischman+watch_chromium.org, jam, mcasas+watch_chromium.org, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org
Visibility:
Public.

Description

Fixed the racing in the resampler of webrtc when two streams are calling OnData(). There can be multiple streams calling OnData() when the users setup multiple getUserMedia with WebAudio and microphone. We have no way to avoid this situation since it is a valid user cases from the JS perspective. But unfortunately webrtc does not support it since it has one global transmit mixer, and it will crash when more than 1 stream getting into its resampler. This CL introduces a lock to sequence the calls to avoid the racing, which should fix the crash. BUG=332126 TEST=https://devpool-13.talkgadget.google.com/hangouts, go to setting page and play the rington, verify no crash and sound good. Or go to https://x20web.corp.google.com/~xians/multiple_sources.html, start the call, AddWebAUdio, then Playout a clip, verify the audio sounds good and no crash. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243902

Patch Set 1 #

Total comments: 6

Patch Set 2 : addressed the comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -0 lines) Patch
M content/renderer/media/webrtc_audio_device_impl.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/media/webrtc_audio_device_impl.cc View 1 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
no longer working on chromium
Henrik, would you please review this CL? SX
6 years, 11 months ago (2014-01-09 09:55:21 UTC) #1
henrika (OOO until Aug 14)
What happens in the demo that crashed before using this patch? Does it now work ...
6 years, 11 months ago (2014-01-09 10:07:14 UTC) #2
no longer working on chromium
https://codereview.chromium.org/131213003/diff/1/content/renderer/media/webrtc_audio_device_impl.cc File content/renderer/media/webrtc_audio_device_impl.cc (right): https://codereview.chromium.org/131213003/diff/1/content/renderer/media/webrtc_audio_device_impl.cc#newcode86 content/renderer/media/webrtc_audio_device_impl.cc:86: // there are more than one input streams calling ...
6 years, 11 months ago (2014-01-09 10:18:32 UTC) #3
henrika (OOO until Aug 14)
LGTM. Perhaps you should make some ML tests and additional WebRTC + WebAudio tests as ...
6 years, 11 months ago (2014-01-09 10:35:55 UTC) #4
no longer working on chromium
On 2014/01/09 10:35:55, henrika wrote: > LGTM. Perhaps you should make some ML tests and ...
6 years, 11 months ago (2014-01-09 10:58:33 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/131213003/60001
6 years, 11 months ago (2014-01-09 11:00:48 UTC) #6
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=244050
6 years, 11 months ago (2014-01-09 14:13:35 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/131213003/60001
6 years, 11 months ago (2014-01-09 14:15:30 UTC) #8
commit-bot: I haz the power
Change committed as 243902
6 years, 11 months ago (2014-01-09 15:17:37 UTC) #9
tommi (sloooow) - chröme
shouldn't this be fixed in WebRTC?
6 years, 11 months ago (2014-01-10 15:48:00 UTC) #10
no longer working on chromium
6 years, 11 months ago (2014-01-10 15:51:43 UTC) #11
Message was sent while issue was closed.
On 2014/01/10 15:48:00, tommi wrote:
> shouldn't this be fixed in WebRTC?

It is right that the problem can be fixed either in WebRtc or in Chrome. But
this is Chrome specific problem, so it is better to fix in Chrome.
Also, the issue exists from M31, if possible, I would like to try merging it to
the previous milestones.

Powered by Google App Engine
This is Rietveld 408576698