V4L2: handle device capabilities correctly
cap.capabilities describes all capabilities of the whole physical device. It may contain V4L2_CAP_VIDEO_CAPTURE and V4L2_CAP_VIDEO_OUTPUT if multiple /dev/video* device nodes are part of the same physical device. If the V4L2_CAP_DEVICE_CAPS flag is set, then device_caps contains the capabilities of the currently opened device node. So this should be checked as well to determine if the device node is a capture device. Bug: None Change-Id: I83c0516c546121a0fac82380b72d1c8f3cb22fc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537967Reviewed-by:Shik Chen <shik@chromium.org> Commit-Queue: Shik Chen <shik@chromium.org> Cr-Commit-Position: refs/heads/master@{#828754}
Showing
Please register or sign in to comment