summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobert.mader@collabora.com <robert.mader@collabora.com>2023-02-11 07:06:14 +0100
committerMarge Bot <marge-bot@gnome.org>2023-04-26 12:19:42 +0000
commitb916ced2e62bfa36ebbb258117ed931560f688be (patch)
tree086249fd252d7a09a4838a375a7a1982a27fbb2b
parentfd730a4db7093b4871b4559d1cd90d2967146eda (diff)
downloadgnome-shell-b916ced2e62bfa36ebbb258117ed931560f688be.tar.gz
screencastService: Add dmabuf/GL pipeline
This pipeline imports dmabufs and does format conversion using GL. The `video/x-raw(memory:DMABuf)` filter ensures format negotiation between `pipewiresrc` and Mutter will only succeed if Mutter advertises dmabuf support as well, falling back to the next pipeline otherwise. Using this pipeline frees Mutter from downloading buffer content on the main thread which can have a big impact on compositor performance. Doing format conversion on the GPU should further improve the overall performance on most hardware. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2597>
-rw-r--r--js/dbusServices/screencast/screencastService.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/dbusServices/screencast/screencastService.js b/js/dbusServices/screencast/screencastService.js
index 37327e24c..d63dd8087 100644
--- a/js/dbusServices/screencast/screencastService.js
+++ b/js/dbusServices/screencast/screencastService.js
@@ -31,6 +31,15 @@ const DEFAULT_DRAW_CURSOR = true;
const PIPELINES = [
{
pipelineString:
+ 'capsfilter caps=video/x-raw(memory:DMABuf),max-framerate=%F/1 ! \
+ glupload ! glcolorconvert ! gldownload ! \
+ queue ! \
+ vp8enc cpu-used=16 max-quantizer=17 deadline=1 keyframe-mode=disabled threads=%T static-threshold=1000 buffer-size=20000 ! \
+ queue ! \
+ webmmux',
+ },
+ {
+ pipelineString:
'capsfilter caps=video/x-raw,max-framerate=%F/1 ! \
videoconvert chroma-mode=none dither=none matrix-mode=output-only n-threads=%T ! \
queue ! \