diff --git a/src/multimedia/video/qvideosurfaceformat.cpp b/src/multimedia/video/qvideosurfaceformat.cpp index c31c52ff7a69fd9fbf1020a4ba7d28ff71ee5d61..384ab4e53efcf6977d20716231828ac27c88cdbc 100644 --- a/src/multimedia/video/qvideosurfaceformat.cpp +++ b/src/multimedia/video/qvideosurfaceformat.cpp @@ -449,6 +449,35 @@ void QVideoSurfaceFormat::setYCbCrColorSpace(QVideoSurfaceFormat::YCbCrColorSpac d->ycbcrColorSpace = space; } +/*! + 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. diff --git a/src/multimedia/video/qvideosurfaceformat.h b/src/multimedia/video/qvideosurfaceformat.h index 83785ac0a858e8e9c3f95f90cdeab42ba7d5781d..175b199a7348ad82537a18b700ba82016b9ec568 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;