hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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