From d6e52bea2da1d31bce91d1a175f9b9e84b8e37f5 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 23 Mar 2021 13:31:22 +0100 Subject: Move the PixelFormat enum from QVideoFrame to QVideoSurfaceFormat Change-Id: Ifa888c74c397c640b19387a9ce624dfcf8269c2c Reviewed-by: Lars Knoll Reviewed-by: Doris Verria --- examples/multimedia/video/qmlvideofilter_opencl/main.cpp | 4 ++-- examples/multimedia/video/qmlvideofilter_opencl/rgbframehelper.h | 2 +- examples/multimediawidgets/player/histogramwidget.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'examples') 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); -- cgit v1.2.3