Hello, please help me to understand my mistake with EGLStream.
My task is to provide images handled by CUDA to EGLStream for FrameConsumer. Than get the frame and encode to JPEG with IImageJPEG.
I started with EGLStreams_CUDA_Interop example.
Here is the code for connecting producer to stream:
// EGLDisplayHolder m_display;
// EGLStreamHolder m_stream;
// CUeglStreamConnection m_cudaConn;
m_display.initialize();
PROPAGATE_ERROR(m_stream.create(m_display.get()));
CHECK_STREAM_STATE(m_stream, CREATED);
if (CUDA_SUCCESS == (status = cuEGLStreamProducerConnect(&m_cudaConn, m_stream.get(), STREAM_SIZE.width(), STREAM_SIZE.height()))) {
printf("Connect CUDA producer Done, CudaProducer %p\n", m_cudaConn);
} else {
printf("Connect CUDA producer FAILED with error %d\n", status);
return status;
}
Code produces error:
Connect CUDA producer FAILED with error 999.
Which is actually CUDA_ERROR_UNKNOWN.
Please help me to find solution.