• Andres Calderon Jaramillo's avatar
    media: Workaround for Huddly GO deadlock. · ab8f999c
    Andres Calderon Jaramillo authored
    This CL stops and restarts the camera capture stream in
    V4L2CaptureDelegate the first time a timeout is detected while polling
    for captured frames. This is a workaround for a Huddly GO camera issue
    where the camera gets into a deadlock state at times at the beginning of
    the capture session. The underlying issue seems to be a kernel driver
    synchronization problem, but upgrading the kernel might not be practical
    in the short term for affected devices.
    
    1) Flash M78 Chrome OS image.
    2) Deploy Chrome in debug mode (a bunch of irrelevant DCHECKs must be
       deleted).
    3) In non-kiosk mode, visit
       https://webrtc.github.io/samples/src/content/devices/input-output/
    4) Switch between the two Huddly GO streams constantly while monitoring
       /var/log/chrome/chrome.
    Eventually, the deadlock path is hit (see the DLOG(WARNING) in
    v4l2_capture_delegate.cc) but we recover successfully and the camera
    continues capturing normally.
    
    Change-Id: Idc90aa8b9dbb069c419c3ca1b90be9b47d4a6c51
    Bug: 1010557,b:141978989
    Test: on a guado with a Huddly GO:
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1859901
    Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org>
    Reviewed-by: default avatarRicky Liang <jcliang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#708011}
    ab8f999c
v4l2_capture_delegate.h 4.89 KB