summaryrefslogtreecommitdiffstats
path: root/src/multimedia/video/qvideosink.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-04-26 14:09:48 +0200
committerLars Knoll <lars.knoll@qt.io>2021-04-28 08:46:00 +0000
commit2dceee374cad71ad204f04acd967cc939fa93b5f (patch)
tree9974b7210a0181935da7388d7f3430c5992ff8e8 /src/multimedia/video/qvideosink.cpp
parent14f960eeb6bf99e6de4bfd41b0d5a6bf2de2fe67 (diff)
Fix sizeHint() of QVideoWidget/QVideoGraphicsItem
Doesn't yet fix all test failures, but it's an improvement. Change-Id: I775857f1fb580b78ae137dc71ee445a15eafd0a7 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/multimedia/video/qvideosink.cpp')
-rw-r--r--src/multimedia/video/qvideosink.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/multimedia/video/qvideosink.cpp b/src/multimedia/video/qvideosink.cpp
index ee4c81cc6..47ebd3033 100644
--- a/src/multimedia/video/qvideosink.cpp
+++ b/src/multimedia/video/qvideosink.cpp
@@ -374,6 +374,15 @@ QPlatformVideoSink *QVideoSink::platformVideoSink()
return d->videoSink;
}
+/*!
+ Returns the size of the video currently being played back. If no video is being played,
+ this method returns an invalid size.
+ */
+QSize QVideoSink::videoSize() const
+{
+ return d->videoSink->nativeSize();
+}
+
QT_END_NAMESPACE
#include "moc_qvideosink.cpp"