[vlc-devel] [PATCH 00/12] Video integration within Qt interface for Windows
Pierre Lamot
pierre at videolabs.io
Mon May 11 18:04:50 CEST 2020
This branch allow integrating the video within the Qt interface on Windows using
DirectComposition
This should work on Windows 8+ (and fallback on a separate window for former
versions of windows)
Video is rendered in the DComp tree by specifying a new window type (DCOMP) and
rendering to the DComp visual directly from the d3d11 module (using a
specialized swapchain)
The UI is rendered to a framebuffer using ANGLE interop, then rendered within
DComp tree using a custom swapchain.
QML components have been separated from the main interface allowing us to have
control over its rendering.
Now qt module starts by instantiating a Compositor which have the
responsibility of:
- create the main window
- setup the UI within the main window
- create/setup the video window/surface
Note that this branch currently don't compile as-is on GCC CI as the MingW
headers (dcomp.h) provided in the docker are outdated. Should compile fine
on Clang CI though.
branch is available at https://code.videolan.org/chub/vlc/-/tree/dcomp/10
Pierre Lamot (12):
d3d11: allow rendering video to DirectComposition surfaces
qml: rename rootWindow to mainInterface
qml: use the top window to filter global key events rather than the
embed widget
qt: remove dependency from mainUI in the toolbar editor
qt: move vout window report functions to the Video surface provider
qt: add compositor interface
qt: provide a dummy compositor
contrib: remove dllimport from ANGLE EGL api
qt: add DirectCompositor compositor
qt: move qml initialisation out of the main interface
qt: remove qml instantiation and video embedding from the
main_interface
qml: fullscreen button should ask videofullscreen
...llimport-from-ANGLE-egl-entry-points.patch | 26 +
contrib/src/qt/rules.mak | 1 +
include/vlc_vout_window.h | 5 +
modules/gui/qt/Makefile.am | 37 +-
.../gui/qt/dialogs/toolbar/toolbareditor.cpp | 32 +-
modules/gui/qt/maininterface/compositor.cpp | 40 +
modules/gui/qt/maininterface/compositor.hpp | 52 ++
.../gui/qt/maininterface/compositor_dcomp.cpp | 290 ++++++++
.../gui/qt/maininterface/compositor_dcomp.hpp | 90 +++
.../compositor_dcomp_error.hpp} | 59 +-
.../compositor_dcomp_uisurface.cpp | 698 ++++++++++++++++++
.../compositor_dcomp_uisurface.hpp | 178 +++++
.../gui/qt/maininterface/compositor_dummy.cpp | 61 ++
.../compositor_dummy.hpp} | 44 +-
.../gui/qt/maininterface/main_interface.cpp | 329 ++-------
.../gui/qt/maininterface/main_interface.hpp | 56 +-
.../qt/maininterface/main_interface_win32.cpp | 2 +-
modules/gui/qt/maininterface/mainui.cpp | 249 +++++++
modules/gui/qt/maininterface/mainui.hpp | 76 ++
.../qt/maininterface/qml/BannerSources.qml | 2 +-
.../qt/maininterface/qml/MainInterface.qml | 4 +-
.../videosurface.cpp | 141 +++-
.../videosurface.hpp | 43 +-
.../gui/qt/medialibrary/qml/MainDisplay.qml | 8 +-
modules/gui/qt/menus/qml/PopupMenu.qml | 2 +-
modules/gui/qt/menus/qml/ViewMenu.qml | 16 +-
modules/gui/qt/player/qml/ControlBar.qml | 6 +-
modules/gui/qt/player/qml/ControlButtons.qml | 11 +-
modules/gui/qt/player/qml/MiniPlayer.qml | 4 +-
modules/gui/qt/player/qml/Player.qml | 22 +-
modules/gui/qt/player/qml/TopBar.qml | 2 +-
modules/gui/qt/qt.cpp | 38 +-
modules/gui/qt/qt.hpp | 4 +
modules/gui/qt/voutwindow/qvoutwindow.cpp | 98 ---
modules/gui/qt/voutwindow/qvoutwindow.hpp | 42 --
modules/video_output/Makefile.am | 3 +-
modules/video_output/win32/d3d11_swapchain.c | 51 +-
modules/video_output/win32/d3d11_swapchain.h | 3 +-
modules/video_output/win32/dcomp_wrapper.cpp | 31 +
modules/video_output/win32/dcomp_wrapper.h | 42 ++
modules/video_output/win32/direct3d11.c | 13 +-
41 files changed, 2262 insertions(+), 649 deletions(-)
create mode 100644 contrib/src/qt/0009-remove-dllimport-from-ANGLE-egl-entry-points.patch
create mode 100644 modules/gui/qt/maininterface/compositor.cpp
create mode 100644 modules/gui/qt/maininterface/compositor.hpp
create mode 100644 modules/gui/qt/maininterface/compositor_dcomp.cpp
create mode 100644 modules/gui/qt/maininterface/compositor_dcomp.hpp
rename modules/gui/qt/{voutwindow/qvoutwindowdummy.cpp => maininterface/compositor_dcomp_error.hpp} (50%)
create mode 100644 modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp
create mode 100644 modules/gui/qt/maininterface/compositor_dcomp_uisurface.hpp
create mode 100644 modules/gui/qt/maininterface/compositor_dummy.cpp
rename modules/gui/qt/{voutwindow/qvoutwindowdummy.hpp => maininterface/compositor_dummy.hpp} (52%)
create mode 100644 modules/gui/qt/maininterface/mainui.cpp
create mode 100644 modules/gui/qt/maininterface/mainui.hpp
rename modules/gui/qt/{voutwindow => maininterface}/videosurface.cpp (58%)
rename modules/gui/qt/{voutwindow => maininterface}/videosurface.hpp (78%)
delete mode 100644 modules/gui/qt/voutwindow/qvoutwindow.cpp
delete mode 100644 modules/gui/qt/voutwindow/qvoutwindow.hpp
create mode 100644 modules/video_output/win32/dcomp_wrapper.cpp
create mode 100644 modules/video_output/win32/dcomp_wrapper.h
--
2.25.1
More information about the vlc-devel
mailing list