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

Issue 2899413004: RL: Stop source and fire MediaStreamTrack ended event if missing audio input callbacks are detected. (Closed)

Created:
3 years, 7 months ago by Henrik Grunell
Modified:
3 years, 6 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, imcheng+watch_chromium.org, feature-media-reviews_chromium.org, posciak+watch_chromium.org, chfremer+watch_chromium.org, jam, avayvod+watch_chromium.org, darin-cc_chromium.org, asvitkine+watch_chromium.org, jasonroberts+watch_google.com, xjz+watch_chromium.org, mfoltz+watch_chromium.org, isheriff+watch_chromium.org, miu+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Re-land: Stop source and fire MediaStreamTrack ended event if missing audio input callbacks are detected. This way the javascript application is informed when there's a problem with the input device. Since the detection is in the renderer process we would also catch any other issues in the pipeline, including on the process border (i.e. the socket pair), should it render the same type of symptom. * Detection is done in AudioInputDevice as this corresponds to a physical device which is what we want to detect missing callbacks for. * When detected we call CaptureError() on the capturer, which stops the source and puts the track in ended state and fires the ended event. * The time with missing callbacks before detecting is chosen to 12 seconds, so that other components down the stack have a chance to defer start if needed and report startup success stats. Specifically the Mac implementation. See also code comment in the CL. * UMA stats is added; reporting a boolean when stopping. Tested manually by altering a Linux build with https://codereview.chromium.org/2891303002/ and using a WebRTC test page with the MediaStreamTrack.onended set to log that the event was fired. Original patch (1) from issue 2888383002 at patchset 300001 (http://crrev.com/2888383002#ps300001) BUG=722335, webrtc:4799 TEST=See above. TBR=ossu@chromium.org, tommi@chromium.org, isherman@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;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/2899413004 Cr-Commit-Position: refs/heads/master@{#474628} Committed: https://chromium.googlesource.com/chromium/src/+/021d9e05dc8384ba3d5f7c1c1834ee0bf9fd3e5c

Patch Set 1 : Original reverted patch #

Patch Set 2 : Create timer in Start(), delete in Stop(). #

Patch Set 3 : Only stop timer if created. (We can Stop() without Start()ed.) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -11 lines) Patch
M content/renderer/media/local_media_stream_audio_source.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M media/audio/audio_input_device.h View 1 3 chunks +31 lines, -0 lines 0 comments Download
M media/audio/audio_input_device.cc View 1 2 9 chunks +89 lines, -7 lines 0 comments Download
M tools/metrics/histograms/enums.xml View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 2 chunks +13 lines, -4 lines 0 comments Download

Messages

Total messages: 19 (11 generated)
Henrik Grunell
Created re-land CL. In the original CL the timer was deleted in the AID dtor, ...
3 years, 7 months ago (2017-05-25 09:32:20 UTC) #6
Henrik Grunell
On 2017/05/25 09:32:20, Henrik Grunell wrote: > Created re-land CL. In the original CL the ...
3 years, 7 months ago (2017-05-25 09:55:35 UTC) #7
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/2899413004/40001
3 years, 7 months ago (2017-05-25 11:26:05 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/021d9e05dc8384ba3d5f7c1c1834ee0bf9fd3e5c
3 years, 7 months ago (2017-05-25 11:30:46 UTC) #14
Ilya Sherman
On 2017/05/25 11:30:46, commit-bot: I haz the power wrote: > Committed patchset #3 (id:40001) as ...
3 years, 7 months ago (2017-05-25 22:03:22 UTC) #15
tommi (sloooow) - chröme
in the spirit of better late than never, lgtm :)
3 years, 7 months ago (2017-05-26 08:59:02 UTC) #16
ossu-chromium
lgtm from me as well!
3 years, 7 months ago (2017-05-26 11:51:33 UTC) #17
Henrik Grunell
3 years, 7 months ago (2017-05-26 21:01:02 UTC) #18
Message was sent while issue was closed.
On 2017/05/25 22:03:22, Ilya Sherman wrote:
> On 2017/05/25 11:30:46, commit-bot: I haz the power wrote:
> > Committed patchset #3 (id:40001) as
> >
>
https://chromium.googlesource.com/chromium/src/+/021d9e05dc8384ba3d5f7c1c1834...
> 
> Hmm, it looks like this wasn't reviewed by anyone?  I think it's fine to TBR
the
> original CL's reviewers as you did, but please do have at least one person,
who
> is familiar with the code, review the diff between the previously-reverted CL
> and the latest iteration.

You're right, the fix was too large to land before any review.

Powered by Google App Engine
This is Rietveld 408576698