we are trying to capture camera frames (Resolution: 1280x960, UYVY format) using v4l2 and use it in opengl application for further processing,
so to avoid copy between v4l2 and opengl buffers we are using DMA to share the frame data on GPU / opengl textures.
A] Run the application on Ubuntu 20.04 :
encountered issues at eglCreateImageKHR and the error code returned is 0x300c
B] Run the application on Ubuntu 20.04 :
encountered issues at glEGLImageTargetTexture2DOES and the error code returned is 0x0502
This is issue looks like some DMA extension support for opengl driver maybe.
1) v4l2 attributes used : + API
reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
reqbuf.memory = V4L2_MEMORY_MMAP;
reqbuf.count = 32;
int res;
res = ioctl(_Fd, VIDIOC_REQBUFS, &reqbuf);
2) EGL imagekhr api + attributes
static EGLint fixedAttribs[11] = {
EGL_WIDTH, (EGLint)_FrameWidth_u32/2,
EGL_HEIGHT, (EGLint)_FrameHeight_1MP_u32,
EGL_LINUX_DRM_FOURCC_EXT, DRM_FORMAT_ARGB8888,
EGL_DMA_BUF_PLANE0_PITCH_EXT, (EGLint)_FrameWidth_u32 * 2,
EGL_NONE
};
eglCreateImageKHR(display, EGL_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, (EGLClientBuffer)0, attrib);
So could you please let use know if DAM mem buffer is accessible which uses opengl via EGL framework
OR any solution/modification needed in the attributes .

