7cc1fe
diff -up firefox-68.0/config/system-headers.mozbuild.firefox-pipewire firefox-68.0/config/system-headers.mozbuild
7cc1fe
--- firefox-68.0/config/system-headers.mozbuild.firefox-pipewire	2019-07-01 22:30:26.000000000 +0200
7cc1fe
+++ firefox-68.0/config/system-headers.mozbuild	2019-07-08 15:26:15.397161627 +0200
7cc1fe
@@ -314,6 +314,7 @@ system_headers = [
7cc1fe
     'Gestalt.h',
7cc1fe
     'getopt.h',
7cc1fe
     'gio/gio.h',
7cc1fe
+    'gio/gunixfdlist.h',
7cc1fe
     'glibconfig.h',
7cc1fe
     'glib.h',
7cc1fe
     'glib-object.h',
7cc1fe
@@ -607,6 +608,7 @@ system_headers = [
7cc1fe
     'Pgenerr.h',
7cc1fe
     'PGenErr.h',
7cc1fe
     'Ph.h',
7cc1fe
+    'pipewire/pipewire.h',
7cc1fe
     'pixman.h',
7cc1fe
     'pk11func.h',
7cc1fe
     'pk11pqg.h',
7cc1fe
diff -up firefox-68.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build.firefox-pipewire firefox-68.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build
7cc1fe
--- firefox-68.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build.firefox-pipewire	2019-07-01 22:30:33.000000000 +0200
7cc1fe
+++ firefox-68.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build	2019-07-08 15:26:15.397161627 +0200
7cc1fe
@@ -194,6 +194,28 @@ if CONFIG["OS_TARGET"] == "Linux":
7cc1fe
         "/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc"
7cc1fe
     ]
7cc1fe
 
7cc1fe
+# PipeWire specific files
7cc1fe
+if CONFIG["OS_TARGET"] == "Linux":
7cc1fe
+
7cc1fe
+    DEFINES["WEBRTC_USE_PIPEWIRE"] = "1"
7cc1fe
+
7cc1fe
+    OS_LIBS += [
7cc1fe
+        "rt",
7cc1fe
+        "pipewire-0.2",
7cc1fe
+        "glib-2.0",
7cc1fe
+        "gio-2.0",
7cc1fe
+        "gobject-2.0"
7cc1fe
+    ]
7cc1fe
+
7cc1fe
+    CXXFLAGS += CONFIG['TK_CFLAGS']
7cc1fe
+
7cc1fe
+    UNIFIED_SOURCES += [
7cc1fe
+        "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc",
7cc1fe
+        "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc",
7cc1fe
+        "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc"
7cc1fe
+    ]
7cc1fe
+
7cc1fe
+
7cc1fe
 if CONFIG["OS_TARGET"] == "NetBSD":
7cc1fe
 
7cc1fe
     DEFINES["USE_X11"] = "1"
7cc1fe
diff -up firefox-68.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h.firefox-pipewire firefox-68.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h
7cc1fe
--- firefox-68.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h.firefox-pipewire	2019-07-08 16:42:13.936254926 +0200
7cc1fe
+++ firefox-68.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h	2019-07-08 16:42:17.509264974 +0200
7cc1fe
@@ -141,7 +141,7 @@ class DesktopCaptureOptions {
7cc1fe
   bool disable_effects_ = true;
7cc1fe
   bool detect_updated_region_ = false;
7cc1fe
 #if defined(WEBRTC_USE_PIPEWIRE)
7cc1fe
-  bool allow_pipewire_ = false;
7cc1fe
+  bool allow_pipewire_ = true;
7cc1fe
 #endif
7cc1fe
 };
7cc1fe