Hello community,

here is the log from the commit of package xdg-desktop-portal-kde for 
openSUSE:Factory checked in at 2018-10-17 08:43:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xdg-desktop-portal-kde (Old)
 and      /work/SRC/openSUSE:Factory/.xdg-desktop-portal-kde.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xdg-desktop-portal-kde"

Wed Oct 17 08:43:12 2018 rev:30 rq:642481 version:5.14.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/xdg-desktop-portal-kde/xdg-desktop-portal-kde.changes
    2018-10-08 17:50:02.562130714 +0200
+++ 
/work/SRC/openSUSE:Factory/.xdg-desktop-portal-kde.new/xdg-desktop-portal-kde.changes
       2018-10-17 08:44:09.757715434 +0200
@@ -1,0 +2,13 @@
+Tue Oct 16 14:05:17 UTC 2018 - fab...@ritter-vogt.de
+
+- Update to 5.14.1
+  * New bugfix release
+  * For more details please see:
+  * https://www.kde.org/announcements/plasma-5.14.1.php
+- Changes since 5.14.0:
+  * Improve debug and don't leak gbm handle
+  * Make sure we don't process more frames then configured framerate
+  * ScreenCast: properly return failure when user cancel the dialog
+  * Make initialization of drm and egl non-fatal
+
+-------------------------------------------------------------------

Old:
----
  xdg-desktop-portal-kde-5.14.0.tar.xz
  xdg-desktop-portal-kde-5.14.0.tar.xz.sig

New:
----
  xdg-desktop-portal-kde-5.14.1.tar.xz
  xdg-desktop-portal-kde-5.14.1.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xdg-desktop-portal-kde.spec ++++++
--- /var/tmp/diff_new_pack.kMrmzR/_old  2018-10-17 08:44:10.153715099 +0200
+++ /var/tmp/diff_new_pack.kMrmzR/_new  2018-10-17 08:44:10.157715096 +0200
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -25,15 +25,15 @@
 
 %define kf5_version 5.50.0
 Name:           xdg-desktop-portal-kde
-Version:        5.14.0
+Version:        5.14.1
 Release:        0
 Summary:        QT/KF5 backend for xdg-desktop-portal
 License:        LGPL-2.1-or-later
 Group:          System/Libraries
 Url:            http://www.kde.org
-Source:         xdg-desktop-portal-kde-%{version}.tar.xz
+Source:         
https://download.kde.org/stable/plasma/5.14.1/xdg-desktop-portal-kde-%{version}.tar.xz
 %if %{with lang}
-Source1:        xdg-desktop-portal-kde-%{version}.tar.xz.sig
+Source1:        
https://download.kde.org/stable/plasma/5.14.1/xdg-desktop-portal-kde-%{version}.tar.xz.sig
 Source2:        plasma.keyring
 %endif
 BuildRequires:  extra-cmake-modules >= %{kf5_version}


++++++ xdg-desktop-portal-kde-5.14.0.tar.xz -> 
xdg-desktop-portal-kde-5.14.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-desktop-portal-kde-5.14.0/CMakeLists.txt 
new/xdg-desktop-portal-kde-5.14.1/CMakeLists.txt
--- old/xdg-desktop-portal-kde-5.14.0/CMakeLists.txt    2018-10-05 
20:25:18.000000000 +0200
+++ new/xdg-desktop-portal-kde-5.14.1/CMakeLists.txt    2018-10-16 
14:38:32.000000000 +0200
@@ -2,7 +2,7 @@
 
 project(xdg-desktop-portal-kde)
 
-set(PROJECT_VERSION "5.14.0")
+set(PROJECT_VERSION "5.14.1")
 set(PROJECT_VERSION_MAJOR 5)
 
 set(QT_MIN_VERSION "5.11.0")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-kde-5.14.0/po/de/xdg-desktop-portal-kde.po 
new/xdg-desktop-portal-kde-5.14.1/po/de/xdg-desktop-portal-kde.po
--- old/xdg-desktop-portal-kde-5.14.0/po/de/xdg-desktop-portal-kde.po   
2018-10-05 20:24:40.000000000 +0200
+++ new/xdg-desktop-portal-kde-5.14.1/po/de/xdg-desktop-portal-kde.po   
2018-10-16 14:38:29.000000000 +0200
@@ -7,7 +7,7 @@
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n";
 "POT-Creation-Date: 2018-09-14 06:49+0200\n"
