Bug 145735 - qt6: Support video playback in Impress presentations on Wayland
Summary: qt6: Support video playback in Impress presentations on Wayland
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Wayland Qt6
  Show dependency treegraph
 
Reported: 2021-11-17 13:27 UTC by Michael Weghorn
Modified: 2021-11-19 06:58 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2021-11-17 13:27:10 UTC
see tdf#125219 for qt5/kf5

Steps to reproduce

0) Use qt6 VCL plugin in a Plasma Wayland session
1) open a presentation containing a video in Impress (e.g. attachment 145517 [details] from bug 120452)
2) start slide show by pressing F5

As of now, video is not shown properly. qt5/kf5 use GStreamer's "qwidget5videosink", but that one is not available for Qt 6 and will probably not be ported for qt6. From commit message of the commit that introduced the qt6 VCL plugin:

> commit 88d57cf241209ffec9eaed3e523942ab51af6db6
> Author: Michael Weghorn <m.weghorn@posteo.de>
> Date:   Wed Sep 29 11:09:51 2021 +0200
> 
>     qt6: Add a qt6 VCL plugin
>     
>     [...]
> 
>     6) There's currently no Qt 6 video sink for GStreamer.
>     As of today, qt-gstreamer is unmaintained and there is no Qt 6 version.
>     The project's README [2] says:
>     
>     > 0. Maintenance Notice
>     > ---------------------
>     >
>     > This code is unmaintained. You can use it at your own risk.
>     >
>     > If you want to integrate video display in your QML-based UI,
>     > you should consider using 'qmlglsink', from gst-plugins-good.
>     > This is a well supported video sink that uses the generic
>     > gstreamer-gl stack and is in many ways superior to 'qtquick2videosink'
>     > that is provided by qt-gstreamer. You can use this code as an example:
>     > https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/qt/qmlsink
>     >
>     > If you are not interested in using QML in your UI, then you
>     > may use one of the other elements provided by this module
>     > (see below). If you do that, it would be helpful to let us
>     > know that this code is still useful to you. We may consider
>     > adding these elements in one of the core gstreamer modules.
>     >
>     > If you are here for the Qt-style bindings, I'm sorry to disappoint you.
>     > The alternative is to use the C API, or the GStreamermm C++ API.
>     > Qt-style bindings are cool, but unfortunately they are very hard
>     > to maintain because they are written by hand. If you are interested
>     > in continuing this project, you are welcome to implement a
>     > generator for them, probably based on GObject-Introspection.
>     > I am happy to provide directions if you want to pursue such a thing.
>     
>     Therefore, the Qt video sink handling is qt5-only and the
>     corresponding handling for GOBJECT (used for the GStreamer
>     video sink handling) was not taken over for qt6.
>     
>     This presumably means that video playback in Impress presentations
>     does not work when using qt6 with they Qt Wayland plugin,
>     s. tdf#125219 for the corresponding bug for qt5/kf5.
>     (I did not build the qtwayland module to actually test this, though.
>     Video playback with the Qt xcb plugin in a Wayland session works.)
>     
>     [1] https://doc-snapshots.qt.io/qt6-dev/extras-changes-qt6.html
>     [2] https://cgit.freedesktop.org/gstreamer/qt-gstreamer/tree/README
Comment 1 Michael Weghorn 2021-11-17 13:31:37 UTC
2 potential ways forward:

1) Add support for GStreamer's waylandsink, similar to how this commit did for gtk3:

    commit 9d18bc40416b651340804f44ba5fae65f3bbbcfa
    Author: Caolán McNamara <caolanm@redhat.com>
    Date:   Thu May 23 17:09:51 2019 +0100

        tdf#125271 under wayland without gtksink, try waylandsink

2) Maybe it makes sense to take a look whether implementing an own XPlayer using Qt's own video/media framework [1] makes sense, which uses GStreamer internally. The waylandsink approach e.g. has the drawback that Qt private API is needed to get a handle to the Wayland surface.

[1] https://doc.qt.io/qt-5/videooverview.html
Comment 2 Roman Kuznetsov 2021-11-18 19:40:24 UTC
(In reply to Michael Weghorn from comment #1)
> 2) Maybe it makes sense to take a look whether implementing an own XPlayer
> using Qt's own video/media framework [1] makes sense, which uses GStreamer
> internally. The waylandsink approach e.g. has the drawback that Qt private
> API is needed to get a handle to the Wayland surface.
> 
> [1] https://doc.qt.io/qt-5/videooverview.html

May be just revert deleted VLC embedded feature https://gerrit.libreoffice.org/c/core/+/108283 and to complete its implementing?
Comment 3 Michael Weghorn 2021-11-19 06:58:40 UTC
(In reply to Roman Kuznetsov from comment #2)
> May be just revert deleted VLC embedded feature
> https://gerrit.libreoffice.org/c/core/+/108283 and to complete its
> implementing?

Thanks, that might be another option to consider.