longo92
Posts: 65
Joined: Mon Sep 03, 2018 3:45 pm
Location: Pisa-Italy
Contact: Website Skype

Decoder and EGL image

Tue Oct 15, 2019 1:21 pm

Hi, i have two thread:
-One is in charge of decoding an h264 stream.
-The other is an opengl es 2.0 rendering thread.
I set up the h264 decoder in order to have a mmal opaque buffers as output, then i pass them to a render thread (using an mmal queue) that transforms into textures rendered on a quad (creating firstly the eglImage and then the texture):
1) *egl_image = eglCreateImageKHR(display, EGL_NO_CONTEXT, EGL_IMAGE_BRCM_MULTIMEDIA, mmal_buffer_opaque, NULL);
2) glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, *egl_image);

the glEGLImageTargetTexture2DOES rises the GL_OUT_OF_MEMORY (0x0505) error. Could you help me?
If i ignore the error it works well (i see the correct frame on my quad).
If i send, instead, camera frames in the rendering thread using the camera video port and mmal_opaque_buffer as output (then the same configuration of the decoder) it doesn't rise the error.

Return to “OpenGLES”