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

Issue 2622073003: Fix getUserMedia so that failure is reported for invalid audio sources. (Closed)

Created:
3 years, 11 months ago by tommi (sloooow) - chröme
Modified:
3 years, 11 months ago
CC:
avayvod+watch_chromium.org, chfremer+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, dewittj, einbinder+watch-test-runner_chromium.org, feature-media-reviews_chromium.org, imcheng+watch_chromium.org, isheriff+watch_chromium.org, jam, jasonroberts+watch_google.com, jochen+watch_chromium.org, mcasas+watch+vc_chromium.org, miu+watch_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, Peter Beverloo, posciak+watch_chromium.org, xjz+watch_chromium.org, Guido Urdaneta
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix getUserMedia so that failure is reported for invalid audio sources. This is a reland: * Original CL https://codereview.chromium.org/2623443002/ * The originally reviewed CL is in the first patch. * A fix for the issue discovered on the "Win7 Tests (dbg)(1)" bot is in the second patch set. This changes getUserMedia to wait for initialization of local audio sources before issuing the completion callback (either success or failure). Previously, if an error occurs between attempting to start a local audio source and the render side OnStreamCreated callback, getUserMedia would report successful completion with an audio track but no audio would actually be delivered for that track. BUG=679210 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2622073003 Cr-Commit-Position: refs/heads/master@{#443660} Committed: https://chromium.googlesource.com/chromium/src/+/5d0910b9e09533bf6dfe128adcfb882bc2d5e845

Patch Set 1 #

Patch Set 2 : Don't delete a request object that's on the stack, from inside a callback from that request object … #

Patch Set 3 : Change approach to be more conservative. Instead adapt OnAudioSourceStarted to the current design a… #

Total comments: 26

Patch Set 4 : Address comments #

Patch Set 5 : Revert cast and layout_test changes #

Total comments: 2

Patch Set 6 : Switch to std::vector and std::unique_ptr #

Unified diffs Side-by-side diffs Delta from patch set Stats (+415 lines, -156 lines) Patch
M content/renderer/media/local_media_stream_audio_source.h View 3 chunks +6 lines, -1 line 0 comments Download
M content/renderer/media/local_media_stream_audio_source.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M content/renderer/media/rtc_peer_connection_handler_unittest.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M content/renderer/media/user_media_client_impl.h View 1 2 3 4 5 9 chunks +51 lines, -10 lines 0 comments Download
M content/renderer/media/user_media_client_impl.cc View 1 2 3 4 5 13 chunks +227 lines, -126 lines 0 comments Download
M content/renderer/media/user_media_client_impl_unittest.cc View 3 chunks +18 lines, -1 line 0 comments Download
M content/renderer/media/webrtc/processed_local_audio_source.h View 4 chunks +7 lines, -2 lines 0 comments Download
M content/renderer/media/webrtc/processed_local_audio_source.cc View 3 chunks +8 lines, -8 lines 0 comments Download
M content/renderer/media/webrtc/processed_local_audio_source_unittest.cc View 3 chunks +11 lines, -2 lines 0 comments Download
M content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M media/audio/audio_input_device.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M media/audio/audio_input_device_unittest.cc View 3 chunks +53 lines, -0 lines 0 comments Download
M media/base/audio_capturer_source.h View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 39 (24 generated)
tommi (sloooow) - chröme
Don't delete a request object that's on the stack, from inside a callback from that ...
3 years, 11 months ago (2017-01-11 12:53:37 UTC) #1
tommi (sloooow) - chröme
miu - main reviewer. jochen - owner of blink_test_runner.c (already reviewed), I'm working on a ...
3 years, 11 months ago (2017-01-11 13:06:08 UTC) #3
jochen (gone - plz use gerrit)
blink test runner lgtm
3 years, 11 months ago (2017-01-11 13:07:46 UTC) #6
tommi (sloooow) - chröme
Change approach to be more conservative. Instead adapt OnAudioSourceStarted to the current design and add ...
3 years, 11 months ago (2017-01-11 14:36:37 UTC) #9
xhwang
media/base/audio_capturer_source.h lgtm
3 years, 11 months ago (2017-01-11 17:28:10 UTC) #14
miu
Comments on PS3 (mostly just moving a few things around to help clarify the code ...
3 years, 11 months ago (2017-01-11 20:51:12 UTC) #15
tommi (sloooow) - chröme
Address comments
3 years, 11 months ago (2017-01-11 22:39:11 UTC) #16
tommi (sloooow) - chröme
https://codereview.chromium.org/2622073003/diff/40001/content/renderer/media/external_media_stream_audio_source.cc File content/renderer/media/external_media_stream_audio_source.cc (right): https://codereview.chromium.org/2622073003/diff/40001/content/renderer/media/external_media_stream_audio_source.cc#newcode43 content/renderer/media/external_media_stream_audio_source.cc:43: // OnCaptureStarted() is expected to be called synchronously by ...
3 years, 11 months ago (2017-01-11 22:40:59 UTC) #18
tommi (sloooow) - chröme
Revert cast and layout_test changes
3 years, 11 months ago (2017-01-11 23:46:12 UTC) #20
miu
lgtm % two things I think you should try to change: https://codereview.chromium.org/2622073003/diff/40001/content/renderer/media/external_media_stream_audio_source.cc File content/renderer/media/external_media_stream_audio_source.cc (right): ...
3 years, 11 months ago (2017-01-12 21:25:37 UTC) #25
tommi (sloooow) - chröme
Switch to std::vector and std::unique_ptr
3 years, 11 months ago (2017-01-13 18:28:11 UTC) #27
tommi (sloooow) - chröme
https://codereview.chromium.org/2622073003/diff/40001/content/renderer/media/user_media_client_impl.cc File content/renderer/media/user_media_client_impl.cc (right): https://codereview.chromium.org/2622073003/diff/40001/content/renderer/media/user_media_client_impl.cc#newcode513 content/renderer/media/user_media_client_impl.cc:513: std::vector<UserMediaRequestInfo*> requests; On 2017/01/12 21:25:37, miu wrote: > On ...
3 years, 11 months ago (2017-01-13 18:43:53 UTC) #30
miu
All sgtm, and patch 6 still lgtm. Thanks for trying out the alternative ideas.
3 years, 11 months ago (2017-01-13 20:02:14 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2622073003/100001
3 years, 11 months ago (2017-01-13 20:44:31 UTC) #36
commit-bot: I haz the power
3 years, 11 months ago (2017-01-13 20:50:47 UTC) #39
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/5d0910b9e09533bf6dfe128adcfb...

Powered by Google App Engine
This is Rietveld 408576698