How can i modify "video_dec_drm.cpp" to display 6 camera video

the tegra_multimedia_api only “video_dec_drm.cpp” show the drm,the “ui_render_loop_fcn” use createDumbFB api to render jpeg,
how can i modify “video_dec_drm.cpp” to display 6 camera yuv raw data through dmabuf fd ?

Hi,
You can refer to 12_camera_v4l2_cuda to implement 6-source capture, and call NvBuffer composite() to composite sources to single video plane for rendering.

hi DaneLLL,i test different size rect,and the drm screen size is 1024x768,2 camera size is 1920x1080,another 2 camera size is 1280x720;parames eg:

NvBufferCreateParams input_params = {0};
input_params.payloadType = NvBufferPayload_SurfArray;
input_params.width = 1024;
input_params.height = 768;
input_params.layout = NvBufferLayout_Pitch;
input_params.nvbuf_tag = NvBufferTag_VIDEO_CONVERT;
input_params.colorFormat =NvBufferColorFormat_YUV420;

NvBufferRect dstCompRect[4];
dstCompRect[0].top = 0;
dstCompRect[0].left = 0;
dstCompRect[0].width = nScreenWidth/2;
dstCompRect[0].height = nScreenHeight/2;

dstCompRect[1].top = 0;
dstCompRect[1].left = nScreenWidth/2;
dstCompRect[1].width = nScreenWidth/2;
dstCompRect[1].height = nScreenHeight/2;

dstCompRect[2].top = nScreenHeight/2;
dstCompRect[2].left = 0;
dstCompRect[2].width = nScreenWidth/2;
dstCompRect[2].height = nScreenHeight/2;

dstCompRect[3].top = nScreenHeight/2;
dstCompRect[3].left = nScreenWidth/2;
dstCompRect[3].width = nScreenWidth/2;
dstCompRect[3].height = nScreenHeight/2;

m_compositeParam.src_comp_rect[0].top = 0;
m_compositeParam.src_comp_rect[0].left = 0;
m_compositeParam.src_comp_rect[0].width = 1920;
m_compositeParam.src_comp_rect[0].height = 1080;
m_compositeParam.src_comp_rect[1].top = 0;
m_compositeParam.src_comp_rect[1].left = 0;
m_compositeParam.src_comp_rect[1].width = 1920;
m_compositeParam.src_comp_rect[1].height = 1080;
m_compositeParam.src_comp_rect[2].top = 0;
m_compositeParam.src_comp_rect[2].left = 0;
m_compositeParam.src_comp_rect[2].width = 1280;
m_compositeParam.src_comp_rect[2].height = 720;
m_compositeParam.src_comp_rect[3].top = 0;
m_compositeParam.src_comp_rect[3].left = 0;
m_compositeParam.src_comp_rect[3].width = 1280;
m_compositeParam.src_comp_rect[3].height = 720;

but run much warning:
###Composite src[0],w:1920,h:1080
###Composite src[1],w:1920,h:1080
###Composite src[2],w:1280,h:720
###Composite src[3],w:1280,h:720
###render thread start
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum widt