How to safe exit the DRM gui

Hello, When I flashed image for Jeston nano, and use below api from offical DRM sdk to show image:

RgbDrmRenderer::GetInstance()->CreateInstance();
RgbDrmRenderer::GetInstance()->CpyToScrMem(data, DATA_LEN);
RgbDrmRenderer::GetInstance()->SetDrmPlane(0, 0, WIGHT_LEN, HEIGHT_LEN);
RgbDrmRenderer::GetInstance()->DestroyInstance();

How can I to stop DRM GUI?

Hi,
We have a sample for DRM:

/usr/src/jetson_multimedia_api/samples/08_video_dec_drm

Please take a look. May refer to it for your implementation.

Hi @DaneLLL, Yes, I had refered this sample code, but didn’t have exit DRM GUI, I have to use linux signal to program(kill program), then DRM GUI was exit, but it’s not good.

Hi,
The usecase may not be tested/verified. Please share a sample so that we can replicate the issue and do further check.

Okay, I have below code:

int main()
{
int drmWidth = 1920;
int drmHeight = 1080;
RgbDrmRenderer::GetInstance()->CreateInstance();
RgbDrmRenderer::GetInstance()->InitRgbDrmRenderer((char *)“rendererDemo”,
drmWidth, drmHeight, 30, 0, 0, 0, 0, FORMAT_ABGR8888);

cv::Mat frame(1080, 1920, CV_8UC4, cv::Scalar(0,0,0,255));
cv::putText(frame, “Hello.”, {50,290}, cv::FONT_HERSHEY_DUPLEX, 3, cv::Scalar(255, 255, 255, 255), 3, 8, 0);
RgbDrmRenderer::GetInstance()->CpyToScrMem(frame.data, drmWidthdrmHeight4);
RgbDrmRenderer::GetInstance()->SetDrmPlane(0, 0, drmWidth, drmHeight);
sleep(10)
RgbDrmRenderer::GetInstance()->DeInitRgbDrmRenderer();
RgbDrmRenderer::GetInstance()->DestroyInstance();
return 0;
}

then build program as name ‘sampleDrm’, run it I can saw the GUI show ‘Hello’ for 10 seconds, and program is done, but the DRM GUI always shows, can’t quit, but when I execute ‘killall sampleDrm’ in terminal, then the DRM GUI was quit.

Hi,
We have checked an don’t know about RgbDrmRenderer. Looks like it is not open standard. We have demonstration of UI plane in 08_video_dec_drm. You may check how it works and try to apply your usecase based on the sample.