<HTML>
<HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META content="OPENWEBMAIL" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">Hello,</font></font>
<p style="margin-bottom: 0cm; line-height: 100%;">
<br />
</p>
<p style="margin-bottom: 0cm; line-height: 100%;"><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">I
have built a simple application using QT & SDL that has a button
which opens a preview on clicking, whenever camera (system/usb) is
connected to the EVM. </font></font>
</p>
<font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">My
app successfully receives correct parameters related to camera
(resolution, frame rate, frame format) and I have verified it using
debug prints. However, when I click on preview button, it crashes and
throws error related to EGL. </font></font>
<p style="margin-bottom: 0cm; line-height: 100%;">
<br />
</p>
<p style="margin-bottom: 0cm; line-height: 100%;"><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">On
executing it with gdb, I found out that it is not able to get a valid
EGL configuration. The eglChooseConfig function (in SDL_egl.c)
doesn't find a matching EGL config and it fails to create a surface
and open the preview.</font></font></p>
<font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">Also,
</font></font><strong><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">I
do not get any "EGL 1.4 Initialised" prints </font></font></strong><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">when
my app executes. This print, on the contrary, is visible when I run
</font></font><strong><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">OGLES2ChameleonMan
</font></font></strong><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">in
</font></font><strong><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">/usr/bin/SGX/demos/Wayland</font></font></strong><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">.</font></font>
<p style="margin-bottom: 0cm; line-height: 100%;">
<br />
</p>
<p style="margin-bottom: 0cm; line-height: 100%;"><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">On
digging further, I found that the "eglinfo" command
displays the egl configurations on the terminal.</font></font></p>
<div><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">However,
when it returns EGL_BAD_ALLOC on my EVM, if I run it without stopping
weston. It runs successfully only after stopping weston. I am
assuming this is the reason why my application is not able to find a
matching EGL config because it runs over weston.</font></font></div>
<div><font face="Times New Roman, serif">
<br /></font></div>
<div><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">-----------------------------------------------------------------------------------</font></font></div>
<div>
<p style="box-sizing: border-box; margin: 1.5em 0px; line-height: 1.35em; font-size: 14px; text-rendering: optimizelegibility; color: rgb(85, 85, 85); font-family: "Source Sans Pro", Helvetica, Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">root@am57xx-evm:/mnt# eglinfo</p>
<font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4"><span style="color: rgb(85, 85, 85); font-family: monospace, serif; font-size: 12.6px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: pre; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(242, 242, 242); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">eglGetConfigs():
======================================================================
**********************************
EGL config number: 0
EGL vendor string: Imagination Technologies
EGL version string: 1.4 build 1.14@3699939 (MAIN)
EGL extensions: EGL_IMG_client_api_ogl EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_IMG_cl_image EGL_KHR_fence_sync EGL_IMG_context_priority EGL_IMG_hibernate_process EGL_IMG_image_plane_attribs EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_KHR_create_context EGL_WL_bind_wayland_display EGL_EXT_image_dma_buf_import
EGL client APIs are: OpenGL_ES
EGL config Attributes:
EGL_CONFIG_ID = 0x1
EGL_BUFFER_SIZE = 0x20
EGL_RED_SIZE = 0x8
EGL_GREEN_SIZE = 0x8
EGL_BLUE_SIZE = 0x8
EGL_LUMINANCE_SIZE = 0x0
EGL_ALPHA_SIZE = 0x8
EGL_ALPHA_MASK_SIZE = 0x0
EGL_BIND_TO_TEXTURE_RGB = 0x1
EGL_BIND_TO_TEXTURE_RGBA = 0x1
EGL_COLOR_BUFFER_TYPE = 0x308e
EGL_CONFIG_CAVEAT = 0x3038
EGL_CONFORMANT = 0x1
EGL_DEPTH_SIZE = 0x18
EGL_LEVEL = 0x0
EGL_MAX_PBUFFER_WIDTH = 0x1000
EGL_MAX_PBUFFER_HEIGHT = 0x1000
EGL_MAX_PBUFFER_PIXELS = 0x1000000
EGL_MAX_SWAP_INTERVAL = 0xa
EGL_MIN_SWAP_INTERVAL = 0x1
EGL_NATIVE_RENDERABLE = 0x0
EGL_NATIVE_VISUAL_ID = 0x0
EGL_NATIVE_VISUAL_TYPE = 0x0
EGL_RENDERABLE_TYPE = 0x1 EGL_OPENGL_ES_BIT
EGL_SAMPLE_BUFFERS = 0x0
EGL_SAMPLES = 0x0
EGL_STENCIL_SIZE = 0x8
EGL_SURFACE_TYPE = 0x5 EGL_PBUFFER_BIT EGL_WINDOW_BIT
EGL_TRANSPARENT_TYPE = 0x3038
EGL_TRANSPARENT_RED_VALUE = 0x0
EGL_TRANSPARENT_GREEN_VALUE = 0x0
EGL_TRANSPARENT_BLUE_VALUE = 0x0
Creating Window surface..
PVR:(Error): WSEGL_CreateWindowDrawable: Couldn't set CRTC: Permission denied [0, ]
Unable to create surface
egl error 'EGL_BAD_ALLOC' (0x3003)</span></font></font></div>
<div><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">-----------------------------------------------------------------------------------
<br /></font></font></div>
<div><font face="Times New Roman, serif">
<br /></font></div>
<p style="margin-bottom: 0cm; line-height: 100%;">
<br />
</p>
<p style="margin-bottom: 0cm; line-height: 100%;"><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">Does
anyone has any idea about this strange behaviour?</font></font></p>
<p style="margin-bottom: 0cm; line-height: 100%;"><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">Also,
Is there any way to run </font></font><strong><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">eglinfo
</font></font></strong><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">command
without stopping </font></font><strong><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">weston</font></font></strong><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">?
Because I think my application is </font></font><strong><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">polling
available egl configurations</font></font></strong><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4"> at the run time, but is not
returning anything as it runs over weston.</font></font></p>
<p style="margin-bottom: 0cm; line-height: 100%;"><font face="Times New Roman, serif">
<br /></font></p>
<p style="margin-bottom: 0cm; line-height: 100%;"><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">The ldd of my application returns:</font></font></p>
<p style="margin-bottom: 0cm; line-height: 100%;"><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">-----------------------------------------------------------------------------------
<br /></font></font></p>
<pre class="brush: bash; light: true; collapse: true; fontsize: 100; first-line: 1; html-script: true; toolbar: false; " style="box-sizing: border-box; font-family: monospace, serif; font-size: 0.9em; white-space: pre; padding: 10px; background-color: rgb(242, 242, 242); border-radius: 3px; overflow-wrap: normal; color: rgb(85, 85, 85); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">root@am57xx-evm:/mnt# ldd cam_preview
linux-vdso.so.1 (0xbec50000)
libpjsua.so.2 => /usr/local/PJSIP_ONLY/libpjsua.so.2 (0xb6e6e000)
libpjsip-ua.so.2 => /usr/local/PJSIP_ONLY/libpjsip-ua.so.2 (0xb6e48000)
libpjsip-simple.so.2 => /usr/local/PJSIP_ONLY/libpjsip-simple.so.2 (0xb6e28000)
libpjsip.so.2 => /usr/local/PJSIP_ONLY/libpjsip.so.2 (0xb6dda000)
libpjmedia-codec.so.2 => /usr/local/PJSIP_ONLY/libpjmedia-codec.so.2 (0xb6dba000)
libpjmedia-videodev.so.2 => /usr/local/PJSIP_ONLY/libpjmedia-videodev.so.2 (0xb6d9e000)
libpjmedia-audiodev.so.2 => /usr/local/PJSIP_ONLY/libpjmedia-audiodev.so.2 (0xb6d88000)
libpjmedia.so.2 => /usr/local/PJSIP_ONLY/libpjmedia.so.2 (0xb6d12000)
libpjnath.so.2 => /usr/local/PJSIP_ONLY/libpjnath.so.2 (0xb6cdf000)
libpjlib-util.so.2 => /usr/local/PJSIP_ONLY/libpjlib-util.so.2 (0xb6cab000)
libsrtp.so.2 => /usr/local/PJSIP_ONLY/libsrtp.so.2 (0xb6c87000)
libresample.so.2 => /usr/local/PJSIP_ONLY/libresample.so.2 (0xb6c6a000)
libgsmcodec.so.2 => /usr/local/PJSIP_ONLY/libgsmcodec.so.2 (0xb6c4c000)
libspeex.so.2 => /usr/local/PJSIP_ONLY/libspeex.so.2 (0xb6c13000)
libilbccodec.so.2 => /usr/local/PJSIP_ONLY/libilbccodec.so.2 (0xb6bf4000)
libg7221codec.so.2 => /usr/local/PJSIP_ONLY/libg7221codec.so.2 (0xb6bd4000)
libyuv.so.2 => /usr/local/PJSIP_ONLY/libyuv.so.2 (0xb6ba5000)
libpj.so.2 => /usr/local/PJSIP_ONLY/libpj.so.2 (0xb6b77000)
libopenh264.so.5 => /usr/local/PJSIP_ONLY/libopenh264.so.5 (0xb6a94000)
libstdc++.so.6 => /lib/libstdc++.so.6 (0xb6978000)
libuuid.so.1 => /lib/libuuid.so.1 (0xb6964000)
librt.so.1 => /lib/librt.so.1 (0xb694e000)
libasound.so.2 => /usr/lib/libasound.so.2 (0xb686a000)
libSDL2-2.0.so.0 => /usr/local/SDL_ONLY/libSDL2-2.0.so.0 (0xb6783000)
libv4l2.so.0 => /usr/lib/libv4l2.so.0 (0xb6767000)
libQt5Widgets.so.5 => /usr/lib/libQt5Widgets.so.5 (0xb625e000)
libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0xb5d71000)
libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0xb5887000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb5863000)
libGLESv2.so.2 => /usr/lib/libGLESv2.so.2 (0xb57e8000)
libQt5X11Extras.so.5 => /usr/local/PJSIP_ONLY/libQt5X11Extras.so.5 (0xb6f30000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb56cb000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb569b000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb5688000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb5673000)
libm.so.6 => /lib/libm.so.6 (0xb55f7000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb55ce000)
libc.so.6 => /lib/libc.so.6 (0xb54e1000)
/lib/ld-linux-armhf.so.3 (0xb6f16000)
libdl.so.2 => /lib/libdl.so.2 (0xb54ce000)
libwayland-client.so.0 => /usr/lib/libwayland-client.so.0 (0xb54b4000)
libpvr_wlegl.so.1 => /usr/lib/libpvr_wlegl.so.1 (0xb54a3000)
libwayland-cursor.so.0 => /usr/lib/libwayland-cursor.so.0 (0xb548c000)
libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0xb5444000)
libv4lconvert.so.0 => /usr/lib/libv4lconvert.so.0 (0xb53c0000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb537c000)
libsrv_um.so.1 => /usr/lib/libsrv_um.so.1 (0xb5338000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0xb52ff000)
libz.so.1 => /lib/libz.so.1 (0xb52db000)
libicui18n.so.59 => /usr/lib/libicui18n.so.59 (0xb50db000)
libicuuc.so.59 => /usr/lib/libicuuc.so.59 (0xb4f71000)
libicudata.so.59 => /usr/lib/libicudata.so.59 (0xb364c000)
libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb362f000)
libgbm.so.2 => /usr/lib/libgbm.so.2 (0xb361c000)
libudev.so.1 => /lib/libudev.so.1 (0xb3600000)
libwayland-server.so.0 => /usr/lib/libwayland-server.so.0 (0xb35e3000)
libdrm_omap.so.1 => /usr/lib/libdrm_omap.so.1 (0xb35d0000)
libffi.so.6 => /usr/lib/libffi.so.6 (0xb35b9000)
libIMGegl.so.1 => /usr/lib/libIMGegl.so.1 (0xb3593000)
libpvr2d.so.1 => /usr/lib/libpvr2d.so.1 (0xb357f000)
libresolv.so.2 => /lib/libresolv.so.2 (0xb355e000)
libcap.so.2 => /lib/libcap.so.2 (0xb3549000)
libdbm.so.1 => /usr/lib/libdbm.so.1 (0xb3537000)</pre>
<p style="margin-bottom: 0cm; line-height: 100%;"><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">---------------------------------------------------------------------------------------------
<br /></font></font></p>
<p style="margin-bottom: 0cm; line-height: 100%;"><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">--
<br />
<br />
Thanks & Regards,
<br />
<br />
Devashish Tiwari </font></font></p>
<p style="margin-bottom: 0cm; line-height: 100%;"><font face="Times New Roman, serif"><font style="font-size: 14pt;" size="4">CDOT India
</font></font></p>
</BODY>
</HTML>