-"PO-Revision-Date: 2018-08-27 17:02+0100\n"
+"PO-Revision-Date: 2018-10-09 07:00+0100\n"
 "Last-Translator: Burkhard Lück <lu...@hube-lueck.de>\n"
 "Language-Team: German <kde-i18n...@kde.org>\n"
 "Language: de\n"
@@ -87,12 +87,12 @@
 #: src/screenchooserdialog.cpp:65
 #, kde-format
 msgid "Share"
-msgstr ""
+msgstr "Freigeben"
 
 #: src/screenchooserdialog.cpp:66
 #, kde-format
 msgid "Select screen to share"
-msgstr ""
+msgstr "Bildschirm zur Freigabe auswählen"
 
 #: src/screenshotdialog.cpp:95
 #, kde-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-kde-5.14.0/po/zh_CN/xdg-desktop-portal-kde.po 
new/xdg-desktop-portal-kde-5.14.1/po/zh_CN/xdg-desktop-portal-kde.po
--- old/xdg-desktop-portal-kde-5.14.0/po/zh_CN/xdg-desktop-portal-kde.po        
2018-10-05 20:25:18.000000000 +0200
+++ new/xdg-desktop-portal-kde-5.14.1/po/zh_CN/xdg-desktop-portal-kde.po        
2018-10-16 14:38:32.000000000 +0200
@@ -3,8 +3,8 @@
 "Project-Id-Version: kdeorg\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n";
 "POT-Creation-Date: 2018-09-14 06:49+0200\n"
-"PO-Revision-Date: 2018-09-28 19:51\n"
-"Last-Translator: guoyunhe <yunhe....@protonmail.com>\n"
+"PO-Revision-Date: 2018-10-09 18:46\n"
+"Last-Translator: guoyunhe <i...@guoyunhe.me>\n"
 "Language-Team: Chinese Simplified\n"
 "Language: zh_CN\n"
 "MIME-Version: 1.0\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-desktop-portal-kde-5.14.0/src/screencast.cpp 
new/xdg-desktop-portal-kde-5.14.1/src/screencast.cpp
--- old/xdg-desktop-portal-kde-5.14.0/src/screencast.cpp        2018-10-05 
20:24:05.000000000 +0200
+++ new/xdg-desktop-portal-kde-5.14.1/src/screencast.cpp        2018-10-16 
14:38:26.000000000 +0200
@@ -128,6 +128,7 @@
 
 ScreenCastPortal::ScreenCastPortal(QObject *parent)
     : QDBusAbstractAdaptor(parent)
+    , m_eglInitialized(false)
     , m_registryInitialized(false)
     , m_streamingEnabled(false)
     , m_connection(nullptr)
