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
4
#
include
"qwasmgltexturevideobuffer_p.h"
5
6
#
include
<
QtMultimedia
/
private
/
qhwvideobuffer_p
.
h
>
7
8
QT_BEGIN_NAMESPACE
9
10
11
QWasmGLTextureVideoBuffer
::
QWasmGLTextureVideoBuffer
(QGlTextureHandle textureHandle,
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
23
QAbstractVideoBuffer
::
MapData
QWasmGLTextureVideoBuffer
::
map
(
QVideoFrame
::
MapMode
)
24
{
25
return
{};
26
}
27
28
void
QWasmGLTextureVideoBuffer
::
unmap
()
29
{
30
}
31
32
quint64
QWasmGLTextureVideoBuffer
::
textureHandle
(QRhi &,
int
plane)
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
42
QT_END_NAMESPACE
QWasmGLTextureVideoBuffer
Definition
qwasmgltexturevideobuffer_p.h:45
QWasmGLTextureVideoBuffer::textureHandle
quint64 textureHandle(QRhi &, int plane) override
Definition
qwasmgltexturevideobuffer.cpp:32
QWasmGLTextureVideoBuffer::unmap
void unmap() override
Releases the memory mapped by the map() function.
Definition
qwasmgltexturevideobuffer.cpp:28
QWasmGLTextureVideoBuffer::map
QWasmGLTextureVideoBuffer::MapData map(QVideoFrame::MapMode) override
Maps the planes of a video buffer to memory.
Definition
qwasmgltexturevideobuffer.cpp:23
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtmultimedia
src
plugins
multimedia
wasm
common
qwasmgltexturevideobuffer.cpp
Generated on
for Qt by
1.16.1