diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-03-23 13:31:22 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-04-06 08:11:45 +0000 |
commit | d6e52bea2da1d31bce91d1a175f9b9e84b8e37f5 (patch) | |
tree | 90e41da7f8a6abdd069da5e7fcd410d8accb8843 /examples | |
parent | 9aaec39aef634a9f2d972f35484a566bdd01ecd6 (diff) |
Move the PixelFormat enum from QVideoFrame to QVideoSurfaceFormat
Change-Id: Ifa888c74c397c640b19387a9ce624dfcf8269c2c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'examples')
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/multimedia/video/qmlvideofilter_opencl/main.cpp b/examples/multimedia/video/qmlvideofilter_opencl/main.cpp index 58c8967f0..2ee2d8bf4 100644 --- a/examples/multimedia/video/qmlvideofilter_opencl/main.cpp +++ b/examples/multimedia/video/qmlvideofilter_opencl/main.cpp @@ -323,8 +323,8 @@ QVideoFrame CLFilterRunnable::run(QVideoFrame *input, const QVideoSurfaceFormat return *input; } - if (input->pixelFormat() == QVideoFrame::Format_YUV420P - || input->pixelFormat() == QVideoFrame::Format_YV12) { + if (input->pixelFormat() == QVideoSurfaceFormat::Format_YUV420P + || input->pixelFormat() == QVideoSurfaceFormat::Format_YV12) { qWarning("YUV data is not supported"); return *input; } diff --git a/examples/multimedia/video/qmlvideofilter_opencl/rgbframehelper.h b/examples/multimedia/video/qmlvideofilter_opencl/rgbframehelper.h index ea82b267e..79e577a40 100644 --- a/examples/multimedia/video/qmlvideofilter_opencl/rgbframehelper.h +++ b/examples/multimedia/video/qmlvideofilter_opencl/rgbframehelper.h @@ -129,7 +129,7 @@ private: QVideoFrame::imageFormatFromPixelFormat() to get a suitable format. Ownership is not altered, the new QVideoFrame will not destroy the texture. */ -QVideoFrame frameFromTexture(uint textureId, const QSize &size, QVideoFrame::PixelFormat format) +QVideoFrame frameFromTexture(uint textureId, const QSize &size, QVideoSurfaceFormat::PixelFormat format) { #ifndef QT_NO_OPENGL return QVideoFrame(new TextureBuffer(textureId), size, format); diff --git a/examples/multimediawidgets/player/histogramwidget.cpp b/examples/multimediawidgets/player/histogramwidget.cpp index 78a666c6d..fadb32656 100644 --- a/examples/multimediawidgets/player/histogramwidget.cpp +++ b/examples/multimediawidgets/player/histogramwidget.cpp @@ -211,8 +211,8 @@ void FrameProcessor::processFrame(QVideoFrame frame, int levels) if (!frame.map(QVideoFrame::ReadOnly)) break; - if (frame.pixelFormat() == QVideoFrame::Format_YUV420P || - frame.pixelFormat() == QVideoFrame::Format_NV12) { + if (frame.pixelFormat() == QVideoSurfaceFormat::Format_YUV420P || + frame.pixelFormat() == QVideoSurfaceFormat::Format_NV12) { // Process YUV data uchar *b = frame.bits(); for (int y = 0; y < frame.height(); ++y) { @@ -222,7 +222,7 @@ void FrameProcessor::processFrame(QVideoFrame frame, int levels) b += frame.bytesPerLine(); } } else { - QImage::Format imageFormat = QVideoFrame::imageFormatFromPixelFormat(frame.pixelFormat()); + QImage::Format imageFormat = QVideoSurfaceFormat::imageFormatFromPixelFormat(frame.pixelFormat()); if (imageFormat != QImage::Format_Invalid) { // Process RGB data QImage image(frame.bits(), frame.width(), frame.height(), imageFormat); |