• Sergey Ulanov's avatar
    [Fuchsia] Improve error handling in VideoCaptureDeviceFactoryFuchsia · 28470ea3
    Sergey Ulanov authored
    Previously VideoCaptureDeviceFactoryFuchsia was logging an ERROR when
    DeviceWatcher connection is disconnected, while this error is expected
    in some environments. In this change:
      1. Fixed CastRunner to close DeviceWatcher with ZX_ERR_UNAVAILABLE
         when no applications have camera access.
      2. Fixed VideoCaptureDeviceFactoryFuchsia to avoid logging errors for
         ZX_ERR_UNAVAILABLE.
      3. Improved handling of disconnected state in
         VideoCaptureDeviceFactoryFuchsia: now it will reconnect the channel
         in CreateDevice().
      4. Added unittests for (3).
    
    TBR=guidou@chromium.org
    
    Bug: fuchsia:54060
    Change-Id: Ib39fd1ef0d1a787f762bcd961196800105e45b97
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2246877
    Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
    Reviewed-by: default avatarDavid Dorwin <ddorwin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#790104}
    28470ea3
cast_runner.cc 13.9 KB