diff options
author | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-10-11 11:51:14 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-10-23 09:17:29 +0200 |
commit | 93f966335e1ed8ed47b7e8b32452d43c2f8a7bb1 (patch) | |
tree | ddba4689fa0fbe706ff512fadcb5f30901010159 /src/multimedia/video/qvideoframe.h | |
parent | 25c0269da619207e58e7668bc28d183dd71ffd1a (diff) |
Introduce QVideoFrame::image()
Since QVideoFrame::pixelFormat's do not 100% match QImage::Format's,
introducing converstion function.
Returns an image based on current frame.
Converts data if needed to supported QImage format.
Change-Id: I3331578c01cf9c999a380efc4a83bf9eddb07901
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Diffstat (limited to 'src/multimedia/video/qvideoframe.h')
-rw-r--r-- | src/multimedia/video/qvideoframe.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/multimedia/video/qvideoframe.h b/src/multimedia/video/qvideoframe.h index 8fcf47fc4..d043442a3 100644 --- a/src/multimedia/video/qvideoframe.h +++ b/src/multimedia/video/qvideoframe.h @@ -166,6 +166,8 @@ public: QVariant metaData(const QString &key) const; void setMetaData(const QString &key, const QVariant &value); + QImage image() const; + static PixelFormat pixelFormatFromImageFormat(QImage::Format format); static QImage::Format imageFormatFromPixelFormat(PixelFormat format); |