Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qvideowindow.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qvideowindow_p.h"
5#include <QPlatformSurfaceEvent>
6#include <qfile.h>
7#include <qpainter.h>
8#include <private/qguiapplication_p.h>
9#include <private/qmemoryvideobuffer_p.h>
10#include <private/qmultimediautils_p.h>
11#include <qpa/qplatformintegration.h>
12
14
16{
17#if defined(Q_OS_DARWIN)
19#elif defined (Q_OS_WIN)
21#endif
22
24
25 if (!integration->hasCapability(QPlatformIntegration::OpenGL))
27
30
31 if (integration->hasCapability(QPlatformIntegration::RasterGLSurface))
33
35}
36
38 : q(q),
39 m_sink(new QVideoSink)
40{
41 Q_ASSERT(q);
42
44 auto surfaceType = ::platformSurfaceType();
45 q->setSurfaceType(surfaceType);
46 switch (surfaceType) {
49 // can't use those surfaces, need to render in SW
51 break;
55 break;
58 break;
61 break;
64 break;
65 }
66 }
67
68 QObject::connect(m_sink.get(), &QVideoSink::videoFrameChanged, q, &QVideoWindow::setVideoFrame);
69}
70
76
77static const float g_vw_quad[] = {
78 // 4 clockwise rotation of texture vertexes (the second pair)
79 // Rotation 0
80 -1.f, -1.f, 0.f, 0.f,
81 -1.f, 1.f, 0.f, 1.f,
82 1.f, -1.f, 1.f, 0.f,
83 1.f, 1.f, 1.f, 1.f,
84 // Rotation 90
85 -1.f, -1.f, 0.f, 1.f,
86 -1.f, 1.f, 1.f, 1.f,
87 1.f, -1.f, 0.f, 0.f,
88 1.f, 1.f, 1.f, 0.f,
89
90 // Rotation 180
91 -1.f, -1.f, 1.f, 1.f,
92 -1.f, 1.f, 1.f, 0.f,
93 1.f, -1.f, 0.f, 1.f,
94 1.f, 1.f, 0.f, 0.f,
95 // Rotation 270
96 -1.f, -1.f, 1.f, 0.f,
97 -1.f, 1.f, 0.f, 0.f,
98 1.f, -1.f, 1.f, 1.f,
99 1.f, 1.f, 0.f, 1.f
100};
101
103{
104 QFile f(name);
105 if (f.open(QIODevice::ReadOnly))
106 return QShader::fromSerialized(f.readAll());
107
108 return QShader();
109}
110
112{
114 return;
115
116 QRhi::Flags rhiFlags = {};//QRhi::EnableDebugMarkers | QRhi::EnableProfiling;
117
118#if QT_CONFIG(opengl)
120 m_fallbackSurface.reset(QRhiGles2InitParams::newFallbackSurface(q->format()));
122 params.fallbackSurface = m_fallbackSurface.get();
123 params.window = q;
124 params.format = q->format();
125 m_rhi.reset(QRhi::create(QRhi::OpenGLES2, &params, rhiFlags));
126 }
127#endif
128
129#if QT_CONFIG(vulkan)
132 params.inst = q->vulkanInstance();
133 params.window = q;
134 m_rhi.reset(QRhi::create(QRhi::Vulkan, &params, rhiFlags));
135 }
136#endif
137
138#ifdef Q_OS_WIN
139 if (m_graphicsApi == QRhi::D3D11) {
141 params.enableDebugLayer = true;
142 m_rhi.reset(QRhi::create(QRhi::D3D11, &params, rhiFlags));
143 }
144#endif
145
146#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
147 if (m_graphicsApi == QRhi::Metal) {
149 m_rhi.reset(QRhi::create(QRhi::Metal, &params, rhiFlags));
150 }
151#endif
152 if (!m_rhi)
153 return;
154
155 m_swapChain.reset(m_rhi->newSwapChain());
156 m_swapChain->setWindow(q);
157 m_renderPass.reset(m_swapChain->newCompatibleRenderPassDescriptor());
158 m_swapChain->setRenderPassDescriptor(m_renderPass.get());
159
161 m_vertexBuf->create();
162 m_vertexBufReady = false;
163
165 m_uniformBuf->create();
166
169 m_textureSampler->create();
170
171 m_shaderResourceBindings.reset(m_rhi->newShaderResourceBindings());
172 m_subtitleResourceBindings.reset(m_rhi->newShaderResourceBindings());
173
175 m_subtitleUniformBuf->create();
176
178}
179
181{
182
185 Q_ASSERT(vs.isValid());
187 Q_ASSERT(fs.isValid());
188 pipeline->setShaderStages({
191 });
192 QRhiVertexInputLayout inputLayout;
193 inputLayout.setBindings({
194 { 4 * sizeof(float) }
195 });
196 inputLayout.setAttributes({
198 { 0, 1, QRhiVertexInputAttribute::Float2, 2 * sizeof(float) }
199 });
200 pipeline->setVertexInputLayout(inputLayout);
201 pipeline->setShaderResourceBindings(bindings);
202 pipeline->setRenderPassDescriptor(m_renderPass.get());
203 pipeline->create();
204}
205
207{
208 m_texturesDirty = false;
209
210 // We render a 1x1 black pixel when we don't have a video
211 if (!m_currentFrame.isValid())
214
216 if (!m_frameTextures)
217 return;
218
219 QRhiShaderResourceBinding bindings[4];
220 auto *b = bindings;
222 m_uniformBuf.get());
223
225 auto textureDesc = QVideoTextureHelper::textureDescription(fmt.pixelFormat());
226
227 for (int i = 0; i < textureDesc->nplanes; ++i)
229 m_frameTextures->texture(i), m_textureSampler.get());
230 m_shaderResourceBindings->setBindings(bindings, b);
231 m_shaderResourceBindings->create();
232
233 if (fmt != format) {
234 format = fmt;
236 m_graphicsPipeline.reset(m_rhi->newGraphicsPipeline());
237
239 }
240}
241
277
279{
280 if (initialized)
281 return;
282 initialized = true;
283
284 initRhi();
285
286 if (!m_rhi)
288 else
289 m_sink->setRhi(m_rhi.get());
290}
291
293{
294 m_hasSwapChain = m_swapChain->createOrResize();
295}
296
298{
299 if (m_hasSwapChain) {
300 m_hasSwapChain = false;
301 m_swapChain->destroy();
302 }
303}
304
306{
307 if (!initialized)
308 init();
309
310 if (!q->isExposed() || !isExposed)
311 return;
312
313 QRect rect(0, 0, q->width(), q->height());
314
315 if (backingStore) {
316 if (backingStore->size() != q->size())
317 backingStore->resize(q->size());
318
320
322 if (!device)
323 return;
325
327 painter.end();
328
331 return;
332 }
333
334 const int frameRotationIndex = (static_cast<int>(m_currentFrame.rotation()) / 90) % 4;
336 if (frameRotationIndex % 2)
337 frameSize.transpose();
338 QSize scaled = frameSize.scaled(rect.size(), aspectRatioMode);
339 QRect videoRect = QRect(QPoint(0, 0), scaled);
340 videoRect.moveCenter(rect.center());
341 QRect subtitleRect = videoRect.intersected(rect);
342
343 if (!m_hasSwapChain || (m_swapChain->currentPixelSize() != m_swapChain->surfacePixelSize()))
345
346 const auto requiredSwapChainFormat =
348 if (qShouldUpdateSwapChainFormat(m_swapChain.get(), requiredSwapChainFormat)) {
350 m_swapChain->setFormat(requiredSwapChainFormat);
352 }
353
354 if (!m_hasSwapChain)
355 return;
356
357 QRhi::FrameOpResult r = m_rhi->beginFrame(m_swapChain.get());
358
359 // keep the video frames alive until we know that they are not needed anymore
360 m_videoFrameSlots[m_rhi->currentFrameSlot()] = m_currentFrame;
361
364 if (!m_hasSwapChain)
365 return;
366 r = m_rhi->beginFrame(m_swapChain.get());
367 }
368 if (r != QRhi::FrameOpSuccess) {
369 qWarning("beginFrame failed with %d, retry", r);
370 q->requestUpdate();
371 return;
372 }
373
374 QRhiResourceUpdateBatch *rub = m_rhi->nextResourceUpdateBatch();
375
376 if (!m_vertexBufReady) {
377 m_vertexBufReady = true;
379 }
380
381 if (m_texturesDirty)
382 updateTextures(rub);
383
384 if (m_subtitleDirty || m_subtitleLayout.videoSize != subtitleRect.size())
385 updateSubtitle(rub, subtitleRect.size());
386
387 float mirrorFrame = m_currentFrame.mirrored() ? -1.f : 1.f;
388 float xscale = mirrorFrame * float(videoRect.width())/float(rect.width());
389 float yscale = -1.f * float(videoRect.height())/float(rect.height());
390
393
394 float maxNits = 100;
396 auto info = m_swapChain->hdrInfo();
398 maxNits = 100 * info.limits.colorComponentValue.maxColorComponentValue;
399 else
400 maxNits = info.limits.luminanceInNits.maxLuminance;
401 }
402
403 QByteArray uniformData;
405 rub->updateDynamicBuffer(m_uniformBuf.get(), 0, uniformData.size(), uniformData.constData());
406
407 if (m_hasSubtitle) {
408 QMatrix4x4 st;
409 st.translate(0, -2.f * (float(m_subtitleLayout.bounds.center().y()) + float(subtitleRect.top()))/ float(rect.height()) + 1.f);
410 st.scale(float(m_subtitleLayout.bounds.width())/float(rect.width()),
411 -1.f * float(m_subtitleLayout.bounds.height())/float(rect.height()));
412
413 QByteArray uniformData;
415 QVideoTextureHelper::updateUniformData(&uniformData, fmt, QVideoFrame(), st, 1.f);
416 rub->updateDynamicBuffer(m_subtitleUniformBuf.get(), 0, uniformData.size(), uniformData.constData());
417 }
418
419 QRhiCommandBuffer *cb = m_swapChain->currentFrameCommandBuffer();
420 cb->beginPass(m_swapChain->currentFrameRenderTarget(), Qt::black, { 1.0f, 0 }, rub);
421 cb->setGraphicsPipeline(m_graphicsPipeline.get());
422 auto size = m_swapChain->currentPixelSize();
423 cb->setViewport({ 0, 0, float(size.width()), float(size.height()) });
424 cb->setShaderResources(m_shaderResourceBindings.get());
425
426 quint32 vertexOffset = quint32(sizeof(float)) * 16 * frameRotationIndex;
427 const QRhiCommandBuffer::VertexInput vbufBinding(m_vertexBuf.get(), vertexOffset);
428 cb->setVertexInput(0, 1, &vbufBinding);
429 cb->draw(4);
430
431 if (m_hasSubtitle) {
432 cb->setGraphicsPipeline(m_subtitlePipeline.get());
433 cb->setShaderResources(m_subtitleResourceBindings.get());
434 const QRhiCommandBuffer::VertexInput vbufBinding(m_vertexBuf.get(), 0);
435 cb->setVertexInput(0, 1, &vbufBinding);
436 cb->draw(4);
437 }
438
439 cb->endPass();
440
441 m_rhi->endFrame(m_swapChain.get());
442}
443
453
455 : QWindow(parent)
457{
458}
459
461
463{
464 return d->m_sink.get();
465}
466
468{
469 return d->aspectRatioMode;
470}
471
473{
474 if (d->aspectRatioMode == mode)
475 return;
476 d->aspectRatioMode = mode;
478}
479
481{
482 switch (e->type()) {
484 d->render();
485 return true;
486
488 // this is the proper time to tear down the swapchain (while the native window and surface are still around)
489 if (static_cast<QPlatformSurfaceEvent *>(e)->surfaceEventType() == QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed) {
490 d->releaseSwapChain();
491 d->isExposed = false;
492 }
493 break;
494 case QEvent::Expose:
495 d->isExposed = isExposed();
496 if (d->isExposed)
497 d->render();
498 return true;
499
500 default:
501 break;
502 }
503
504 return QWindow::event(e);
505}
506
508{
509 if (!d->backingStore)
510 return;
511 if (!d->initialized)
512 d->init();
513 d->backingStore->resize(resizeEvent->size());
514}
515
516void QVideoWindow::setVideoFrame(const QVideoFrame &frame)
517{
518 if (d->m_currentFrame.subtitleText() != frame.subtitleText())
519 d->m_subtitleDirty = true;
520 d->m_currentFrame = frame;
521 d->m_texturesDirty = true;
522 if (d->isExposed)
523 requestUpdate();
524}
525
527
528#include "moc_qvideowindow_p.cpp"
IOBluetoothDevice * device
The QBackingStore class provides a drawing area for QWindow.
QPaintDevice * paintDevice()
Returns the paint device for this surface.
void beginPaint(const QRegion &)
Begins painting on the backing store surface in the given region.
void flush(const QRegion &region, QWindow *window=nullptr, const QPoint &offset=QPoint())
Flushes the given region from the specified window onto the screen.
void resize(const QSize &size)
Sets the size of the window surface to size.
QSize size() const
Returns the current size of the window surface.
void endPaint()
Ends painting.
\inmodule QtCore
Definition qbytearray.h:57
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
Definition qbytearray.h:494
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
Definition qbytearray.h:124
static bool testAttribute(Qt::ApplicationAttribute attribute)
Returns true if attribute attribute is set; otherwise returns false.
\inmodule QtCore
Definition qcoreevent.h:45
@ UpdateRequest
Definition qcoreevent.h:113
@ PlatformSurface
Definition qcoreevent.h:278
Type type() const
Returns the event type.
Definition qcoreevent.h:304
\inmodule QtCore
Definition qfile.h:93
static QPlatformIntegration * platformIntegration()
\inmodule QtGui
Definition qimage.h:37
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
void scale(const QVector3D &vector)
Multiplies this matrix by another that scales coordinates by the components of vector.
void translate(const QVector3D &vector)
Multiplies this matrix by another that translates coordinates by the components of vector.
The QMemoryVideoBuffer class provides a system memory allocated video data buffer.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2960
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
Definition qobject.cpp:3236
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
bool end()
Ends painting.
The QPlatformSurfaceEvent class is used to notify about native platform surface events....
Definition qevent.h:531
\inmodule QtCore\reentrant
Definition qpoint.h:25
constexpr qreal height() const noexcept
Returns the height of the rectangle.
Definition qrect.h:732
constexpr qreal width() const noexcept
Returns the width of the rectangle.
Definition qrect.h:729
constexpr QPointF center() const noexcept
Returns the center point of the rectangle.
Definition qrect.h:699
constexpr QSizeF size() const noexcept
Returns the size of the rectangle.
Definition qrect.h:735
\inmodule QtCore\reentrant
Definition qrect.h:30
QRect intersected(const QRect &other) const noexcept
Definition qrect.h:415
The QResizeEvent class contains event parameters for resize events.
Definition qevent.h:548
@ Immutable
Definition qrhi.h:849
@ Dynamic
Definition qrhi.h:851
@ VertexBuffer
Definition qrhi.h:855
@ UniformBuffer
Definition qrhi.h:857
\inmodule QtGui
Definition qrhi.h:1651
QPair< QRhiBuffer *, quint32 > VertexInput
Synonym for QPair<QRhiBuffer *, quint32>.
Definition qrhi.h:1680
\inmodule QtGui
\inmodule QtGui
\inmodule QtGui
Definition qrhi.h:1270
void setShaderResourceBindings(QRhiShaderResourceBindings *srb)
Associates with srb describing the resource binding layout and the resources (QRhiBuffer,...
Definition qrhi.h:1462
void setVertexInputLayout(const QRhiVertexInputLayout &layout)
Specifies the vertex input layout.
Definition qrhi.h:1459
void setShaderStages(std::initializer_list< QRhiShaderStage > list)
Sets the list of shader stages.
Definition qrhi.h:1446
void setRenderPassDescriptor(QRhiRenderPassDescriptor *desc)
Associates with the specified QRhiRenderPassDescriptor desc.
Definition qrhi.h:1465
void setTopology(Topology t)
Sets the primitive topology t.
Definition qrhi.h:1390
virtual bool create()=0
Creates the corresponding native graphics resources.
\inmodule QtRhi
\inmodule QtGui
Definition qrhi.h:1731
void uploadStaticBuffer(QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
Enqueues updating a region of a QRhiBuffer buf created with the type QRhiBuffer::Immutable or QRhiBuf...
Definition qrhi.cpp:9011
@ ClampToEdge
Definition qrhi.h:1040
\inmodule QtGui
Definition qrhi.h:439
static QRhiShaderResourceBinding sampledTexture(int binding, StageFlags stage, QRhiTexture *tex, QRhiSampler *sampler)
Definition qrhi.cpp:5640
static QRhiShaderResourceBinding uniformBuffer(int binding, StageFlags stage, QRhiBuffer *buf)
Definition qrhi.cpp:5526
\inmodule QtGui
Definition qrhi.h:1214
@ HDRExtendedSrgbLinear
Definition qrhi.h:1563
\inmodule QtGui
Definition qrhi.h:321
void setBindings(std::initializer_list< QRhiVertexInputBinding > list)
Sets the bindings from the specified list.
Definition qrhi.h:325
void setAttributes(std::initializer_list< QRhiVertexInputAttribute > list)
Sets the attributes from the specified list.
Definition qrhi.h:337
\inmodule QtGui
@ Metal
Definition qrhi.h:1811
@ Vulkan
Definition qrhi.h:1808
@ Null
Definition qrhi.h:1807
@ D3D11
Definition qrhi.h:1810
@ OpenGLES2
Definition qrhi.h:1809
static QRhi * create(Implementation impl, QRhiInitParams *params, Flags flags={}, QRhiNativeHandles *importDevice=nullptr)
Definition qrhi.cpp:8491
@ FramesInFlight
Definition qrhi.h:1890
FrameOpResult
Describes the result of operations that can have a soft failure.
Definition qrhi.h:1824
@ FrameOpSuccess
Definition qrhi.h:1825
@ FrameOpSwapChainOutOfDate
Definition qrhi.h:1827
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition qscreen.h:32
\inmodule QtGui
Definition qshader.h:81
static QShader fromSerialized(const QByteArray &data)
Creates a new QShader instance from the given data.
Definition qshader.cpp:540
bool isValid() const
Definition qshader.cpp:343
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
Definition qstring.h:192
SurfaceType
The SurfaceType enum describes what type of surface this is.
Definition qsurface.h:30
@ OpenVGSurface
Definition qsurface.h:34
@ RasterGLSurface
Definition qsurface.h:33
@ RasterSurface
Definition qsurface.h:31
@ OpenGLSurface
Definition qsurface.h:32
@ MetalSurface
Definition qsurface.h:36
@ VulkanSurface
Definition qsurface.h:35
@ Direct3DSurface
Definition qsurface.h:37
The QVideoFrameFormat class specifies the stream format of a video presentation surface.
The QVideoFrame class represents a frame of video data.
Definition qvideoframe.h:27
QtVideo::Rotation rotation() const
Returns the angle the frame should be rotated clockwise before displaying.
bool mirrored() const
Returns whether the frame should be mirrored before displaying.
void paint(QPainter *painter, const QRectF &rect, const PaintOptions &options)
Uses a QPainter, {painter}, to render this QVideoFrame to rect.
QVideoFrameFormat surfaceFormat() const
Returns the surface format of this video frame.
QString subtitleText() const
Returns the subtitle text that should be rendered together with this video frame.
QSize size() const
Returns the dimensions of a video frame.
bool isValid() const
Identifies whether a video frame is valid.
The QVideoSink class represents a generic sink for video data.
Definition qvideosink.h:22
void videoFrameChanged(const QVideoFrame &frame) QT6_ONLY(const)
Signals when the video frame changes.
void updateSubtitle(QRhiResourceUpdateBatch *rub, const QSize &frameSize)
std::unique_ptr< QRhiShaderResourceBindings > m_shaderResourceBindings
std::unique_ptr< QVideoFrameTextures > m_frameTextures
std::unique_ptr< QRhiShaderResourceBindings > m_subtitleResourceBindings
Qt::AspectRatioMode aspectRatioMode
QVideoTextureHelper::SubtitleLayout m_subtitleLayout
std::unique_ptr< QRhiGraphicsPipeline > m_subtitlePipeline
std::unique_ptr< QRhiSwapChain > m_swapChain
std::unique_ptr< QRhiBuffer > m_uniformBuf
std::unique_ptr< QVideoSink > m_sink
QVideoFrame m_currentFrame
QVideoFrame m_videoFrameSlots[NVideoFrameSlots]
std::unique_ptr< QRhiRenderPassDescriptor > m_renderPass
std::unique_ptr< QRhiGraphicsPipeline > m_graphicsPipeline
std::unique_ptr< QRhi > m_rhi
QRhi::Implementation m_graphicsApi
std::unique_ptr< QRhiTexture > m_subtitleTexture
QBackingStore * backingStore
void setupGraphicsPipeline(QRhiGraphicsPipeline *pipeline, QRhiShaderResourceBindings *bindings, const QVideoFrameFormat &fmt)
QVideoWindowPrivate(QVideoWindow *q)
std::unique_ptr< QRhiBuffer > m_subtitleUniformBuf
std::unique_ptr< QRhiBuffer > m_vertexBuf
std::unique_ptr< QRhiSampler > m_textureSampler
void updateTextures(QRhiResourceUpdateBatch *rub)
void setAspectRatioMode(Qt::AspectRatioMode mode)
void aspectRatioModeChanged(Qt::AspectRatioMode mode)
bool event(QEvent *e) override
Override this to handle any event (ev) sent to the window.
void resizeEvent(QResizeEvent *) override
Override this to handle resize events (ev).
Qt::AspectRatioMode aspectRatioMode() const
QVideoWindow(QScreen *screen=nullptr)
Q_INVOKABLE QVideoSink * videoSink() const
\inmodule QtGui
Definition qwindow.h:63
virtual bool event(QEvent *) override
Override this to handle any event (ev) sent to the window.
Definition qwindow.cpp:2511
#define this
Definition dialogs.cpp:9
rect
[4]
Combined button and popup list for selecting options.
QString vertexShaderFileName(const QVideoFrameFormat &format)
QString fragmentShaderFileName(const QVideoFrameFormat &format, QRhiSwapChain::Format surfaceFormat)
const TextureDescription * textureDescription(QVideoFrameFormat::PixelFormat format)
std::unique_ptr< QVideoFrameTextures > createTextures(QVideoFrame &frame, QRhi *rhi, QRhiResourceUpdateBatch *rub, std::unique_ptr< QVideoFrameTextures > &&oldTextures)
void updateUniformData(QByteArray *dst, const QVideoFrameFormat &format, const QVideoFrame &frame, const QMatrix4x4 &transform, float opacity, float maxNits)
AspectRatioMode
@ black
Definition qnamespace.h:30
@ AA_ForceRasterWidgets
Definition qnamespace.h:443
#define qWarning
Definition qlogging.h:166
QRhiSwapChain::Format qGetRequiredSwapChainFormat(const QVideoFrameFormat &format)
bool qShouldUpdateSwapChainFormat(QRhiSwapChain *swapChain, QRhiSwapChain::Format requiredSwapChainFormat)
GLboolean GLboolean GLboolean b
GLenum GLenum GLuint GLint GLint GLint yscale
GLenum mode
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLboolean r
[2]
GLfloat GLfloat f
GLenum GLenum GLuint GLint GLint xscale
GLuint name
GLint GLsizei GLsizei GLenum format
void ** params
GLuint GLenum GLenum transform
GLint void * img
Definition qopenglext.h:233
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
static constexpr QSize frameSize(const T &frame)
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)
QScreen * screen
[1]
Definition main.cpp:29
#define emit
unsigned int quint32
Definition qtypes.h:50
QVideoFrameFormat::PixelFormat fmt
static QT_BEGIN_NAMESPACE QSurface::SurfaceType platformSurfaceType()
static const float g_vw_quad[]
static QShader vwGetShader(const QString &name)
QImage scaled(const QImage &image)
[0]
QPainter painter(this)
[7]
QFrame frame
[0]
QHostInfo info
[0]
bool update(const QSize &frameSize, QString text)