How can i convert EGLImageKHR to EGLStreamKHR?

I get the source data YUV422 by the method of DMA from the interface of V4L2,then generate a new image of EGLImage,
but how can I convert the EGLImage to EGLStream?

sampleCode:

        egl_image = NvEGLImageFromFd(egl_display, fd);

        if (egl_image == NULL)
            ERROR_RETURN("Failed to map dmabuf fd (0x%X) to EGLImage",ctx->render_dmabuf_fd);
        // Running algo process with EGLImage via GPU multi cores
        // HandleEGLImage(&egl_image);
        // Destroy EGLImage
        NvDestroyEGLImage(egl_display,egl_image);
        egl_image = NULL;

I want to use GL_TEXTURE_EXTERNAL_OES mode to display the data obtained by v4l2 interface throught DMA,
How can i build the data access with no copy memory ?

Please refer to tegra_multimedia_api/argus/samples/utils/PreviewConsumer.cpp

Hello DaneLLL,this file Source can’t help me ,it just tell me how to play the EGLStreamKHR structe data,but i can only get the metadata from function “EGLImageKHR NvEGLImageFromFd (EGLDisplay display, int dmabuf_fd);” ,No sample or functions can tell me How to play the struct Data of “EGLImageKHR” in Opengl ex Box;

Argus interface takes data of CSI camera, and my data comes from V4L2.I don’t want to consume too much CPU for copying, so I use DMA mode to fetch data.The data fetched from Argus is EGLStreamKHR, and I have no way to fake such data because it is directly supported by GPU and I have no permission to know how the code under it works.If I can’t make my program copy less when it displays video, it will seriously affect my program execution efficiency.

Hi,
tegra_multimedia_api/samples/common/classes/NvEglRenderer.cpp

glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, hEglImage);

In NvEglRenderer, it also uses GL_TEXTURE_EXTERNAL_OES mode.

Not sure if it is possible to convert EGLImage to EGLStream and how to. Other users may share experience.