summaryrefslogtreecommitdiffstats
path: root/avmedia/source/viewer/mediawindow_impl.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-02-10 12:55:18 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-02-18 20:40:01 +0100
commitd0a527ec09516bc7215baf229adb90cd21ffa27a (patch)
tree2ce0dc20f847e8d14805ce70f466606cf60e4840 /avmedia/source/viewer/mediawindow_impl.cxx
parentthere's only one media backend per platform currently (diff)
downloadcore-d0a527ec09516bc7215baf229adb90cd21ffa27a.tar.gz
core-d0a527ec09516bc7215baf229adb90cd21ffa27a.zip
first cut at using Gtk4 built in video playback
Change-Id: Ib996cd3f5ddbf20a81cdbe4b1c6546d6df478fde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129783 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'avmedia/source/viewer/mediawindow_impl.cxx')
-rw-r--r--avmedia/source/viewer/mediawindow_impl.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index 7f3ec8a4f078..feb28e4e7d39 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -37,6 +37,7 @@
#include <vcl/commandevent.hxx>
#include <vcl/event.hxx>
#include <vcl/ptrstyle.hxx>
+#include <vcl/svapp.hxx>
#include <com/sun/star/awt/SystemPointer.hpp>
#include <com/sun/star/lang/XComponent.hpp>
@@ -181,7 +182,10 @@ uno::Reference<media::XPlayer> MediaWindowImpl::createPlayer(const OUString& rUR
if (!pMimeType || *pMimeType == AVMEDIA_MIMETYPE_COMMON)
{
uno::Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext());
- xPlayer = createPlayer(rURL, AVMEDIA_MANAGER_SERVICE_NAME, xContext);
+ if (Application::GetToolkitName() == "gtk4")
+ xPlayer = createPlayer(rURL, "com.sun.star.comp.avmedia.Manager_Gtk", xContext);
+ else
+ xPlayer = createPlayer(rURL, AVMEDIA_MANAGER_SERVICE_NAME, xContext);
}
return xPlayer;