diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-05-20 16:25:09 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-05-21 17:28:04 +0200 |
commit | 441d8ed9be0e7f831b455a69b8688dcb79a8bc00 (patch) | |
tree | 355aaa19eae2f2403b7ea9001e905616073469bc /configure.ac | |
parent | 4316851ec8d2b44bbbcca84200f50eae91451e48 (diff) |
tdf#145735 avmedia qt: Use QtMultimedia for Qt 6 media playback
Similar to the way that GTK 4's native facilities for
video playback are used for the gtk4 VCL plugin, initially
added in commit
commit d0a527ec09516bc7215baf229adb90cd21ffa27a
Author: Caolán McNamara <caolanm@redhat.com>
Date: Thu Feb 10 12:55:18 2022 +0000
first cut at using Gtk4 built in video playback
, implement media playback using QtMultimedia for the
Qt 6 based VCL plugins (qt6/kf6) via a new service
"com.sun.star.comp.avmedia.Manager_Qt".
Video playback with the mechanism used for qt5 no
longer works with qt6, as "qwidget5videosink"
that gets used on Wayland for qt5 wasn't ported
to Qt 6 and is unmaintained, s. the commit message of
commit 88d57cf241209ffec9eaed3e523942ab51af6db6
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Sep 29 11:09:51 2021 +0200
qt6: Add a qt6 VCL plugin
for more details. Additionally, this also doesn't work
properly any more on X11/with the xcb Qt QPA platform, see
tdf#145735 comment 7.
Instead of using GStreamer directly, let Qt handle
the low-level stuff by using the QtMultimedia module [1]
instead.
This adds a new dependency on QtMultimedia.
For building, this requires installing the Qt 6 QtMultimedia
development headers (e.g. package `qt6-multimedia-dev`
on current Debian testing).
Except for WASM, the use of QtMultimedia is enabled by
default when building with autogen options `--enable-qt6`
or `--enable-kf6`, but can explicitly be disabled using
`--disable-qt6-multimedia`.
In tests with the qt6 VCL plugin on Debian testing, with a
sample presentation containing an embedded
video, attachment 145517 from tdf#120452, video playback
generally works for both, the xcb and the wayland
Qt QPA platforms:
* Video and audio are played as expected on the external
screen in presentation mode when using the presenter
console
* Video and audio playback work in non-presentation
mode by clicking on the video and using the controls
in the Impress sidebar (play, pause,...).
However, the following issues were observed with
the current implementation:
* There's an odd frame/margin around the video.
* In non-presentation mode, the placeholder
shown until the video gets started using the controls
in the sidebar is just an "audio icon", not a frame
from the actual video. (This might be related to the
fact that `QtPlayer::createFrameGrabber` currently
returns an empty reference.)
* At least on Wayland (issue not observed with
QT_QPA_PLATFORM=xcb so far), when using the presenter
console, video playback in the presenter console (i.e. on the
non-presentation screen) is unreliable: The video
sometimes shows, but sometimes doesn't. At least the
(more important) one on the presentation screen was
reliably shown in my tests, however.
Tested with git dev versions of qtbase
(as of commit 8d5e7d50d8dbf1ad79bd8ff9f6ef6028eba481c9),
qtwayland (as of commit 6f0ebd916f176f6fbe35af28caeb52b62768ac94)
and qtmultimedia (as of commit
264b7e8d7d5683252102b5e5149685c8b8a70c2d).
[1] https://doc.qt.io/qt-6/qtmultimedia-index.html
Change-Id: I29c3c7ded01c61b49b192fa5c313d8a92c942185
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167869
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 59f1c97dbef7..88dd106f574a 100644 --- a/configure.ac +++ b/configure.ac @@ -1815,6 +1815,10 @@ AC_ARG_ENABLE(qt6, available.]), ,) +AC_ARG_ENABLE(qt6-multimedia, + AS_HELP_STRING([--disable-qt6-multimedia], + [Determines whether to enable media playback using QtMultimedia when using the qt6/kf6 VCL plugins.])) + AC_ARG_ENABLE(kf5, AS_HELP_STRING([--enable-kf5], [Determines whether to use Qt5/KF5 vclplug on platforms where Qt5 and @@ -13419,6 +13423,7 @@ dnl =================================================================== QT6_CFLAGS="" QT6_LIBS="" QT6_PLATFORMS_SRCDIR="" +ENABLE_QT6_MULTIMEDIA="" if test \( "$test_kf6" = "yes" -a "$ENABLE_KF6" = "TRUE" \) -o \ \( "$test_qt6" = "yes" -a "$ENABLE_QT6" = "TRUE" \) then @@ -13505,6 +13510,15 @@ then QT6_LIBS="-L$qt6_libdir -lQt6Core -lQt6Gui -lQt6Widgets -lQt6Network" if test "$_os" = "Emscripten"; then QT6_LIBS="$QT6_LIBS -lQt6BundledPcre2 -lQt6BundledZLIB -L${qt6_platformsdir} -lqwasm -sGL_ENABLE_GET_PROC_ADDRESS" + else + if ! test "$enable_qt6_multimedia" = "no"; then + if ! test -r "$qt6_incdir/QtMultimediaWidgets/QVideoWidget"; then + AC_MSG_ERROR([Qt 6 QMultimedia not found.]) + break + fi + ENABLE_QT6_MULTIMEDIA=TRUE + QT6_LIBS="$QT6_LIBS -lQt6Multimedia -lQt6MultimediaWidgets" + fi fi if test "$USING_X11" = TRUE; then @@ -13540,6 +13554,7 @@ AC_SUBST(QT6_CFLAGS) AC_SUBST(QT6_LIBS) AC_SUBST(MOC6) AC_SUBST(QT6_PLATFORMS_SRCDIR) +AC_SUBST(ENABLE_QT6_MULTIMEDIA) dnl =================================================================== dnl KF5 Integration @@ -13705,6 +13720,10 @@ fi AC_SUBST(KF6_CFLAGS) AC_SUBST(KF6_LIBS) +if test "$enable_qt6_multimedia" = "yes" -a "$ENABLE_QT6" != "TRUE"; then + AC_MSG_ERROR([--enable-qt6-multimedia requires --enable-qt6 or --enable-kf6]) +fi + dnl =================================================================== dnl Test whether to include Evolution 2 support dnl =================================================================== |