summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/source/qt6/QtPlayer.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/avmedia/source/qt6/QtPlayer.cxx b/avmedia/source/qt6/QtPlayer.cxx
index 1ad675f37d5c..5f75394ff1a3 100644
--- a/avmedia/source/qt6/QtPlayer.cxx
+++ b/avmedia/source/qt6/QtPlayer.cxx
@@ -11,6 +11,7 @@
#include <QtCore/QUrl>
#include <QtMultimedia/QAudioOutput>
+#include <QtMultimedia/QMediaMetaData>
#include <QtMultimediaWidgets/QVideoWidget>
#include <QtWidgets/QLayout>
@@ -178,8 +179,16 @@ awt::Size SAL_CALL QtPlayer::getPreferredPlayerWindowSize()
{
osl::MutexGuard aGuard(m_aMutex);
- awt::Size aSize(0, 0);
- return aSize;
+ assert(m_xMediaPlayer);
+ const QMediaMetaData aMetaData = m_xMediaPlayer->metaData();
+ const QVariant aResolutionVariant = aMetaData.value(QMediaMetaData::Resolution);
+ if (aResolutionVariant.canConvert<QSize>())
+ {
+ const QSize aResolution = aResolutionVariant.value<QSize>();
+ return awt::Size(aResolution.width(), aResolution.height());
+ }
+
+ return awt::Size(0, 0);
}
uno::Reference<::media::XPlayerWindow>
re/commit/vcl/source/window/NotebookBarAddonsMerger.cxx?id=3e4968e6761c816c0a6aedf59485191af8a0fa4e'>Remove remains of private:image/ via ImageIdentifier addon propertyMaxim Monastirsky 2020-08-04loplugin:flatten in vcl/windowNoel Grandin 2020-07-02Upcoming improved loplugin:staticanonymous -> redundantstatic: vclStephan Bergmann 2020-05-21use for-range on Sequence in testtools..xmloffNoel Grandin 2020-02-03make some headers privateCaolán McNamara 2019-10-25tdf#42949 Fix IWYU warnings in vcl/unx/gtk3 and gtk3_kde5/Gabor Kelemen 2019-10-18prepare builder to support menubarsCaolán McNamara 2019-10-01loplugin:loopvartoosmall (clang-cl)Stephan Bergmann 2019-09-03Ensure that VCL builder entry points use proper function typeMike Kaganski 2019-08-28GtkWidget for the priority of extension under Extension Tab.Sumit Chauhan 2019-07-26Extension support for gtkmenuItem and notebookbar.ui file added for writerSumit Chauhan 2019-07-22Patch fixes the image rendering issue of extension in NotebookBarSumit Chauhan 2019-07-19Engine to add Extension inside extension tab in NotebookBarSumit Chauhan