DescriptionRe-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.) #
Messages
Total messages: 19 (11 generated)
|