Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qeglimagefunctions_p.h
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
#
ifndef
QEGLIMAGEFUNCTIONS_P_H
4
#
define
QEGLIMAGEFUNCTIONS_P_H
5
6
//
7
// W A R N I N G
8
// -------------
9
//
10
// This file is not part of the Qt API. It exists purely as an
11
// implementation detail. This header file may change from version to
12
// version without notice, or even be removed.
13
//
14
// We mean it.
15
//
16
17
#
include
<
QtMultimedia
/
private
/
qmultimedia_drm_support_p
.
h
>
18
#
include
<
QtMultimedia
/
private
/
qmultimedia_gl_support_p
.
h
>
19
#
include
<
QtMultimedia
/
private
/
qtmultimediaglobal_p
.
h
>
20
#
include
<
QtGui
/
qopengl
.
h
>
21
#
include
<
QtCore
/
qspan
.
h
>
22
23
#
include
<
EGL
/
egl
.
h
>
24
#
include
<
EGL
/
eglext
.
h
>
25
26
#
include
<
optional
>
27
28
QT_BEGIN_NAMESPACE
29
30
namespace
QtMultimediaPrivate
{
31
32
class
Q_MULTIMEDIA_EXPORT
QEglImageFunctions
33
{
34
QEglImageFunctions
();
35
36
public
:
37
static
const
QEglImageFunctions
&
instance
();
38
39
bool
isValid
()
const
;
40
41
void
glEGLImageTargetTexture2DOES
(
GLenum
,
GLeglImageOES
)
const
;
42
43
EGLImageHandle
eglCreateImage
(EGLDisplay, EGLContext, EGLenum, EGLClientBuffer,
44
QSpan<
const
EGLAttrib> attribs = {})
const
;
45
EGLBoolean
eglDestroyImage
(EGLDisplay, EGLImage)
const
;
46
47
// Returns whether `modifier` is a supported dma-buf import modifier for `drmFormat` on
48
// `display`, or nullopt if this EGL implementation doesn't support querying modifiers at
49
// all (EGL_EXT_image_dma_buf_import_modifiers unavailable).
50
std
::optional<
bool
>
isDmaBufModifierSupported
(EGLDisplay display, DRMFormat drmFormat,
51
DRMModifier modifier)
const
;
52
53
// Returns whether images of `drmFormat` with `modifier` can only be sampled through
54
// GL_TEXTURE_EXTERNAL_OES, or nullopt if that can't be determined.
55
std
::optional<
bool
>
isDmaBufModifierExternalOesOnly
(EGLDisplay display, DRMFormat drmFormat,
56
DRMModifier modifier)
const
;
57
58
private
:
59
#
ifdef
GL_OES_EGL_image
60
const
PFNGLEGLIMAGETARGETTEXTURE2DOESPROC
m_glEGLImageTargetTexture2DOES
=
nullptr
;
61
#
endif
62
63
#
ifdef
EGL_VERSION_1_5
64
// egl.h declares eglCreateImage/eglDestroyImage, but the egl library may not provide the
65
// symbols, so we need to resolve them at run-time.
66
67
// NB: android does not declare these function pointer types
68
typedef
EGLImage
(EGLAPIENTRYP
PFNEGLCREATEIMAGEPROC
)(
EGLDisplay
,
EGLContext
,
EGLenum
,
69
EGLClientBuffer
,
const
EGLAttrib
*);
70
typedef
EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYIMAGEPROC)(EGLDisplay, EGLImage);
71
72
const
PFNEGLCREATEIMAGEPROC m_eglCreateImage =
nullptr
;
73
const
PFNEGLDESTROYIMAGEPROC m_eglDestroyImage =
nullptr
;
74
#
endif
75
#
if
defined
(
EGL_KHR_image
)
76
const
PFNEGLCREATEIMAGEKHRPROC m_eglCreateImageKHR =
nullptr
;
77
const
PFNEGLDESTROYIMAGEKHRPROC m_eglDestroyImageKHR =
nullptr
;
78
#
endif
79
#
if
defined
(
EGL_EXT_image_dma_buf_import_modifiers
)
80
const
PFNEGLQUERYDMABUFMODIFIERSEXTPROC m_eglQueryDmaBufModifiersEXT =
nullptr
;
81
#
endif
82
};
83
84
}
// namespace QtMultimediaPrivate
85
86
QT_END_NAMESPACE
87
88
#
endif
// QEGLIMAGEFUNCTIONS_P_H
QtMultimediaPrivate::QEglImageFunctions
Definition
qeglimagefunctions_p.h:33
QtMultimediaPrivate::QEglImageFunctions::isDmaBufModifierSupported
std::optional< bool > isDmaBufModifierSupported(EGLDisplay display, DRMFormat drmFormat, DRMModifier modifier) const
Definition
qeglimagefunctions.cpp:183
QtMultimediaPrivate::QEglImageFunctions::glEGLImageTargetTexture2DOES
void glEGLImageTargetTexture2DOES(GLenum, GLeglImageOES) const
Definition
qeglimagefunctions.cpp:127
QtMultimediaPrivate::QEglImageFunctions::isValid
bool isValid() const
Definition
qeglimagefunctions.cpp:107
QtMultimediaPrivate::QEglImageFunctions::eglDestroyImage
EGLBoolean eglDestroyImage(EGLDisplay, EGLImage) const
Definition
qeglimagefunctions.cpp:170
QtMultimediaPrivate::QEglImageFunctions::isDmaBufModifierExternalOesOnly
std::optional< bool > isDmaBufModifierExternalOesOnly(EGLDisplay display, DRMFormat drmFormat, DRMModifier modifier) const
Definition
qeglimagefunctions.cpp:212
QtMultimediaPrivate::QEglImageFunctions::eglCreateImage
EGLImageHandle eglCreateImage(EGLDisplay, EGLContext, EGLenum, EGLClientBuffer, QSpan< const EGLAttrib > attribs={}) const
Definition
qeglimagefunctions.cpp:134
QtMultimediaPrivate::impl
Definition
qaudiosystem_p.h:257
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qtmultimedia
src
multimedia
video
qeglimagefunctions_p.h
Generated on
for Qt by
1.18.0