Index: media/video/capture/linux/video_capture_device_factory_linux.cc |
diff --git a/media/video/capture/linux/video_capture_device_factory_linux.cc b/media/video/capture/linux/video_capture_device_factory_linux.cc |
index 966e4f7b90b22f4fa4941755b8996b8a08686890..9bbc50a7f9c1f26af89030e4547a6b5e23a0d621 100644 |
--- a/media/video/capture/linux/video_capture_device_factory_linux.cc |
+++ b/media/video/capture/linux/video_capture_device_factory_linux.cc |
@@ -25,7 +25,7 @@ |
namespace media { |
static bool HasUsableFormats(int fd, uint32 capabilities) { |
- const std::list<uint32_t>& usable_fourccs = |
+ const std::list<int>& usable_fourccs = |
VideoCaptureDeviceLinux::GetListOfUsableFourCCs(false); |
static const struct { |
@@ -48,7 +48,6 @@ |
} |
} |
} |
- DLOG(ERROR) << "No usable formats found"; |
return false; |
} |
@@ -183,11 +182,9 @@ |
!(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT) && |
!(cap.capabilities & V4L2_CAP_VIDEO_OUTPUT_MPLANE)) && |
HasUsableFormats(fd.get(), cap.capabilities)) { |
- device_names->push_back(VideoCaptureDevice::Name( |
- base::StringPrintf("%s", cap.card), unique_id, |
- (cap.capabilities & V4L2_CAP_VIDEO_CAPTURE_MPLANE) |
- ? VideoCaptureDevice::Name::V4L2_MULTI_PLANE |
- : VideoCaptureDevice::Name::V4L2_SINGLE_PLANE)); |
+ VideoCaptureDevice::Name device_name(base::StringPrintf("%s", cap.card), |
+ unique_id); |
+ device_names->push_back(device_name); |
} |
} |
} |
@@ -203,14 +200,10 @@ |
return; |
supported_formats->clear(); |
- DCHECK_NE(device.capture_api_type(), |
- VideoCaptureDevice::Name::API_TYPE_UNKNOWN); |
- const v4l2_buf_type buf_type = |
- (device.capture_api_type() == VideoCaptureDevice::Name::V4L2_MULTI_PLANE) |
- ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE |
- : V4L2_BUF_TYPE_VIDEO_CAPTURE; |
- GetSupportedFormatsForV4L2BufferType(fd.get(), buf_type, supported_formats); |
- |
+ const v4l2_buf_type kCaptureTypes[] = {V4L2_BUF_TYPE_VIDEO_CAPTURE, |
+ V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE}; |
+ for (const auto& buf_type : kCaptureTypes) |
+ GetSupportedFormatsForV4L2BufferType(fd.get(), buf_type, supported_formats); |
return; |
} |