diff options
Diffstat (limited to 'third_party/libwebrtc/moz-patch-stack/0078.patch')
-rw-r--r-- | third_party/libwebrtc/moz-patch-stack/0078.patch | 109 |
1 files changed, 53 insertions, 56 deletions
diff --git a/third_party/libwebrtc/moz-patch-stack/0078.patch b/third_party/libwebrtc/moz-patch-stack/0078.patch index b6198f6e9c..c7d811ffd7 100644 --- a/third_party/libwebrtc/moz-patch-stack/0078.patch +++ b/third_party/libwebrtc/moz-patch-stack/0078.patch @@ -1,60 +1,57 @@ -From: Andreas Pehrson <apehrson@mozilla.com> -Date: Wed, 10 May 2023 07:06:00 +0000 -Subject: Bug 1810949 - cherry-pick upstream libwebrtc commit 91d5fc2ed6. - r=webrtc-reviewers,mjf +From: Nico Grunbaum <na-g@nostrum.com> +Date: Tue, 6 Jun 2023 16:37:00 -0700 +Subject: Bug 1833237 - (fix-f0be3bee1f) remove reference to + portal:pipewire_base;r?pehrsons -Upstream commit: https://webrtc.googlesource.com/src/+/91d5fc2ed6ef347d90182868320267d45cf9525b - Support more pixel formats in v4l2 camera backend - - These were tested with gstreamer and v4l2loopback, example setup: - $ sudo v4l2loopback-ctl add -n BGRA 10 - $ gst-launch-1.0 videotestsrc pattern=smpte-rp-219 ! \ - video/x-raw,format=BGRA ! v4l2sink device=/dev/video10 > /dev/null & - - Then conversion was confirmed with video_loopback: - $ ./video_loopback --capture_device_index=3 --logs 2>&1 | grep -i \ - capture - - Bug: webrtc:14830 - Change-Id: I35c8e453cf7f9a2923935b0ad82477a3144e8c12 - Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291532 - Commit-Queue: Stefan Holmer <stefan@webrtc.org> - Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> - Reviewed-by: Stefan Holmer <stefan@webrtc.org> - Cr-Commit-Position: refs/heads/main@{#39979} - -Differential Revision: https://phabricator.services.mozilla.com/D177232 -Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/92dc582fdcf3a2fdb3fcdbcd96080d081de8f8d5 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/8ff886a4d366b4be35b329d1ef733a6df542067c --- - .../video_capture/linux/device_info_v4l2.cc | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) + modules/video_capture/BUILD.gn | 4 ++++ + modules/video_capture/linux/device_info_pipewire.cc | 4 ++-- + modules/video_capture/linux/device_info_pipewire.h | 3 ++- + 3 files changed, 8 insertions(+), 3 deletions(-) -diff --git a/modules/video_capture/linux/device_info_v4l2.cc b/modules/video_capture/linux/device_info_v4l2.cc -index 04caaea592..abd2886f85 100644 ---- a/modules/video_capture/linux/device_info_v4l2.cc -+++ b/modules/video_capture/linux/device_info_v4l2.cc -@@ -57,6 +57,24 @@ - #define BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) ) - #endif +diff --git a/modules/video_capture/BUILD.gn b/modules/video_capture/BUILD.gn +index 8f89918359..45a0272eee 100644 +--- a/modules/video_capture/BUILD.gn ++++ b/modules/video_capture/BUILD.gn +@@ -104,6 +104,10 @@ if (!build_with_chromium || is_linux || is_chromeos) { + "../../media:rtc_media_base", + "../portal", + ] ++ if (build_with_mozilla) { ++ configs -= [ "../portal:pipewire_base" ] ++ public_deps = [ "//third_party/pipewire" ] ++ } + } + } + if (is_win) { +diff --git a/modules/video_capture/linux/device_info_pipewire.cc b/modules/video_capture/linux/device_info_pipewire.cc +index e9f7e6a869..fc0554f384 100644 +--- a/modules/video_capture/linux/device_info_pipewire.cc ++++ b/modules/video_capture/linux/device_info_pipewire.cc +@@ -49,9 +49,9 @@ int32_t DeviceInfoPipeWire::GetDeviceName(uint32_t deviceNumber, + char* deviceUniqueIdUTF8, + uint32_t deviceUniqueIdUTF8Length, + char* productUniqueIdUTF8, +- uint32_t productUniqueIdUTF8Length) { ++ uint32_t productUniqueIdUTF8Length, ++ pid_t* pid) { + RTC_CHECK(pipewire_session_); +- + if (deviceNumber >= NumberOfDevices()) + return -1; -+// These defines are here to support building on kernel 3.16 which some -+// downstream projects, e.g. Firefox, use. -+// TODO(apehrson): Remove them and their undefs when no longer needed. -+#ifndef V4L2_PIX_FMT_ABGR32 -+#define ABGR32_OVERRIDE 1 -+#define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4') -+#endif -+ -+#ifndef V4L2_PIX_FMT_ARGB32 -+#define ARGB32_OVERRIDE 1 -+#define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4') -+#endif -+ -+#ifndef V4L2_PIX_FMT_RGBA32 -+#define RGBA32_OVERRIDE 1 -+#define V4L2_PIX_FMT_RGBA32 v4l2_fourcc('A', 'B', '2', '4') -+#endif -+ - namespace webrtc { - namespace videocapturemodule { - #ifdef WEBRTC_LINUX +diff --git a/modules/video_capture/linux/device_info_pipewire.h b/modules/video_capture/linux/device_info_pipewire.h +index 4da0c7a90b..8a33d75892 100644 +--- a/modules/video_capture/linux/device_info_pipewire.h ++++ b/modules/video_capture/linux/device_info_pipewire.h +@@ -29,7 +29,8 @@ class DeviceInfoPipeWire : public DeviceInfoImpl { + char* deviceUniqueIdUTF8, + uint32_t deviceUniqueIdUTF8Length, + char* productUniqueIdUTF8 = nullptr, +- uint32_t productUniqueIdUTF8Length = 0) override; ++ uint32_t productUniqueIdUTF8Length = 0, ++ pid_t* pid = 0) override; + /* + * Fills the membervariable _captureCapabilities with capabilites for the + * given device name. |