diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-03-23 12:59:28 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-04-06 08:11:32 +0000 |
commit | 33d4ef6367ad49c40ec77af69ab1165989a65064 (patch) | |
tree | 22b6b757dcf77315da29a7c89a400b3e49457999 /src/multimedia/video | |
parent | f2841b24e351ab14fe35d617948d951bee609236 (diff) |
Remove the handle type from QVideoSurfaceFormat
This is a property of the individual QVideoFrame, and doesn't
belong here.
Change-Id: I85f180ff46023f6a48ef856a356d9c45c3f6be1b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src/multimedia/video')
-rw-r--r-- | src/multimedia/video/qabstractvideosurface.cpp | 2 | ||||
-rw-r--r-- | src/multimedia/video/qvideosurfaceformat.cpp | 25 | ||||
-rw-r--r-- | src/multimedia/video/qvideosurfaceformat.h | 4 |
3 files changed, 6 insertions, 25 deletions
diff --git a/src/multimedia/video/qabstractvideosurface.cpp b/src/multimedia/video/qabstractvideosurface.cpp index a6100cc37..74347ce27 100644 --- a/src/multimedia/video/qabstractvideosurface.cpp +++ b/src/multimedia/video/qabstractvideosurface.cpp @@ -147,7 +147,7 @@ QAbstractVideoSurface::~QAbstractVideoSurface() = default; */ bool QAbstractVideoSurface::isFormatSupported(const QVideoSurfaceFormat &format) const { - return supportedPixelFormats(format.handleType()).contains(format.pixelFormat()); + return supportedPixelFormats(QVideoFrame::NoHandle).contains(format.pixelFormat()); } /*! diff --git a/src/multimedia/video/qvideosurfaceformat.cpp b/src/multimedia/video/qvideosurfaceformat.cpp index 05901b679..986734a65 100644 --- a/src/multimedia/video/qvideosurfaceformat.cpp +++ b/src/multimedia/video/qvideosurfaceformat.cpp @@ -54,10 +54,8 @@ public: QVideoSurfaceFormatPrivate( const QSize &size, - QVideoFrame::PixelFormat format, - QVideoFrame::HandleType type) + QVideoFrame::PixelFormat format) : pixelFormat(format) - , handleType(type) , frameSize(size) , viewport(QPoint(0, 0), size) { @@ -66,7 +64,6 @@ public: bool operator ==(const QVideoSurfaceFormatPrivate &other) const { if (pixelFormat == other.pixelFormat - && handleType == other.handleType && scanLineDirection == other.scanLineDirection && frameSize == other.frameSize && viewport == other.viewport @@ -84,7 +81,6 @@ public: } QVideoFrame::PixelFormat pixelFormat = QVideoFrame::Format_Invalid; - QVideoFrame::HandleType handleType = QVideoFrame::NoHandle; QVideoSurfaceFormat::Direction scanLineDirection = QVideoSurfaceFormat::TopToBottom; QSize frameSize; QVideoSurfaceFormat::YCbCrColorSpace ycbcrColorSpace = QVideoSurfaceFormat::YCbCr_Undefined; @@ -173,8 +169,8 @@ QVideoSurfaceFormat::QVideoSurfaceFormat() \a size and pixel \a format. */ QVideoSurfaceFormat::QVideoSurfaceFormat( - const QSize& size, QVideoFrame::PixelFormat format, QVideoFrame::HandleType type) - : d(new QVideoSurfaceFormatPrivate(size, format, type)) + const QSize& size, QVideoFrame::PixelFormat format) + : d(new QVideoSurfaceFormatPrivate(size, format)) { } @@ -228,19 +224,6 @@ QVideoFrame::PixelFormat QVideoSurfaceFormat::pixelFormat() const } /*! - Returns the type of handle the surface uses to present the frame data. - - If the handle type is \c QVideoFrame::NoHandle, buffers with any handle type are valid - provided they can be \l {QVideoFrame::map()}{mapped} with the - QVideoFrame::ReadOnly flag. If the handleType() is not QVideoFrame::NoHandle - then the handle type of the buffer must be the same as that of the surface format. -*/ -QVideoFrame::HandleType QVideoSurfaceFormat::handleType() const -{ - return d->handleType; -} - -/*! Returns the dimensions of frames in a video stream. \sa frameWidth(), frameHeight() @@ -449,7 +432,7 @@ QDebug operator<<(QDebug dbg, const QVideoSurfaceFormat &f) dbg.nospace(); dbg << "QVideoSurfaceFormat(" << f.pixelFormat() << ", " << f.frameSize() << ", viewport=" << f.viewport() - << ", handleType=" << f.handleType() << ", yCbCrColorSpace=" << f.yCbCrColorSpace() + << ", yCbCrColorSpace=" << f.yCbCrColorSpace() << ')' << "\n pixel format=" << f.pixelFormat() << "\n frame size=" << f.frameSize() diff --git a/src/multimedia/video/qvideosurfaceformat.h b/src/multimedia/video/qvideosurfaceformat.h index dca8c808c..694dd9a79 100644 --- a/src/multimedia/video/qvideosurfaceformat.h +++ b/src/multimedia/video/qvideosurfaceformat.h @@ -76,8 +76,7 @@ public: QVideoSurfaceFormat(); QVideoSurfaceFormat( const QSize &size, - QVideoFrame::PixelFormat pixelFormat, - QVideoFrame::HandleType handleType = QVideoFrame::NoHandle); + QVideoFrame::PixelFormat pixelFormat); QVideoSurfaceFormat(const QVideoSurfaceFormat &format); ~QVideoSurfaceFormat(); @@ -89,7 +88,6 @@ public: bool isValid() const; QVideoFrame::PixelFormat pixelFormat() const; - QVideoFrame::HandleType handleType() const; QSize frameSize() const; void setFrameSize(const QSize &size); |