diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /third_party/libwebrtc/moz-patch-stack/0033.patch | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/moz-patch-stack/0033.patch')
-rw-r--r-- | third_party/libwebrtc/moz-patch-stack/0033.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/third_party/libwebrtc/moz-patch-stack/0033.patch b/third_party/libwebrtc/moz-patch-stack/0033.patch new file mode 100644 index 0000000000..88c0ca9151 --- /dev/null +++ b/third_party/libwebrtc/moz-patch-stack/0033.patch @@ -0,0 +1,67 @@ +From: Paul Adenot <paul@paul.cx> +Date: Wed, 4 Nov 2020 13:03:00 +0000 +Subject: Bug 1675042 - Put IR camera last in the device selection list, so + that they are never the default. r=dminor + +Differential Revision: https://phabricator.services.mozilla.com/D95764 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/754900ff2a2b1c32878baf3c76d7c0e8219419ff +--- + sdk/android/api/org/webrtc/Camera1Enumerator.java | 5 +++++ + sdk/android/api/org/webrtc/Camera2Enumerator.java | 12 ++++++++++++ + sdk/android/api/org/webrtc/CameraEnumerator.java | 1 + + 3 files changed, 18 insertions(+) + +diff --git a/sdk/android/api/org/webrtc/Camera1Enumerator.java b/sdk/android/api/org/webrtc/Camera1Enumerator.java +index fb1a21f323..4a1aacdb05 100644 +--- a/sdk/android/api/org/webrtc/Camera1Enumerator.java ++++ b/sdk/android/api/org/webrtc/Camera1Enumerator.java +@@ -63,6 +63,11 @@ public class Camera1Enumerator implements CameraEnumerator { + return info != null && info.facing == android.hardware.Camera.CameraInfo.CAMERA_FACING_BACK; + } + ++ @Override ++ public boolean isInfrared(String deviceName) { ++ return false; ++ } ++ + @Override + public List<CaptureFormat> getSupportedFormats(String deviceName) { + return getSupportedFormats(getCameraIndex(deviceName)); +diff --git a/sdk/android/api/org/webrtc/Camera2Enumerator.java b/sdk/android/api/org/webrtc/Camera2Enumerator.java +index 456d8cd060..44e239ad8e 100644 +--- a/sdk/android/api/org/webrtc/Camera2Enumerator.java ++++ b/sdk/android/api/org/webrtc/Camera2Enumerator.java +@@ -74,6 +74,18 @@ public class Camera2Enumerator implements CameraEnumerator { + == CameraMetadata.LENS_FACING_BACK; + } + ++ @Override ++ public boolean isInfrared(String deviceName) { ++ CameraCharacteristics characteristics = getCameraCharacteristics(deviceName); ++ ++ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { ++ Integer colors = characteristics.get(CameraCharacteristics.SENSOR_INFO_COLOR_FILTER_ARRANGEMENT); ++ return colors != null && colors.equals(CameraCharacteristics.SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR); ++ } ++ ++ return false; ++ } ++ + @Nullable + @Override + public List<CaptureFormat> getSupportedFormats(String deviceName) { +diff --git a/sdk/android/api/org/webrtc/CameraEnumerator.java b/sdk/android/api/org/webrtc/CameraEnumerator.java +index dc954b62e0..db34d542c8 100644 +--- a/sdk/android/api/org/webrtc/CameraEnumerator.java ++++ b/sdk/android/api/org/webrtc/CameraEnumerator.java +@@ -18,6 +18,7 @@ public interface CameraEnumerator { + public String[] getDeviceNames(); + public boolean isFrontFacing(String deviceName); + public boolean isBackFacing(String deviceName); ++ public boolean isInfrared(String deviceName); + public List<CaptureFormat> getSupportedFormats(String deviceName); + + public CameraVideoCapturer createCapturer( +-- +2.34.1 + |