EGLImage from NvBuffer

Hello,

I am attempting to process images from sample 13 in CUDA.

I get the images with

m_dmabufs[i] = iNativeBuffer->createNvBuffer(iStreams[i]->getResolution(), NvBufferColorFormat_XRGB32, NvBufferLayout_Pitch);

and run

EGLImageKHR egl_image = NvEGLImageFromFd(g_renderer->getEGLDisplay(), m_dmabufs[0]);
if (egl_image == NULL)
{
     fprintf(stderr, "Error while mapping dmabuf fd (0x%X) to EGLImage\n", 0); 
}

CUresult status;
CUeglFrame eglFrame;
CUgraphicsResource pResource = NULL;

cudaFree(0);
status = cuGraphicsEGLRegisterImage(&pResource, egl_image, CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE);
if (status != CUDA_SUCCESS)
{
    printf("cuGraphicsEGLRegisterImage failed: %d, cuda process stop\n", status);
}

and get this result

cuGraphicsEGLRegisterImage failed: 1, cuda process stop

Also, where is documentation for CUeglFrame? This link [url]https://docs.nvidia.com/cuda/archive/9.0/cuda-driver-api/structCUeglFrame.html[/url] is broken

Hi,

Our MMAPI sample demonstrate the camera pipeline. Please check it for information:

Thanks.