i have two programs A and Brunning in parallel:
-The program A takes frame from camera as opaque buffer (with encoding variant i420) and passes the mmal buffer header through a named pipe to program B.
-The program B takes such mmal buffer and uses it in an opengl ES 2.0 rendering (using the data field of mmal buffer as an EGL image, like in raspitex example).
The program works perfectly but OpenGL signals the error 0x505, which means "out of memory". If i re-write A and B in only one program (one executable) i don't have the error. The function that rises the error is glEGLimageTargetTexture2DOES.
As far as i know the data field in the mmal buffer header is some kind "understandable" by the GPU (being the buffer opaque, i suppose that is the pointer to GPU memory).
Maybe the GL context of B program sees that buf->data is a pointer out of its GPU memory space?