4#ifndef QEGLSTREAMCONVENIENCE_H
5#define QEGLSTREAMCONVENIENCE_H
18#include <QtGui/qtguiglobal.h>
20#include <QtGui/private/qt_egl_p.h>
25#ifndef EGL_VERSION_1_5
29#ifndef EGL_EXT_platform_base
33#ifndef EGL_EXT_device_base
35#define EGL_NO_DEVICE_EXT ((EGLDeviceEXT)(0
))
40#ifndef EGL_EXT_output_base
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);
49typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);
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);
73#ifndef EGL_KHR_stream_fifo
74#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC
77#ifndef EGL_KHR_stream_producer_eglsurface
78#define EGL_STREAM_BIT_KHR 0x0800
82#ifndef EGL_KHR_stream_cross_process_fd
84#define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1
))
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);
95#ifndef EGL_EXT_stream_consumer_egloutput
96typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);
99#ifndef EGL_EXT_platform_device
100#define EGL_PLATFORM_DEVICE_EXT 0x313F
103#ifndef EGL_EXT_device_drm
104#define EGL_DRM_DEVICE_FILE_EXT 0x3233
107#ifndef EGL_EXT_output_drm
108#define EGL_DRM_CRTC_EXT 0x3234
109#define EGL_DRM_PLANE_EXT 0x3235
112#ifndef EGL_PLATFORM_X11_KHR
113#define EGL_PLATFORM_X11_KHR 0x31D5
116#ifndef EGL_PLATFORM_XCB_KHR
117#define EGL_PLATFORM_XCB_KHR 0x31DC
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);
133 QEGLStreamConvenience();
134 void initialize(EGLDisplay dpy);
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;
166 bool has_egl_platform_device;
167 bool has_egl_device_base;
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;
int EGLNativeFileDescriptorKHR
void const EGLint * attrib_list
EGLDeviceEXT EGLint * num_devices
typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC)(EGLint max_devices
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy
EGLNativeFileDescriptorKHR file_descriptor
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform
const char *EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC(EGLDeviceEXT device, EGLint name)