diff options
-rw-r--r-- | src/multimedia/video/qvideosurfaceformat.cpp | 29 | ||||
-rw-r--r-- | src/multimedia/video/qvideosurfaceformat.h | 3 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/multimedia/video/qvideosurfaceformat.cpp b/src/multimedia/video/qvideosurfaceformat.cpp index c31c52ff7..384ab4e53 100644 --- a/src/multimedia/video/qvideosurfaceformat.cpp +++ b/src/multimedia/video/qvideosurfaceformat.cpp @@ -450,6 +450,35 @@ void QVideoSurfaceFormat::setYCbCrColorSpace(QVideoSurfaceFormat::YCbCrColorSpac } /*! + Returns \c true if the surface is mirrored around its vertical axis. + This is typically needed for video frames coming from a front camera of a mobile device. + + \note The mirroring here differs from QImage::mirrored, as a vertically mirrored QImage + will be mirrored around its x-axis. + + \since 5.11 + */ +bool QVideoSurfaceFormat::isMirrored() const +{ + return d->mirrored; +} + +/*! + Sets if the surface is mirrored around its vertical axis. + This is typically needed for video frames coming from a front camera of a mobile device. + Default value is false. + + \note The mirroring here differs from QImage::mirrored, as a vertically mirrored QImage + will be mirrored around its x-axis. + + \since 5.11 + */ +void QVideoSurfaceFormat::setMirrored(bool mirrored) +{ + d->mirrored = mirrored; +} + +/*! Returns a suggested size in pixels for the video stream. This is the size of the viewport scaled according to the pixel aspect ratio. diff --git a/src/multimedia/video/qvideosurfaceformat.h b/src/multimedia/video/qvideosurfaceformat.h index 83785ac0a..175b199a7 100644 --- a/src/multimedia/video/qvideosurfaceformat.h +++ b/src/multimedia/video/qvideosurfaceformat.h @@ -117,6 +117,9 @@ public: YCbCrColorSpace yCbCrColorSpace() const; void setYCbCrColorSpace(YCbCrColorSpace colorSpace); + bool isMirrored() const; + void setMirrored(bool mirrored); + QSize sizeHint() const; QList<QByteArray> propertyNames() const; |