diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /third_party/libwebrtc/moz-patch-stack/0033.patch | |
parent | Initial commit. (diff) | |
download | thunderbird-upstream.tar.xz thunderbird-upstream.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
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 + |