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

Issue 2623443002: 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, 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
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix getUserMedia so that failure is reported for invalid audio sources. 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/2623443002 Cr-Commit-Position: refs/heads/master@{#442323} Committed: https://chromium.googlesource.com/chromium/src/+/81cb66acf3f8099e416c7fc5ecbcaabf6d5c3c04

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+394 lines, -130 lines) Patch
M chrome/renderer/media/cast_receiver_audio_valve.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/renderer/media/cast_receiver_audio_valve.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/renderer/media/cast_receiver_session_delegate.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/external_media_stream_audio_source.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/external_media_stream_audio_source.cc View 2 chunks +8 lines, -1 line 0 comments Download
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 7 chunks +43 lines, -7 lines 0 comments Download
M content/renderer/media/user_media_client_impl.cc View 1 10 chunks +184 lines, -99 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 content/shell/renderer/layout_test/blink_test_runner.cc View 1 chunk +12 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 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (14 generated)
tommi (sloooow) - chröme
guidou - main reviewer (everything please) owners: xhwang - media/base/audio_capturer_source.h jochen - blink_test_runner.cc
3 years, 11 months ago (2017-01-08 17:50:51 UTC) #3
jochen (gone - plz use gerrit)
is it possible to add a layout test or browser test for this? blink_test_runner.cc lgtm
3 years, 11 months ago (2017-01-09 08:31:53 UTC) #8
tommi (sloooow) - chröme
On 2017/01/09 08:31:53, jochen wrote: > is it possible to add a layout test or ...
3 years, 11 months ago (2017-01-09 09:08:47 UTC) #9
Guido Urdaneta
lgtm % nits https://codereview.chromium.org/2623443002/diff/1/content/renderer/media/user_media_client_impl.cc File content/renderer/media/user_media_client_impl.cc (right): https://codereview.chromium.org/2623443002/diff/1/content/renderer/media/user_media_client_impl.cc#newcode499 content/renderer/media/user_media_client_impl.cc:499: for (auto it = pending_local_sources_.begin(); DCHECK ...
3 years, 11 months ago (2017-01-09 11:08:40 UTC) #10
tommi (sloooow) - chröme
Address comments
3 years, 11 months ago (2017-01-09 11:39:14 UTC) #11
tommi (sloooow) - chröme
https://codereview.chromium.org/2623443002/diff/1/content/renderer/media/user_media_client_impl.cc File content/renderer/media/user_media_client_impl.cc (right): https://codereview.chromium.org/2623443002/diff/1/content/renderer/media/user_media_client_impl.cc#newcode499 content/renderer/media/user_media_client_impl.cc:499: for (auto it = pending_local_sources_.begin(); On 2017/01/09 11:08:40, Guido ...
3 years, 11 months ago (2017-01-09 11:39:30 UTC) #12
xhwang
rs lgtm
3 years, 11 months ago (2017-01-09 17:40:36 UTC) #17
tommi (sloooow) - chröme
On 2017/01/09 17:40:36, xhwang wrote: > rs lgtm Thanks all. Jochen - I think that ...
3 years, 11 months ago (2017-01-09 20:01:44 UTC) #18
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/2623443002/20001
3 years, 11 months ago (2017-01-09 20:03:26 UTC) #21
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/81cb66acf3f8099e416c7fc5ecbcaabf6d5c3c04
3 years, 11 months ago (2017-01-09 20:19:14 UTC) #24
dewittj
3 years, 11 months ago (2017-01-09 22:23:11 UTC) #25
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:20001) has been created in
https://codereview.chromium.org/2626533002/ by dewittj@chromium.org.

The reason for reverting is: Revert due to WebRTC tests failing:

https://uberchromegw.corp.google.com/i/chromium.win/builders/Win7%20Tests%20%...

[4832:364:0109/131325.673:4351226:ERROR:browser_test_utils.cc(147)] Cannot
communicate with DOMMessageQueue.
c:\c\win\src\contentrowser\webrtc\webrtc_content_browsertest_base.cc(66):
error: Value of: ExecuteScriptAndExtractString(shell(), javascript, &result)
  Actual: false
Expected: true
Failed to execute javascript callAndRenegotiateToVideo({audio: true}, {audio:
true, video:true});.
From javascript: (nothing)
When executing 'callAndRenegotiateToVideo({audio: true}, {audio: true,
video:true});'
c:\c\win\src\contentrowser\webrtc\webrtc_content_browsertest_base.cc(90):
error: Failed

and

[4704:4156:0109/131352.840:4378402:ERROR:browser_test_utils.cc(147)] Cannot
communicate with DOMMessageQueue.
c:\c\win\src\contentrowser\webrtc\webrtc_content_browsertest_base.cc(66):
error: Value of: ExecuteScriptAndExtractString(shell(), javascript, &result)
  Actual: false
Expected: true
Failed to execute javascript getUserMediaInIframeAndCloseInSuccessCb({audio:
true});.
From javascript: (nothing)
When executing 'getUserMediaInIframeAndCloseInSuccessCb({audio: true});'
c:\c\win\src\contentrowser\webrtc\webrtc_content_browsertest_base.cc(90):
error: Failed.

Powered by Google App Engine
This is Rietveld 408576698