summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2019-05-31 15:11:13 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2019-06-09 05:29:12 +0200
commit6fd4bfee60e93ee29c3e68587ff4665650b31a56 (patch)
treeb652240c29cb55ee280e3670d7d1fd99af81ae38 /vcl
parent87238627b025ee6aa61378667e56b1769d4460c2 (diff)
tdf#125219 qt5: Try qwidget5videosink on Wayland
Try to use GStreamer's qwidget5videosink when using the qt5 (or kde5) VCL plugin on Wayland. This is strongly inspired by commit 8543fbc72fafc0d71a8760752ca2ef5b7119cb5c ("gtk3+wayland: play video via gtksink gstreamer element"). qwidget5videosink allows to directly set a 'QWidget*' for the sink's "widget" property to make it paint into this widget, s. [1] for more details. In order for this to work, the relevant Qt5 packages for QtGStreamer need to be installed (provided e.g. by package 'qtgstreamer-plugins-qt5' on Debian). If qwidget5videosink is available, video playback works as expected on Wayland. If it is not available, GStreamer will create it's own (misplaced) window(s) to show the video as is the case without this commit. Switching to e.g. qtglvideosink in the future may theoretically improve performance, since that one uses OpenGL/OpenGLES and supports hardware colorspace conversion and color balance, while qwidgetvideosink does software painting (s. [1]). Also, extending commit 9d18bc40416b651340804f44ba5fae65f3bbbcfa ("tdf#125271 under wayland without gtksink, try waylandsink") to also work with (i.e. set the right window for) waylandsink on qt5 may be worth to take a look at in the future, but didn't "just work" in a quick attempt. [1] https://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/qtvideosink_overview.html Change-Id: I6e17838dcdf5c31a1a8a07f7836a4cf36c63bd06 Reviewed-on: https://gerrit.libreoffice.org/72968 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qt5/Qt5Frame.cxx2
-rw-r--r--vcl/qt5/Qt5Object.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 0520465c190e..8e63a35cc5c8 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -197,7 +197,7 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo)
m_aSystemData.aShellWindow = reinterpret_cast<sal_IntPtr>(this);
//m_aSystemData.pSalFrame = this;
- //m_aSystemData.pWidget = m_pQWidget;
+ m_aSystemData.pWidget = m_pQWidget;
//m_aSystemData.nScreen = m_nXScreen.getXScreen();
m_aSystemData.pToolkit = "qt5";
if (!bWayland)
diff --git a/vcl/qt5/Qt5Object.cxx b/vcl/qt5/Qt5Object.cxx
index deae5e2ad831..a635a5931886 100644
--- a/vcl/qt5/Qt5Object.cxx
+++ b/vcl/qt5/Qt5Object.cxx
@@ -43,7 +43,7 @@ Qt5Object::Qt5Object(Qt5Frame* pParent, bool bShow)
m_aSystemData.nSize = sizeof(SystemEnvData);
m_aSystemData.aShellWindow = reinterpret_cast<sal_IntPtr>(this);
//m_aSystemData.pSalFrame = this;
- //m_aSystemData.pWidget = m_pQWidget;
+ m_aSystemData.pWidget = m_pQWidget;
//m_aSystemData.nScreen = m_nXScreen.getXScreen();
m_aSystemData.pToolkit = "qt5";
m_aSystemData.pPlatformName = "xcb";