summaryrefslogtreecommitdiffstats
path: root/src/multimedia/video/qvideotexturehelper_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/video/qvideotexturehelper_p.h')
-rw-r--r--src/multimedia/video/qvideotexturehelper_p.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/multimedia/video/qvideotexturehelper_p.h b/src/multimedia/video/qvideotexturehelper_p.h
index c6256efeb..261d55cf0 100644
--- a/src/multimedia/video/qvideotexturehelper_p.h
+++ b/src/multimedia/video/qvideotexturehelper_p.h
@@ -54,9 +54,12 @@
#include <qvideoframeformat.h>
#include <private/qrhi_p.h>
+#include <QtGui/qtextlayout.h>
+
QT_BEGIN_NAMESPACE
class QVideoFrame;
+class QTextLayout;
namespace QVideoTextureHelper
{
@@ -98,6 +101,17 @@ Q_MULTIMEDIA_EXPORT void updateUniformData(QByteArray *dst, const QVideoFrameFor
Q_MULTIMEDIA_EXPORT int updateRhiTextures(QVideoFrame frame, QRhi *rhi,
QRhiResourceUpdateBatch *resourceUpdates, QRhiTexture **textures);
+struct Q_MULTIMEDIA_EXPORT SubtitleLayout
+{
+ QSize videoSize;
+ QRectF bounds;
+ QTextLayout layout;
+
+ void updateFromVideoFrame(const QVideoFrame &frame);
+ void draw(QPainter *painter, const QRectF &videoRect) const;
+ QImage toImage() const;
+};
+
}
QT_END_NAMESPACE