diff options
author | Artem Dyomin <artem.dyomin@qt.io> | 2024-05-08 14:23:54 +0200 |
---|---|---|
committer | Artem Dyomin <artem.dyomin@qt.io> | 2024-05-10 10:19:54 +0000 |
commit | 948ce7b3d6decf7e3edd920a632562a47e2aa56a (patch) | |
tree | 2af9073e88f6103c8649a3009f69355174664ba9 /src/multimedia/video | |
parent | a21f37193f2c105a174db7334cdf8c7a7199b3cb (diff) |
Rename QVideoFrameFormat::frameRate => streamFrameRate
The name 'frameRate' is not consistent with QVideoFrameFormat,
'streamFrameRate' works much better.
[ChangeLog][QVideoFrameFormat] Renamed the property QVideoFrameFormat::frameRate to QVideoFrameFormat::streamFrameRate.
Change-Id: I03413f15669de471371e6ed42ce948c22d1b5f5f
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Diffstat (limited to 'src/multimedia/video')
-rw-r--r-- | src/multimedia/video/qvideoframeformat.cpp | 22 | ||||
-rw-r--r-- | src/multimedia/video/qvideoframeformat.h | 7 |
2 files changed, 27 insertions, 2 deletions
diff --git a/src/multimedia/video/qvideoframeformat.cpp b/src/multimedia/video/qvideoframeformat.cpp index b2c9dc5f1..63388aab6 100644 --- a/src/multimedia/video/qvideoframeformat.cpp +++ b/src/multimedia/video/qvideoframeformat.cpp @@ -538,12 +538,13 @@ void QVideoFrameFormat::setScanLineDirection(Direction direction) d->scanLineDirection = direction; } +#if QT_DEPRECATED_SINCE(6, 8) /*! Returns the frame rate of a video stream in frames per second. */ qreal QVideoFrameFormat::frameRate() const { - return d->frameRate; + return streamFrameRate(); } /*! @@ -551,6 +552,23 @@ qreal QVideoFrameFormat::frameRate() const */ void QVideoFrameFormat::setFrameRate(qreal rate) { + setStreamFrameRate(rate); +} +#endif + +/*! + Returns the frame rate of a video stream in frames per second. +*/ +qreal QVideoFrameFormat::streamFrameRate() const +{ + return d->frameRate; +} + +/*! + Sets the frame \a rate of a video stream in frames per second. +*/ +void QVideoFrameFormat::setStreamFrameRate(qreal rate) +{ detach(); d->frameRate = rate; } @@ -984,7 +1002,7 @@ QDebug operator<<(QDebug dbg, const QVideoFrameFormat &f) << "\n frame size=" << f.frameSize() << "\n viewport=" << f.viewport() << "\n colorSpace=" << f.colorSpace() - << "\n frameRate=" << f.frameRate() + << "\n frameRate=" << f.streamFrameRate() << "\n mirrored=" << f.isMirrored(); return dbg; diff --git a/src/multimedia/video/qvideoframeformat.h b/src/multimedia/video/qvideoframeformat.h index 5fb6b3701..9d74e9695 100644 --- a/src/multimedia/video/qvideoframeformat.h +++ b/src/multimedia/video/qvideoframeformat.h @@ -153,8 +153,15 @@ public: Direction scanLineDirection() const; void setScanLineDirection(Direction direction); +#if QT_DEPRECATED_SINCE(6, 8) + QT_DEPRECATED_VERSION_X_6_8("Use streamFrameRate()") qreal frameRate() const; + QT_DEPRECATED_VERSION_X_6_8("Use setStreamFrameRate()") void setFrameRate(qreal rate); +#endif + + qreal streamFrameRate() const; + void setStreamFrameRate(qreal rate); #if QT_DEPRECATED_SINCE(6, 4) QT_DEPRECATED_VERSION_X_6_4("Use colorSpace()") |