From dd2e0a6516dbc764e2ea744a54108a651b2e6f4a Mon Sep 17 00:00:00 2001
|
From: Jeffy Chen <jeffy.chen@rock-chips.com>
|
Date: Mon, 31 May 2021 07:25:58 +0800
|
Subject: [PATCH 11/15] HACK: media: capture: linux: Allow camera without
|
supported format
|
|
The chromium would only accept discrete frame sizes.
|
|
Hack it to make Rockchip ISP camera working.
|
|
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
|
---
|
.../video/linux/video_capture_device_factory_linux.cc | 6 ++----
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
|
diff --git a/media/capture/video/linux/video_capture_device_factory_linux.cc b/media/capture/video/linux/video_capture_device_factory_linux.cc
|
index 1351093ed..e1320551f 100644
|
--- a/media/capture/video/linux/video_capture_device_factory_linux.cc
|
+++ b/media/capture/video/linux/video_capture_device_factory_linux.cc
|
@@ -192,10 +192,8 @@ void VideoCaptureDeviceFactoryLinux::GetDevicesInfo(
|
|
VideoCaptureFormats supported_formats;
|
GetSupportedFormatsForV4L2BufferType(fd.get(), &supported_formats);
|
- if (supported_formats.empty()) {
|
- DVLOG(1) << "No supported formats: " << unique_id;
|
- continue;
|
- }
|
+ if (supported_formats.empty())
|
+ LOG(WARNING) << "No supported formats: " << unique_id;
|
|
// HACK: Somehow the newest chromium would prefer using the last device in some cases, e.g. apprtc
|
devices_info.emplace(devices_info.begin(), VideoCaptureDeviceDescriptor(
|
--
|
2.20.1
|