qeglstreamconvenience.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/platformsupport/eglconvenience/qeglstreamconvenience.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4QEGLStreamConvenience::QEGLStreamConvenience()-
5 : initialized(false),-
6 has_egl_platform_device(false),-
7 has_egl_device_base(false),-
8 has_egl_stream(false),-
9 has_egl_stream_producer_eglsurface(false),-
10 has_egl_stream_consumer_egloutput(false),-
11 has_egl_output_drm(false),-
12 has_egl_output_base(false),-
13 has_egl_stream_cross_process_fd(false),-
14 has_egl_stream_consumer_gltexture(false)-
15{-
16 const char *extensions = eglQueryString(((EGLDisplay)0), 0x3055);-
17 if (!extensions
!extensionsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
18 QMessageLogger(__FILE__, 59, __PRETTY_FUNCTION__).warning("Failed to query EGL extensions");-
19 return;
never executed: return;
0
20 }-
21-
22 query_devices = reinterpret_cast<PFNEGLQUERYDEVICESEXTPROC>(eglGetProcAddress("eglQueryDevicesEXT"));-
23 query_device_string = reinterpret_cast<PFNEGLQUERYDEVICESTRINGEXTPROC>(eglGetProcAddress("eglQueryDeviceStringEXT"));-
24 get_platform_display = reinterpret_cast<PFNEGLGETPLATFORMDISPLAYEXTPROC>(eglGetProcAddress("eglGetPlatformDisplayEXT"));-
25-
26 has_egl_device_base = strstr(extensions, "EGL_EXT_device_base");-
27 has_egl_platform_device = strstr(extensions, "EGL_EXT_platform_device");-
28}
never executed: end of block
0
29-
30void QEGLStreamConvenience::initialize(EGLDisplay dpy)-
31{-
32 if (initialized
initializedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
33 return;
never executed: return;
0
34-
35 if (!eglBindAPI(0x30A0)
!eglBindAPI(0x30A0)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
36 QMessageLogger(__FILE__, 77, __PRETTY_FUNCTION__).warning("Failed to bind OpenGL ES API");-
37 return;
never executed: return;
0
38 }-
39-
40 const char *extensions = eglQueryString(dpy, 0x3055);-
41 if (!extensions
!extensionsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
42 QMessageLogger(__FILE__, 83, __PRETTY_FUNCTION__).warning("Failed to query EGL extensions");-
43 return;
never executed: return;
0
44 }-
45-
46 create_stream = reinterpret_cast<PFNEGLCREATESTREAMKHRPROC>(eglGetProcAddress("eglCreateStreamKHR"));-
47 destroy_stream = reinterpret_cast<PFNEGLDESTROYSTREAMKHRPROC>(eglGetProcAddress("eglDestroyStreamKHR"));-
48 stream_attrib = reinterpret_cast<PFNEGLSTREAMATTRIBKHRPROC>(eglGetProcAddress("eglStreamAttribKHR"));-
49 query_stream = reinterpret_cast<PFNEGLQUERYSTREAMKHRPROC>(eglGetProcAddress("eglQueryStreamKHR"));-
50 query_stream_u64 = reinterpret_cast<PFNEGLQUERYSTREAMU64KHRPROC>(eglGetProcAddress("eglQueryStreamu64KHR"));-
51 create_stream_producer_surface = reinterpret_cast<PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC>(eglGetProcAddress("eglCreateStreamProducerSurfaceKHR"));-
52 stream_consumer_output = reinterpret_cast<PFNEGLSTREAMCONSUMEROUTPUTEXTPROC>(eglGetProcAddress("eglStreamConsumerOutputEXT"));-
53 get_output_layers = reinterpret_cast<PFNEGLGETOUTPUTLAYERSEXTPROC>(eglGetProcAddress("eglGetOutputLayersEXT"));-
54 get_output_ports = reinterpret_cast<PFNEGLGETOUTPUTPORTSEXTPROC>(eglGetProcAddress("eglGetOutputPortsEXT"));-
55 output_layer_attrib = reinterpret_cast<PFNEGLOUTPUTLAYERATTRIBEXTPROC>(eglGetProcAddress("eglOutputLayerAttribEXT"));-
56 query_output_layer_attrib = reinterpret_cast<PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC>(eglGetProcAddress("eglQueryOutputLayerAttribEXT"));-
57 query_output_layer_string = reinterpret_cast<PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC>(eglGetProcAddress("eglQueryOutputLayerStringEXT"));-
58 query_output_port_attrib = reinterpret_cast<PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC>(eglGetProcAddress("eglQueryOutputPortAttribEXT"));-
59 query_output_port_string = reinterpret_cast<PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC>(eglGetProcAddress("eglQueryOutputPortStringEXT"));-
60 get_stream_file_descriptor = reinterpret_cast<PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC>(eglGetProcAddress("eglGetStreamFileDescriptorKHR"));-
61 create_stream_from_file_descriptor = reinterpret_cast<PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC>(eglGetProcAddress("eglCreateStreamFromFileDescriptorKHR"));-
62 stream_consumer_gltexture = reinterpret_cast<PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC>(eglGetProcAddress("eglStreamConsumerGLTextureExternalKHR"));-
63 stream_consumer_acquire = reinterpret_cast<PFNEGLSTREAMCONSUMERACQUIREKHRPROC>(eglGetProcAddress("eglStreamConsumerAcquireKHR"));-
64 stream_consumer_release = reinterpret_cast<PFNEGLSTREAMCONSUMERRELEASEKHRPROC>(eglGetProcAddress("eglStreamConsumerReleaseKHR"));-
65-
66 has_egl_stream = strstr(extensions, "EGL_KHR_stream");-
67 has_egl_stream_producer_eglsurface = strstr(extensions, "EGL_KHR_stream_producer_eglsurface");-
68 has_egl_stream_consumer_egloutput = strstr(extensions, "EGL_EXT_stream_consumer_egloutput");-
69 has_egl_output_drm = strstr(extensions, "EGL_EXT_output_drm");-
70 has_egl_output_base = strstr(extensions, "EGL_EXT_output_base");-
71 has_egl_stream_cross_process_fd = strstr(extensions, "EGL_KHR_stream_cross_process_fd");-
72 has_egl_stream_consumer_gltexture = strstr(extensions, "EGL_KHR_stream_consumer_gltexture");-
73-
74 initialized = true;-
75}
never executed: end of block
0
76-
77-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9