summaryrefslogtreecommitdiffstats
path: root/src/multimedia/video/qvideosink.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-04-12 09:36:05 +0200
committerLars Knoll <lars.knoll@qt.io>2021-04-14 14:01:10 +0000
commit2656b64825f702e25b564d42e27b40d060c65bb0 (patch)
tree520ac81b60cd27e191cb593ed6ea831c8e98da33 /src/multimedia/video/qvideosink.cpp
parent50309974fd82f52877f96ee3cfffafa24600d397 (diff)
Rename QVideoSurfaceFormat to QVideoFrameFormat
The class is used exclusively together with video frames to describe their format, so the name should reflect that. Change-Id: I10bec7a0556b22c69ac790a99282e1376ce4af97 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/multimedia/video/qvideosink.cpp')
-rw-r--r--src/multimedia/video/qvideosink.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/multimedia/video/qvideosink.cpp b/src/multimedia/video/qvideosink.cpp
index 541d9058a..93308112e 100644
--- a/src/multimedia/video/qvideosink.cpp
+++ b/src/multimedia/video/qvideosink.cpp
@@ -39,7 +39,7 @@
#include "qvideosink.h"
-#include "qvideosurfaceformat.h"
+#include "qvideoframeformat.h"
#include "qvideoframe.h"
#include <qvariant.h>
@@ -65,7 +65,7 @@ public:
QVideoSink *q_ptr = nullptr;
QPlatformVideoSink *videoSink = nullptr;
QVideoSink::GraphicsType type = QVideoSink::Memory;
- QVideoSurfaceFormat surfaceFormat;
+ QVideoFrameFormat surfaceFormat;
QSize nativeResolution;
bool active = false;
WId window = 0;
@@ -283,13 +283,13 @@ void QVideoSink::paint(QPainter *painter, const QVideoFrame &f)
return;
}
- auto imageFormat = QVideoSurfaceFormat::imageFormatFromPixelFormat(frame.pixelFormat());
+ auto imageFormat = QVideoFrameFormat::imageFormatFromPixelFormat(frame.pixelFormat());
// Do not render into ARGB32 images using QPainter.
// Using QImage::Format_ARGB32_Premultiplied is significantly faster.
if (imageFormat == QImage::Format_ARGB32)
imageFormat = QImage::Format_ARGB32_Premultiplied;
- QVideoSurfaceFormat::Direction scanLineDirection = QVideoSurfaceFormat::TopToBottom;//format.scanLineDirection();
+ QVideoFrameFormat::Direction scanLineDirection = QVideoFrameFormat::TopToBottom;//format.scanLineDirection();
bool mirrored = false;//format.isMirrored();
QSizeF size = frame.size();
@@ -332,7 +332,7 @@ void QVideoSink::paint(QPainter *painter, const QVideoFrame &f)
const QTransform oldTransform = painter->transform();
QTransform transform = oldTransform;
- if (scanLineDirection == QVideoSurfaceFormat::BottomToTop) {
+ if (scanLineDirection == QVideoFrameFormat::BottomToTop) {
transform.scale(1, -1);
transform.translate(0, -targetRect.bottom());
targetRect = QRectF(targetRect.x(), 0, targetRect.width(), targetRect.height());