[gnome-shell] screencast: Don't force buffer copies on recent gstreamer versions



commit d7b443197bcc0789305d6a8722bca1fdd182070b
Author: Sebastian Keller <skeller gnome org>
Date:   Thu Oct 6 00:20:16 2022 +0200

    screencast: Don't force buffer copies on recent gstreamer versions
    
    Gstreamer 1.20.4 includes a fix in the videoconvert element that makes
    it no longer necessary to always copy buffers in pipewiresrc to have
    smooth recordings. This change now skips those otherwise unnecessary
    copies when using a new enough videoconvert.
    
    Related: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2928
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2503>

 js/dbusServices/screencast/screencastService.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/js/dbusServices/screencast/screencastService.js b/js/dbusServices/screencast/screencastService.js
index 5ff5aff529..bb53874289 100644
--- a/js/dbusServices/screencast/screencastService.js
+++ b/js/dbusServices/screencast/screencastService.js
@@ -231,7 +231,8 @@ var Recorder = class {
     _ensurePipeline(nodeId) {
         const framerate = this._framerate;
         const needsCopy =
-            Gst.Registry.get().check_feature_version('pipewiresrc', 0, 3, 57);
+            Gst.Registry.get().check_feature_version('pipewiresrc', 0, 3, 57) &&
+            !Gst.Registry.get().check_feature_version('videoconvert', 1, 20, 4);
 
         let fullPipeline = `
             pipewiresrc path=${nodeId}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]