diff options
Diffstat (limited to 'src/multimedia/video')
-rw-r--r-- | src/multimedia/video/qvideosink.cpp | 9 | ||||
-rw-r--r-- | src/multimedia/video/qvideosink.h | 1 |
2 files changed, 10 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" diff --git a/src/multimedia/video/qvideosink.h b/src/multimedia/video/qvideosink.h index 7092f80bf..1fa308266 100644 --- a/src/multimedia/video/qvideosink.h +++ b/src/multimedia/video/qvideosink.h @@ -95,6 +95,7 @@ public: void paint(QPainter *painter, const QVideoFrame &frame); QPlatformVideoSink *platformVideoSink(); + QSize videoSize() const; Q_SIGNALS: // would never get called in windowed mode |