Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
30typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list);
31#endif
32
33#ifndef EGL_EXT_device_base
34typedef void *EGLDeviceEXT;
35#define EGL_NO_DEVICE_EXT ((EGLDeviceEXT)(0))
36typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);
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
66typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list);
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
79typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
80#endif
81
82#ifndef EGL_KHR_stream_cross_process_fd
84#define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1))
85typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
86typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
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
121typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMATTRIBNVPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list);
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
130class Q_GUI_EXPORT QEGLStreamConvenience
131{
132public:
134 void initialize(EGLDisplay dpy);
135
137 PFNEGLQUERYDEVICESEXTPROC query_devices;
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;
156 PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC query_output_port_attrib;
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
165
175};
176
178
179#endif
IOBluetoothDevice * device
PFNEGLGETOUTPUTPORTSEXTPROC get_output_ports
PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC query_output_layer_attrib
PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC create_stream_producer_surface
PFNEGLSETSTREAMATTRIBNVPROC set_stream_attrib_nv
PFNEGLSTREAMATTRIBKHRPROC stream_attrib
PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC acquire_stream_attrib_nv
PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC query_output_port_string
PFNEGLQUERYSTREAMKHRPROC query_stream
PFNEGLOUTPUTLAYERATTRIBEXTPROC output_layer_attrib
PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC create_stream_from_file_descriptor
PFNEGLCREATESTREAMKHRPROC create_stream
PFNEGLSTREAMCONSUMERRELEASEKHRPROC stream_consumer_release
PFNEGLGETOUTPUTLAYERSEXTPROC get_output_layers
PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC get_stream_file_descriptor
PFNEGLDESTROYSTREAMKHRPROC destroy_stream
PFNEGLQUERYDEVICESTRINGEXTPROC query_device_string
PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC stream_consumer_gltexture
PFNEGLCREATESTREAMATTRIBNVPROC create_stream_attrib_nv
PFNEGLQUERYSTREAMATTRIBNVPROC query_stream_attrib_nv
PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC query_output_port_attrib
PFNEGLQUERYSTREAMU64KHRPROC query_stream_u64
PFNEGLQUERYDEVICESEXTPROC query_devices
PFNEGLSTREAMCONSUMERRELEASEATTRIBNVPROC release_stream_attrib_nv
PFNEGLSTREAMCONSUMEROUTPUTEXTPROC stream_consumer_output
PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC query_output_layer_string
PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display
PFNEGLSTREAMCONSUMERACQUIREKHRPROC stream_consumer_acquire
Combined button and popup list for selecting options.
static bool initialize()
Definition qctf.cpp:94
const char *EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC(EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name)
const EGLAttrib EGLOutputLayerEXT EGLint EGLint * num_layers
EGLDeviceEXT * devices
EGLStreamKHR stream
int EGLNativeFileDescriptorKHR
EGLConfig config
const EGLAttrib EGLOutputLayerEXT EGLint max_layers
const char *EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC(EGLDisplay dpy, EGLOutputPortEXT port, EGLint name)
void * EGLOutputLayerEXT
EGLDeviceEXT EGLint * num_devices
typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC)(EGLint max_devices
intptr_t EGLAttrib
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy
void * EGLDeviceEXT
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
EGLOutputPortEXT port
const EGLAttrib EGLOutputPortEXT EGLint max_ports
EGLNativeFileDescriptorKHR file_descriptor
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform
const char *EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC(EGLDeviceEXT device, EGLint name)
const EGLAttrib EGLOutputLayerEXT * layers
void * EGLOutputPortEXT
EGLOutputLayerEXT layer
void * native_display
quint64 EGLuint64KHR
EGLOutputLayerEXT EGLint attribute
const EGLAttrib EGLOutputPortEXT EGLint EGLint * num_ports
void * EGLStreamKHR
const EGLAttrib EGLOutputPortEXT * ports
void const EGLint * attrib_list
INT_PTR intptr_t
GLuint name
unsigned long long quint64
Definition qtypes.h:61
QT_BEGIN_NAMESPACE Platform platform()
EGLDisplay(* PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform, void *native_display, const EGLint *attrib_list)