42 ReadWrite = ReadOnly | WriteOnly
46#if QT_DEPRECATED_SINCE(6
, 7
)
49 Rotation0 Q_DECL_ENUMERATOR_DEPRECATED_X(
"Use QtVideo::Rotation::None instead") = 0,
50 Rotation90 Q_DECL_ENUMERATOR_DEPRECATED_X(
"Use QtVideo::Rotation::Clockwise90 instead") = 90,
51 Rotation180 Q_DECL_ENUMERATOR_DEPRECATED_X(
"Use QtVideo::Rotation::Clockwise180 instead") = 180,
52 Rotation270 Q_DECL_ENUMERATOR_DEPRECATED_X(
"Use QtVideo::Rotation::Clockwise270 instead") = 270
57 QVideoFrame(
const QVideoFrameFormat &format);
58 explicit QVideoFrame(
const QImage &image);
59 explicit QVideoFrame(std::unique_ptr<QAbstractVideoBuffer> videoBuffer);
60 QVideoFrame(
const QVideoFrame &other);
63 QVideoFrame(QVideoFrame &&other)
noexcept =
default;
64 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QVideoFrame)
65 void swap(QVideoFrame &other)
noexcept
69 QVideoFrame &operator =(
const QVideoFrame &other);
70 bool operator==(
const QVideoFrame &other)
const;
71 bool operator!=(
const QVideoFrame &other)
const;
75 QVideoFrameFormat::PixelFormat pixelFormat()
const;
77 QVideoFrameFormat surfaceFormat()
const;
78 QVideoFrame::HandleType handleType()
const;
84 bool isMapped()
const;
85 bool isReadable()
const;
86 bool isWritable()
const;
88 QVideoFrame::MapMode mapMode()
const;
90 bool map(QVideoFrame::MapMode mode);
93 int bytesPerLine(
int plane)
const;
95 uchar *bits(
int plane);
96 const uchar *bits(
int plane)
const;
97 int mappedBytes(
int plane)
const;
98 int planeCount()
const;
100 qint64 startTime()
const;
101 void setStartTime(qint64 time);
103 qint64 endTime()
const;
104 void setEndTime(qint64 time);
106#if QT_DEPRECATED_SINCE(6
, 7
)
107 QT_DEPRECATED_VERSION_X_6_7(
"Use QVideoFrame::setRotation(QtVideo::Rotation) instead")
108 void setRotationAngle(RotationAngle angle) { setRotation(QtVideo::Rotation(angle)); }
110 QT_DEPRECATED_VERSION_X_6_7(
"Use QVideoFrame::rotation() instead")
111 RotationAngle rotationAngle()
const {
return RotationAngle(rotation()); }
114 void setRotation(QtVideo::Rotation angle);
115 QtVideo::Rotation rotation()
const;
117 void setMirrored(
bool);
118 bool mirrored()
const;
120 void setStreamFrameRate(qreal rate);
121 qreal streamFrameRate()
const;
123 QImage toImage()
const;
125 struct PaintOptions {
126 QColor backgroundColor = Qt::transparent;
127 Qt::AspectRatioMode aspectRatioMode = Qt::KeepAspectRatio;
129 DontDrawSubtitles = 0x1
131 Q_DECLARE_FLAGS(PaintFlags, PaintFlag)
132 PaintFlags paintFlags = {};
135 QString subtitleText()
const;
136 void setSubtitleText(
const QString &text);
138 void paint(QPainter *painter,
const QRectF &rect,
const PaintOptions &options);
140#if QT_DEPRECATED_SINCE(6
, 8
)
141 QT_DEPRECATED_VERSION_X_6_8(
"The constructor is internal and deprecated")
142 QVideoFrame(QAbstractVideoBuffer *buffer,
const QVideoFrameFormat &format);
144 QT_DEPRECATED_VERSION_X_6_8(
"The method is internal and deprecated")
145 QAbstractVideoBuffer *videoBuffer()
const;
148 friend class QVideoFramePrivate;
149 QExplicitlySharedDataPointer<QVideoFramePrivate> d;