@@ -136,7 +137,6 @@
     , m_remoteAccessManager(nullptr)
 {
     initDrm();
-    initEGL();
     initWayland();
 
     qDBusRegisterMetaType<ScreenCastPortal::Stream>();
@@ -195,11 +195,20 @@
 void ScreenCastPortal::initDrm()
 {
     m_drmFd = open("/dev/dri/renderD128", O_RDWR);
+
+    if (m_drmFd == -1) {
+        qCWarning(XdgDesktopPortalKdeScreenCast) << "Cannot open render node: 
" << strerror(errno);
+        return;
+    }
+
     m_gbmDevice = gbm_create_device(m_drmFd);
 
     if (!m_gbmDevice) {
-        qFatal("Cannot create GBM device: %s", strerror(errno));
+        qCWarning(XdgDesktopPortalKdeScreenCast) << "Cannot create GBM device: 
" << strerror(errno);
+        return;
     }
+
+    initEGL();
 }
 
 void ScreenCastPortal::initEGL()
@@ -210,7 +219,8 @@
     if (clientExtensionsString.isEmpty()) {
         // If eglQueryString() returned NULL, the implementation doesn't 
support
         // EGL_EXT_client_extensions. Expect an EGL_BAD_DISPLAY error.
-        qFatal("No client extensions defined! %s", 
formatGLError(eglGetError()));
+        qCWarning(XdgDesktopPortalKdeScreenCast) << "No client extensions 
defined! " << formatGLError(eglGetError());
+        return;
     }
 
     m_egl.extensions = clientExtensionsString.split(' ');
@@ -219,32 +229,39 @@
     // if the implementation supports it.
     if (!m_egl.extensions.contains(QByteArrayLiteral("EGL_EXT_platform_base")) 
||
             
!m_egl.extensions.contains(QByteArrayLiteral("EGL_MESA_platform_gbm"))) {
-        qFatal("One of required EGL extensions is missing");
+        qCWarning(XdgDesktopPortalKdeScreenCast) << "One of required EGL 
extensions is missing";
+        return;
     }
 
     m_egl.display = eglGetPlatformDisplayEXT(EGL_PLATFORM_GBM_MESA, 
m_gbmDevice, nullptr);
 
     if (m_egl.display == EGL_NO_DISPLAY) {
-        qFatal("Error during obtaining EGL display: %s", 
formatGLError(eglGetError()));
+        qCWarning(XdgDesktopPortalKdeScreenCast) << "Error during obtaining 
EGL display: " << formatGLError(eglGetError());
+        return;
     }
 
     EGLint major, minor;
     if (eglInitialize(m_egl.display, &major, &minor) == EGL_FALSE) {
-        qFatal("Error during eglInitialize: %s", formatGLError(eglGetError()));
+        qCWarning(XdgDesktopPortalKdeScreenCast) << "Error during 
eglInitialize: " << formatGLError(eglGetError());
+        return;
     }
 
     if (eglBindAPI(EGL_OPENGL_API) == EGL_FALSE) {
-        qFatal("bind OpenGL API failed");
+        qCWarning(XdgDesktopPortalKdeScreenCast) << "bind OpenGL API failed";
+        return;
     }
 
     m_egl.context = eglCreateContext(m_egl.display, nullptr, EGL_NO_CONTEXT, 
nullptr);
 
     if (m_egl.context == EGL_NO_CONTEXT) {
-        qFatal("Couldn't create EGL context: %s", 
formatGLError(eglGetError()));
+        qCWarning(XdgDesktopPortalKdeScreenCast) << "Couldn't create EGL 
context: " << formatGLError(eglGetError());
+        return;
     }
 
     qCDebug(XdgDesktopPortalKdeScreenCast) << "Egl initialization succeeded";
     qCDebug(XdgDesktopPortalKdeScreenCast) << QString("EGL version: 
%1.%2").arg(major).arg(minor);
+
+    m_eglInitialized = true;
 }
 
 void ScreenCastPortal::initWayland()
@@ -379,12 +396,16 @@
         return 2;
     }
 
-    // TODO check whether we got some outputs?
     if (m_outputMap.isEmpty()) {
         qCWarning(XdgDesktopPortalKdeScreenCast) << "Failed to show dialog as 
there is no screen to select";
         return 2;
     }
 
+    if (!m_eglInitialized) {
+        qCWarning(XdgDesktopPortalKdeScreenCast) << "EGL is not initialized, 
we are not able to process screen content";
+        return 2;
+    }
+
     QScopedPointer<ScreenChooserDialog, QScopedPointerDeleteLater> 
screenDialog(new ScreenChooserDialog(m_outputMap, session->multipleSources()));
 
     if (screenDialog->exec()) {
@@ -427,7 +448,7 @@
         return 0;
     }
 
-    return 0;
+    return 1;
 }
 
 void ScreenCastPortal::addOutput(quint32 name, quint32 version)
@@ -481,15 +502,25 @@
         return;
     }
 
+    if (m_lastFrameTime.isValid() &&
+        m_lastFrameTime.msecsTo(QDateTime::currentDateTime()) < (1000 / 
m_stream->framerate())) {
+        close(gbmHandle);
+        return;
+    }
+
     if (!gbm_device_is_format_supported(m_gbmDevice, format, 
GBM_BO_USE_SCANOUT)) {
-        qCritical() << "GBM format is not supported by device!";
+        qCWarning(XdgDesktopPortalKdeScreenCast) << "Failed to process buffer: 
GBM format is not supported by device!";
+        close(gbmHandle);
+        return;
     }
 
     // import GBM buffer that was passed from KWin
     gbm_import_fd_data importInfo = {gbmHandle, width, height, stride, format};
     gbm_bo *imported = gbm_bo_import(m_gbmDevice, GBM_BO_IMPORT_FD, 
&importInfo, GBM_BO_USE_SCANOUT);
     if (!imported) {
-        qCritical() << "Cannot import passed GBM fd:" << strerror(errno);
+        qCWarning(XdgDesktopPortalKdeScreenCast) << "Failed to process buffer: 
Cannot import passed GBM fd - " << strerror(errno);
+        close(gbmHandle);
+        return;
     }
 
     // bind context to render thread
