| Index: content/common/gpu/media/v4l2_video_encode_accelerator.cc
|
| diff --git a/content/common/gpu/media/v4l2_video_encode_accelerator.cc b/content/common/gpu/media/v4l2_video_encode_accelerator.cc
|
| index 88c62669eaa55a1cd8f9ec9362c3d8346f27c49d..b88a4945e72482813f0049bd2a1396f48ec1afa8 100644
|
| --- a/content/common/gpu/media/v4l2_video_encode_accelerator.cc
|
| +++ b/content/common/gpu/media/v4l2_video_encode_accelerator.cc
|
| @@ -120,13 +120,19 @@ bool V4L2VideoEncodeAccelerator::Initialize(
|
|
|
| struct v4l2_capability caps;
|
| memset(&caps, 0, sizeof(caps));
|
| - const __u32 kCapsRequired = V4L2_CAP_VIDEO_CAPTURE_MPLANE |
|
| - V4L2_CAP_VIDEO_OUTPUT_MPLANE | V4L2_CAP_STREAMING;
|
| + const __u32 kCapsRequired = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING;
|
| IOCTL_OR_ERROR_RETURN_FALSE(VIDIOC_QUERYCAP, &caps);
|
| if ((caps.capabilities & kCapsRequired) != kCapsRequired) {
|
| - LOG(ERROR) << "Initialize(): ioctl() failed: VIDIOC_QUERYCAP: "
|
| - "caps check failed: 0x" << std::hex << caps.capabilities;
|
| - return false;
|
| + // This cap combination is deprecated, but some older drivers may still be
|
| + // returning it.
|
| + const __u32 kCapsRequiredCompat = V4L2_CAP_VIDEO_CAPTURE_MPLANE |
|
| + V4L2_CAP_VIDEO_OUTPUT_MPLANE |
|
| + V4L2_CAP_STREAMING;
|
| + if ((caps.capabilities & kCapsRequiredCompat) != kCapsRequiredCompat) {
|
| + LOG(ERROR) << "Initialize(): ioctl() failed: VIDIOC_QUERYCAP: "
|
| + "caps check failed: 0x" << std::hex << caps.capabilities;
|
| + return false;
|
| + }
|
| }
|
|
|
| if (!SetFormats(input_format, output_profile)) {
|
|
|