Qt 6.x
The Qt SDK
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 <qpa/qplatformintegration.h>
11
13
15{
16#if defined(Q_OS_DARWIN)
18#elif defined (Q_OS_WIN)
20#endif
21
23
24 if (!integration->hasCapability(QPlatformIntegration::OpenGL))
26
29
30 if (integration->hasCapability(QPlatformIntegration::RasterGLSurface))
32
34}
35
37 : q(q),
38 m_sink(new QVideoSink)
39{
40 Q_ASSERT(q);
41
43 auto surfaceType = ::platformSurfaceType();
44 q->setSurfaceType(surfaceType);
45 switch (surfaceType) {
48 // can't use those surfaces, need to render in SW
50 break;
54 break;
57 break;
60 break;
63 break;
64 }
65 }
66
67 QObject::connect(m_sink.get(), &QVideoSink::videoFrameChanged, q, &QVideoWindow::setVideoFrame);
68}
69
71{
73 q, &QVideoWindow::setVideoFrame);
74}
75
76static const float g_vw_quad[] = {
77 // 4 clockwise rotation of texture vertexes (the second pair)
78 // Rotation 0
79 -1.f, -1.f, 0.f, 0.f,
80 -1.f, 1.f, 0.f, 1.f,
81 1.f, -1.f, 1.f, 0.f,
82 1.f, 1.f, 1.f, 1.f,
83 // Rotation 90
84 -1.f, -1.f, 0.f, 1.f,
85 -1.f, 1.f, 1.f, 1.f,
86 1.f, -1.f, 0.f, 0.f,
87 1.f, 1.f, 1.f, 0.f,
88
89 // Rotation 180
90 -1.f, -1.f, 1.f, 1.f,
91 -1.f, 1.f, 1.f, 0.f,
92 1.f, -1.f, 0.f, 1.f,
93 1.f, 1.f, 0.f, 0.f,
94 // Rotation 270
95 -1.f, -1.f, 1.f, 0.f,
96 -1.f, 1.f, 0.f, 0.f,
97 1.f, -1.f, 1.f, 1.f,
98 1.f, 1.f, 0.f, 1.f
99};
100
102{
103 QFile f(name);
104 if (f.open(QIODevice::ReadOnly))
105 return QShader::fromSerialized(f.readAll());
106
107 return QShader();
108}
109
111{
113 return;
114
115 QRhi::Flags rhiFlags = {};//QRhi::EnableDebugMarkers | QRhi::EnableProfiling;
116
117#if QT_CONFIG(opengl)
119 m_fallbackSurface.reset(QRhiGles2InitParams::newFallbackSurface(q->format()));
121 params.fallbackSurface = m_fallbackSurface.get();
122 params.window = q;
123 params.format = q->format();
124 m_rhi.reset(QRhi::create(QRhi::OpenGLES2, &params, rhiFlags));
125 }
126#endif
127
128#if QT_CONFIG(vulkan)
131 params.inst = q->vulkanInstance();
132 params.window = q;
133 m_rhi.reset(QRhi::create(QRhi::Vulkan, &params, rhiFlags));
134 }
135#endif
136
137#ifdef Q_OS_WIN
138 if (m_graphicsApi == QRhi::D3D11) {
140 params.enableDebugLayer = true;
141 m_rhi.reset(QRhi::create(QRhi::D3D11, &params, rhiFlags));
142 }
143#endif
144
145#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
146 if (m_graphicsApi == QRhi::Metal) {
148 m_rhi.reset(QRhi::create(QRhi::Metal, &params, rhiFlags));
149 }
150#endif
151 if (!m_rhi)
152 return;
153
154 m_swapChain.reset(m_rhi->newSwapChain());
155 m_swapChain->setWindow(q);
158 m_renderPass.reset(m_swapChain->newCompatibleRenderPassDescriptor());
159 m_swapChain->setRenderPassDescriptor(m_renderPass.get());
160
162 m_vertexBuf->create();
163 m_vertexBufReady = false;
164
166 m_uniformBuf->create();
167
170 m_textureSampler->create();
171
172 m_shaderResourceBindings.reset(m_rhi->newShaderResourceBindings());
173 m_subtitleResourceBindings.reset(m_rhi->newShaderResourceBindings());
174
176 m_subtitleUniformBuf->create();
177
179}
180
182{
183
186 Q_ASSERT(vs.isValid());
188 Q_ASSERT(fs.isValid());
189 pipeline->setShaderStages({
192 });
193 QRhiVertexInputLayout inputLayout;
194 inputLayout.setBindings({
195 { 4 * sizeof(float) }
196 });
197 inputLayout.setAttributes({
199 { 0, 1, QRhiVertexInputAttribute::Float2, 2 * sizeof(float) }
200 });
201 pipeline->setVertexInputLayout(inputLayout);
202 pipeline->setShaderResourceBindings(bindings);
203 pipeline->setRenderPassDescriptor(m_renderPass.get());
204 pipeline->create();
205}
206
208{
209 m_texturesDirty = false;
210
211 // We render a 1x1 black pixel when we don't have a video
212 if (!m_currentFrame.isValid())
215
217 if (!m_frameTextures)
218 return;
219
220 QRhiShaderResourceBinding bindings[4];
221 auto *b = bindings;
223 m_uniformBuf.get());
224
226 auto textureDesc = QVideoTextureHelper::textureDescription(fmt.pixelFormat());
227
228 for (int i = 0; i < textureDesc->nplanes; ++i)
230 m_frameTextures->texture(i), m_textureSampler.get());
231 m_shaderResourceBindings->setBindings(bindings, b);
232 m_shaderResourceBindings->create();
233
234 if (fmt != format) {
235 format = fmt;
237 m_graphicsPipeline.reset(m_rhi->newGraphicsPipeline());
238
240 }
241}
242
244{
245 m_subtitleDirty = false;
247 if (!m_hasSubtitle)
248 return;
249
252
254
255 m_subtitleTexture.reset(m_rhi->newTexture(QRhiTexture::RGBA8, size));
256 m_subtitleTexture->create();
258
259 QRhiShaderResourceBinding bindings[2];
260
263
266 m_subtitleResourceBindings->setBindings(bindings, bindings + 2);
268
269 if (!m_subtitlePipeline) {
270 m_subtitlePipeline.reset(m_rhi->newGraphicsPipeline());
271
273 blend.enable = true;
274 m_subtitlePipeline->setTargetBlends({ blend });
276 }
277}
278
280{
281 if (initialized)
282 return;
283 initialized = true;
284
285 initRhi();
286
287 if (!m_rhi)
289 else
290 m_sink->setRhi(m_rhi.get());
291}
292
294{
295 m_hasSwapChain = m_swapChain->createOrResize();
296}
297
299{
300 if (m_hasSwapChain) {
301 m_hasSwapChain = false;
302 m_swapChain->destroy();
303 }
304}
305
307{
308 if (!initialized)
309 init();
310
311 if (!q->isExposed() || !isExposed)
312 return;
313
314 QRect rect(0, 0, q->width(), q->height());
315
316 if (backingStore) {
317 if (backingStore->size() != q->size())
318 backingStore->resize(q->size());
319
321
323 if (!device)
324 return;
326
328 painter.end();
329
332 return;
333 }
334
335 int frameRotationIndex = (m_currentFrame.rotationAngle() / 90) % 4;
337 if (frameRotationIndex % 2)
340 QRect videoRect = QRect(QPoint(0, 0), scaled);
341 videoRect.moveCenter(rect.center());
342 QRect subtitleRect = videoRect.intersected(rect);
343
344 if (m_swapChain->currentPixelSize() != m_swapChain->surfacePixelSize())
346
347 if (!m_hasSwapChain)
348 return;
349
350 QRhi::FrameOpResult r = m_rhi->beginFrame(m_swapChain.get());
351
352 // keep the video frames alive until we know that they are not needed anymore
353 m_videoFrameSlots[m_rhi->currentFrameSlot()] = m_currentFrame;
354
357 if (!m_hasSwapChain)
358 return;
359 r = m_rhi->beginFrame(m_swapChain.get());
360 }
361 if (r != QRhi::FrameOpSuccess) {
362 qWarning("beginFrame failed with %d, retry", r);
363 q->requestUpdate();
364 return;
365 }
366
367 QRhiResourceUpdateBatch *rub = m_rhi->nextResourceUpdateBatch();
368
369 if (!m_vertexBufReady) {
370 m_vertexBufReady = true;
372 }
373
374 if (m_texturesDirty)
375 updateTextures(rub);
376
377 if (m_subtitleDirty || m_subtitleLayout.videoSize != subtitleRect.size())
378 updateSubtitle(rub, subtitleRect.size());
379
380 float mirrorFrame = m_currentFrame.mirrored() ? -1.f : 1.f;
381 float xscale = mirrorFrame * float(videoRect.width())/float(rect.width());
382 float yscale = -1.f * float(videoRect.height())/float(rect.height());
383
385 transform.scale(xscale, yscale);
386
387 float maxNits = 100;
389 auto info = m_swapChain->hdrInfo();
391 maxNits = 100 * info.limits.colorComponentValue.maxColorComponentValue;
392 else
393 maxNits = info.limits.luminanceInNits.maxLuminance;
394 }
395
396 QByteArray uniformData;
398 rub->updateDynamicBuffer(m_uniformBuf.get(), 0, uniformData.size(), uniformData.constData());
399
400 if (m_hasSubtitle) {
401 QMatrix4x4 st;
402 st.translate(0, -2.f * (float(m_subtitleLayout.bounds.center().y()) + float(subtitleRect.top()))/ float(rect.height()) + 1.f);
403 st.scale(float(m_subtitleLayout.bounds.width())/float(rect.width()),
404 -1.f * float(m_subtitleLayout.bounds.height())/float(rect.height()));
405
406 QByteArray uniformData;
408 QVideoTextureHelper::updateUniformData(&uniformData, fmt, QVideoFrame(), st, 1.f);
409 rub->updateDynamicBuffer(m_subtitleUniformBuf.get(), 0, uniformData.size(), uniformData.constData());
410 }
411
412 QRhiCommandBuffer *cb = m_swapChain->currentFrameCommandBuffer();
413 cb->beginPass(m_swapChain->currentFrameRenderTarget(), Qt::black, { 1.0f, 0 }, rub);
414 cb->setGraphicsPipeline(m_graphicsPipeline.get());
415 auto size = m_swapChain->currentPixelSize();
416 cb->setViewport({ 0, 0, float(size.width()), float(size.height()) });
417 cb->setShaderResources(m_shaderResourceBindings.get());
418
419 quint32 vertexOffset = quint32(sizeof(float)) * 16 * frameRotationIndex;
420 const QRhiCommandBuffer::VertexInput vbufBinding(m_vertexBuf.get(), vertexOffset);
421 cb->setVertexInput(0, 1, &vbufBinding);
422 cb->draw(4);
423
424 if (m_hasSubtitle) {
425 cb->setGraphicsPipeline(m_subtitlePipeline.get());
426 cb->setShaderResources(m_subtitleResourceBindings.get());
427 const QRhiCommandBuffer::VertexInput vbufBinding(m_vertexBuf.get(), 0);
428 cb->setVertexInput(0, 1, &vbufBinding);
429 cb->draw(4);
430 }
431
432 cb->endPass();
433
434 m_rhi->endFrame(m_swapChain.get());
435}
436
442 : QWindow(screen)
444{
445}
446
448 : QWindow(parent)
450{
451}
452
454
456{
457 return d->m_sink.get();
458}
459
461{
462 return d->aspectRatioMode;
463}
464
466{
467 if (d->aspectRatioMode == mode)
468 return;
469 d->aspectRatioMode = mode;
471}
472
474{
475 switch (e->type()) {
477 d->render();
478 return true;
479
481 // this is the proper time to tear down the swapchain (while the native window and surface are still around)
482 if (static_cast<QPlatformSurfaceEvent *>(e)->surfaceEventType() == QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed) {
483 d->releaseSwapChain();
484 d->isExposed = false;
485 }
486 break;
487 case QEvent::Expose:
488 d->isExposed = isExposed();
489 if (d->isExposed)
490 requestUpdate();
491 return true;
492
493 default:
494 break;
495 }
496
497 return QWindow::event(e);
498}
499
501{
502 if (!d->backingStore)
503 return;
504 if (!d->initialized)
505 d->init();
506 d->backingStore->resize(resizeEvent->size());
507}
508
509void QVideoWindow::setVideoFrame(const QVideoFrame &frame)
510{
511 if (d->m_currentFrame.subtitleText() != frame.subtitleText())
512 d->m_subtitleDirty = true;
513 d->m_currentFrame = frame;
514 d->m_texturesDirty = true;
515 if (d->isExposed)
516 requestUpdate();
517}
518
520
521#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:474
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
Definition qbytearray.h:122
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
\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:2823
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
Definition qobject.cpp:3099
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:530
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
Definition qpoint.h:338
\inmodule QtCore\reentrant
Definition qpoint.h:23
constexpr qreal height() const noexcept
Returns the height of the rectangle.
Definition qrect.h:718
constexpr qreal width() const noexcept
Returns the width of the rectangle.
Definition qrect.h:715
constexpr QPointF center() const noexcept
Returns the center point of the rectangle.
Definition qrect.h:685
constexpr QSizeF size() const noexcept
Returns the size of the rectangle.
Definition qrect.h:721
\inmodule QtCore\reentrant
Definition qrect.h:30
constexpr void moveCenter(const QPoint &p) noexcept
Moves the rectangle, leaving the center point at the given position.
Definition qrect.h:327
constexpr int height() const noexcept
Returns the height of the rectangle.
Definition qrect.h:238
QRect intersected(const QRect &other) const noexcept
Definition qrect.h:414
constexpr int top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
Definition qrect.h:175
constexpr QSize size() const noexcept
Returns the size of the rectangle.
Definition qrect.h:241
constexpr int width() const noexcept
Returns the width of the rectangle.
Definition qrect.h:235
The QResizeEvent class contains event parameters for resize events.
Definition qevent.h:547
@ Immutable
Definition qrhi.h:837
@ Dynamic
Definition qrhi.h:839
@ VertexBuffer
Definition qrhi.h:843
@ UniformBuffer
Definition qrhi.h:845
\inmodule QtGui
Definition qrhi.h:1614
QPair< QRhiBuffer *, quint32 > VertexInput
Synonym for QPair<QRhiBuffer *, quint32>.
Definition qrhi.h:1643
\inmodule QtGui
\inmodule QtGui
\inmodule QtGui
Definition qrhi.h:1241
void setShaderResourceBindings(QRhiShaderResourceBindings *srb)
Associates with srb describing the resource binding layout and the resources (QRhiBuffer,...
Definition qrhi.h:1433
void setVertexInputLayout(const QRhiVertexInputLayout &layout)
Specifies the vertex input layout.
Definition qrhi.h:1430
void setShaderStages(std::initializer_list< QRhiShaderStage > list)
Sets the list of shader stages.
Definition qrhi.h:1417
void setRenderPassDescriptor(QRhiRenderPassDescriptor *desc)
Associates with the specified QRhiRenderPassDescriptor desc.
Definition qrhi.h:1436
void setTopology(Topology t)
Sets the primitive topology t.
Definition qrhi.h:1361
virtual bool create()=0
Creates the corresponding native graphics resources.
\inmodule QtRhi
\inmodule QtGui
Definition qrhi.h:1694
void updateDynamicBuffer(QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
Enqueues updating a region of a QRhiBuffer buf created with the type QRhiBuffer::Dynamic.
Definition qrhi.cpp:8595
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:8615
void uploadTexture(QRhiTexture *tex, const QRhiTextureUploadDescription &desc)
Enqueues uploading the image data for one or more mip levels in one or more layers of the texture tex...
Definition qrhi.cpp:8681
@ ClampToEdge
Definition qrhi.h:1017
\inmodule QtGui
Definition qrhi.h:431
static QRhiShaderResourceBinding sampledTexture(int binding, StageFlags stage, QRhiTexture *tex, QRhiSampler *sampler)
Definition qrhi.cpp:5406
static QRhiShaderResourceBinding uniformBuffer(int binding, StageFlags stage, QRhiBuffer *buf)
Definition qrhi.cpp:5292
\inmodule QtGui
Definition qrhi.h:1190
@ HDRExtendedSrgbLinear
Definition qrhi.h:1527
\inmodule QtGui
Definition qrhi.h:313
void setBindings(std::initializer_list< QRhiVertexInputBinding > list)
Sets the bindings from the specified list.
Definition qrhi.h:317
void setAttributes(std::initializer_list< QRhiVertexInputAttribute > list)
Sets the attributes from the specified list.
Definition qrhi.h:329
\inmodule QtGui
@ Metal
Definition qrhi.h:1774
@ Vulkan
Definition qrhi.h:1771
@ Null
Definition qrhi.h:1770
@ D3D11
Definition qrhi.h:1773
@ OpenGLES2
Definition qrhi.h:1772
static QRhi * create(Implementation impl, QRhiInitParams *params, Flags flags={}, QRhiNativeHandles *importDevice=nullptr)
Definition qrhi.cpp:8129
@ FramesInFlight
Definition qrhi.h:1850
FrameOpResult
Describes the result of operations that can have a soft failure.
Definition qrhi.h:1786
@ FrameOpSuccess
Definition qrhi.h:1787
@ FrameOpSwapChainOutOfDate
Definition qrhi.h:1789
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:510
bool isValid() const
Definition qshader.cpp:313
constexpr QSize toSize() const noexcept
Returns an integer based copy of this size.
Definition qsize.h:390
\inmodule QtCore
Definition qsize.h:25
QSize scaled(int w, int h, Qt::AspectRatioMode mode) const noexcept
Definition qsize.h:150
void transpose() noexcept
Swaps the width and height values.
Definition qsize.cpp:130
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition qstring.h:1083
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:26
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.
RotationAngle rotationAngle() const
Returns the angle the frame should be rotated clockwise before displaying.
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:2433
#define this
Definition dialogs.cpp:9
double e
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:29
@ AA_ForceRasterWidgets
Definition qnamespace.h:442
#define qWarning
Definition qlogging.h:162
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:45
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]
QFileInfo info(fileName)
[8]
QPainter painter(this)
[7]
QFrame frame
[0]
bool update(const QSize &frameSize, QString text)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent