Hey, thank you very much for your response. I could start the sample application having gdm3 running.
For one of my projects I was using Gstreamer drmvideosink to display videostream on one plane, and a Qt GUI on another plane. This is working perfetct.
Now I have a project, where I need to use libargus API in C++ instead of GStreamer.
So what I want is based on argus cudaBayerDemosaic example, but instead of egl preview consumer I’d like to use NvDrmRenderer. I am using 08_drm_video_dec example as a reference.
I transform from RAW16 to RGBA nv_buffer in my CUDA-Kernel, but when I enque that buffer to NvDrmRenderer I get
[ERROR] (NvDrmRenderer.cpp:157) Error in transforming buffer information
[ERROR] (NvDrmRenderer.cpp:687) Failed to convert to DRM params
[ERROR] (NvDrmRenderer.cpp:804) Error in rendering frame
which is because my format is not of these types:
switch (params->pixel_format) {
case NvBufferColorFormat_YUV420:
dParams->pixel_format = DRM_FORMAT_YUV420;
break;
case NvBufferColorFormat_YVU420:
dParams->pixel_format = DRM_FORMAT_YVU420;
break;
case NvBufferColorFormat_NV12:
dParams->pixel_format = DRM_FORMAT_NV12;
break;
case NvBufferColorFormat_NV21:
dParams->pixel_format = DRM_FORMAT_NV21;
break;
case NvBufferColorFormat_UYVY:
dParams->pixel_format = DRM_FORMAT_UYVY;
break;
case NvBufferColorFormat_NV12_10LE:
dParams->pixel_format = DRM_FORMAT_TEGRA_P010;
break;
case NvBufferColorFormat_Invalid:
default:
goto error;
}
I was wondering if it is also possible to use RGBA because DRM_FORMAT_RGBA8888 is defined (can I just add it to the switch statement?) or is it not possible to use DRM Renderer with RGBA Format?
In that case, what would be the fastest way to transform my RGBA nv_buffer to YUV420 or NV12 format?
Do you think I am on the right path or is there another more clever solution to my problem?
Best regards,
jb