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