Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwasmgltexturevideobuffer.cpp
Go to the documentation of this file.
1// Copyright (C) 2026 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
5
6#include <QtMultimedia/private/qhwvideobuffer_p.h>
7
9
10
12 const QSize &size,
13 EMSCRIPTEN_WEBGL_CONTEXT_HANDLE glContext,
14 QRhi *rhi)
15 : m_glTextureHandle(std::move(textureHandle)),
16 m_size(size),
17 m_glContext(glContext),
18 m_rhi(rhi),
19 m_rhiThread(QThread::currentThread())
20{
21}
22
27
31
33{
34 if (plane != 0 || !m_glTextureHandle)
35 return 0;
36 // Ensure the context that owns this texture is current before
37 // the caller binds or samples it.
38 emscripten_webgl_make_context_current(m_glContext);
39 return static_cast<quint64>(m_glTextureHandle.get());
40}
41
42QT_END_NAMESPACE
quint64 textureHandle(QRhi &, int plane) override
void unmap() override
Releases the memory mapped by the map() function.
QWasmGLTextureVideoBuffer::MapData map(QVideoFrame::MapMode) override
Maps the planes of a video buffer to memory.
Combined button and popup list for selecting options.