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
qeglstreamconvenience_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 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#ifndef QEGLSTREAMCONVENIENCE_H
5#define QEGLSTREAMCONVENIENCE_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtGui/qtguiglobal.h>
19
20#include <QtGui/private/qt_egl_p.h>
21
22// This provides runtime EGLDevice/Output/Stream support even when eglext.h in
23// the sysroot is not up-to-date.
24
25#ifndef EGL_VERSION_1_5
27#endif
28
29#ifndef EGL_EXT_platform_base
31#endif
32
33#ifndef EGL_EXT_device_base
34typedef void *EGLDeviceEXT;
35#define EGL_NO_DEVICE_EXT ((EGLDeviceEXT)(0))
37typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name);
38#endif
39
40#ifndef EGL_EXT_output_base
41typedef void *EGLOutputLayerEXT;
42typedef void *EGLOutputPortEXT;
43#define EGL_NO_OUTPUT_LAYER_EXT ((EGLOutputLayerEXT)0)
44typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);
45typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);
46typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);
47typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);
48typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);
49typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);
50typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);
51#endif
52
53#ifndef EGL_KHR_stream
54typedef void *EGLStreamKHR;
56#define EGL_NO_STREAM_KHR ((EGLStreamKHR)0)
57#define EGL_STREAM_STATE_KHR 0x3214
58#define EGL_STREAM_STATE_CREATED_KHR 0x3215
59#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216
60#define EGL_STREAM_STATE_EMPTY_KHR 0x3217
61#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218
62#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219
63#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A
64#define EGL_BAD_STREAM_KHR 0x321B
65#define EGL_BAD_STATE_KHR 0x321C
67typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
68typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
69typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
70typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
71#endif
72
73#ifndef EGL_KHR_stream_fifo
74#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC
75#endif
76
77#ifndef EGL_KHR_stream_producer_eglsurface
78#define EGL_STREAM_BIT_KHR 0x0800
80#endif
81
82#ifndef EGL_KHR_stream_cross_process_fd
84#define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1))
87#endif
88
89#ifndef EGL_KHR_stream_consumer_gltexture
90typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
91typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
92typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
93#endif
94
95#ifndef EGL_EXT_stream_consumer_egloutput
96typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);
97#endif
98
99#ifndef EGL_EXT_platform_device
100#define EGL_PLATFORM_DEVICE_EXT 0x313F
101#endif
102
103#ifndef EGL_EXT_device_drm
104#define EGL_DRM_DEVICE_FILE_EXT 0x3233
105#endif
106
107#ifndef EGL_EXT_output_drm
108#define EGL_DRM_CRTC_EXT 0x3234
109#define EGL_DRM_PLANE_EXT 0x3235
110#endif
111
112#ifndef EGL_PLATFORM_X11_KHR
113#define EGL_PLATFORM_X11_KHR 0x31D5
114#endif
115
116#ifndef EGL_PLATFORM_XCB_KHR
117#define EGL_PLATFORM_XCB_KHR 0x31DC
118#endif
119
120#ifndef EGL_NV_stream_attrib
122typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSTREAMATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value);
123typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value);
124typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
125typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
126#endif
127
129
131{
132public:
133 QEGLStreamConvenience();
134 void initialize(EGLDisplay dpy);
135
136 PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display;
137 PFNEGLQUERYDEVICESEXTPROC query_devices;
138 PFNEGLQUERYDEVICESTRINGEXTPROC query_device_string;
139 PFNEGLCREATESTREAMKHRPROC create_stream;
140 PFNEGLCREATESTREAMATTRIBNVPROC create_stream_attrib_nv;
141 PFNEGLSETSTREAMATTRIBNVPROC set_stream_attrib_nv;
142 PFNEGLQUERYSTREAMATTRIBNVPROC query_stream_attrib_nv;
143 PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC acquire_stream_attrib_nv;
144 PFNEGLSTREAMCONSUMERRELEASEATTRIBNVPROC release_stream_attrib_nv;
145 PFNEGLDESTROYSTREAMKHRPROC destroy_stream;
146 PFNEGLSTREAMATTRIBKHRPROC stream_attrib;
147 PFNEGLQUERYSTREAMKHRPROC query_stream;
148 PFNEGLQUERYSTREAMU64KHRPROC query_stream_u64;
149 PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC create_stream_producer_surface;
150 PFNEGLSTREAMCONSUMEROUTPUTEXTPROC stream_consumer_output;
151 PFNEGLGETOUTPUTLAYERSEXTPROC get_output_layers;
152 PFNEGLGETOUTPUTPORTSEXTPROC get_output_ports;
153 PFNEGLOUTPUTLAYERATTRIBEXTPROC output_layer_attrib;
154 PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC query_output_layer_attrib;
155 PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC query_output_layer_string;
156 PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC query_output_port_attrib;
157 PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC query_output_port_string;
158 PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC get_stream_file_descriptor;
159 PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC create_stream_from_file_descriptor;
160 PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC stream_consumer_gltexture;
161 PFNEGLSTREAMCONSUMERACQUIREKHRPROC stream_consumer_acquire;
162 PFNEGLSTREAMCONSUMERRELEASEKHRPROC stream_consumer_release;
163
164 bool initialized;
165
166 bool has_egl_platform_device;
167 bool has_egl_device_base;
168 bool has_egl_stream;
169 bool has_egl_stream_producer_eglsurface;
170 bool has_egl_stream_consumer_egloutput;
171 bool has_egl_output_drm;
172 bool has_egl_output_base;
173 bool has_egl_stream_cross_process_fd;
174 bool has_egl_stream_consumer_gltexture;
175};
176
177QT_END_NAMESPACE
178
179#endif
EGLDeviceEXT * devices
int EGLNativeFileDescriptorKHR
EGLConfig config
[3]
void const EGLint * attrib_list
void * EGLOutputLayerEXT
EGLDeviceEXT EGLint * num_devices
typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC)(EGLint max_devices
void * native_display
intptr_t EGLAttrib
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy
void * EGLDeviceEXT
EGLNativeFileDescriptorKHR file_descriptor
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform
const char *EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC(EGLDeviceEXT device, EGLint name)
void * EGLOutputPortEXT
quint64 EGLuint64KHR
void * EGLStreamKHR