@@ -497,10 +528,16 @@
 
     // create EGL image from imported BO
     EGLImageKHR image = eglCreateImageKHR(m_egl.display, nullptr, 
EGL_NATIVE_PIXMAP_KHR, imported, nullptr);
+
+    // We can already close gbm handle
+    gbm_bo_destroy(imported);
+    close(gbmHandle);
+
     if (image == EGL_NO_IMAGE_KHR) {
-        qCritical() << "Error creating EGLImageKHR" << 
formatGLError(glGetError());
+        qCWarning(XdgDesktopPortalKdeScreenCast) << "Failed to process buffer: 
Error creating EGLImageKHR - " << formatGLError(glGetError());
         return;
     }
+
     // create GL 2D texture for framebuffer
     GLuint texture;
     glGenTextures(1, &texture);
@@ -518,7 +555,7 @@
     glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 
GL_TEXTURE_2D, texture, 0);
     const GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
     if (status != GL_FRAMEBUFFER_COMPLETE) {
-        qCritical() << "glCheckFramebufferStatus failed:" << 
formatGLError(glGetError());
+        qCWarning(XdgDesktopPortalKdeScreenCast) << "Failed to process buffer: 
glCheckFramebufferStatus failed - " << formatGLError(glGetError());
         glDeleteTextures(1, &texture);
         glDeleteFramebuffers(1, &framebuffer);
         eglDestroyImageKHR(m_egl.display, image);
@@ -529,16 +566,15 @@
     glViewport(0, 0, width, height);
     glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, 
capture->bits());
 
-    m_stream->recordFrame(capture->bits());
+    if (m_stream->recordFrame(capture->bits())) {
+        m_lastFrameTime = QDateTime::currentDateTime();
+    }
 
-    gbm_bo_destroy(imported);
     glDeleteTextures(1, &texture);
     glDeleteFramebuffers(1, &framebuffer);
     eglDestroyImageKHR(m_egl.display, image);
 
     delete capture;
-
-    close(gbmHandle);
 }
 
 void ScreenCastPortal::setupRegistry()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-desktop-portal-kde-5.14.0/src/screencast.h 
new/xdg-desktop-portal-kde-5.14.1/src/screencast.h
--- old/xdg-desktop-portal-kde-5.14.0/src/screencast.h  2018-10-05 
20:24:05.000000000 +0200
+++ new/xdg-desktop-portal-kde-5.14.1/src/screencast.h  2018-10-16 
14:38:26.000000000 +0200
@@ -21,6 +21,7 @@
 #ifndef XDG_DESKTOP_PORTAL_KDE_SCREENCAST_H
 #define XDG_DESKTOP_PORTAL_KDE_SCREENCAST_H
 
+#include <QDateTime>
 #include <QDBusAbstractAdaptor>
 #include <QDBusObjectPath>
 #include <QSize>
@@ -128,6 +129,7 @@
     void initEGL();
     void initWayland();
 
+    bool m_eglInitialized;
     bool m_registryInitialized;
     bool m_streamingEnabled;
 
@@ -144,6 +146,8 @@
     KWayland::Client::Registry *m_registry;
     KWayland::Client::RemoteAccessManager *m_remoteAccessManager;
 
+    QDateTime m_lastFrameTime;
+
     qint32 m_drmFd = 0; // for GBM buffer mmap
     gbm_device *m_gbmDevice = nullptr; // for passed GBM buffer retrieval
     struct {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-kde-5.14.0/src/screencaststream.cpp 
new/xdg-desktop-portal-kde-5.14.1/src/screencaststream.cpp
--- old/xdg-desktop-portal-kde-5.14.0/src/screencaststream.cpp  2018-10-05 
20:24:05.000000000 +0200
+++ new/xdg-desktop-portal-kde-5.14.1/src/screencaststream.cpp  2018-10-16 
14:38:26.000000000 +0200
@@ -310,6 +310,15 @@
     pw_remote_connect(pwRemote);
 }
 
+uint ScreenCastStream::framerate()
+{
+    if (pwStream) {
+        return videoFormat.max_framerate.num / videoFormat.max_framerate.denom;
+    }
+
+    return 0;
+}
+
 uint ScreenCastStream::nodeId()
 {
     if (pwStream) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-desktop-portal-kde-5.14.0/src/screencaststream.h 
new/xdg-desktop-portal-kde-5.14.1/src/screencaststream.h
--- old/xdg-desktop-portal-kde-5.14.0/src/screencaststream.h    2018-10-05 
20:24:05.000000000 +0200
+++ new/xdg-desktop-portal-kde-5.14.1/src/screencaststream.h    2018-10-16 
14:38:26.000000000 +0200
@@ -66,6 +66,7 @@
 
     // Public
     void init();
+    uint framerate();
     uint nodeId();
 
     // Public because we need access from static functions


Reply via email to