开发板:ROC-RK3568-PC 操作系统:官方Ubuntu20.04 ffmedia库版本:V2.1.2 ffmedia下载地址:https://gitlab.com/firefly-linux/ffmedia_release 应用程序:基于ffmedia代码/demo/demo_multi_window.cpp 修改实现两个window显示 关键代码: rtsp_c = make_shared<ModuleRtspClient>("rtsp://192.168.110.140:5544/live/0"); ret = rtsp_c->init(); if (ret < 0) { ff_error("rtsp client init failed\n"); return ret; } // 2. dec module input_para = rtsp_c->getOutputImagePara(); dec = make_shared<ModuleMppDec>(input_para); dec->setProductor(rtsp_c); ret = dec->init(); if (ret < 0) { ff_error("Dec init failed\n"); return ret; } // 3. drm display module input_para = dec->getOutputImagePara(); shared_ptr<DrmDisplayPlane> plane = make_shared<DrmDisplayPlane>(V4L2_PIX_FMT_NV12, 0); //plane->setRect(100, 100, 1600, 800); plane->setRect(0, 0, 1920, 1080); // plane->setWindowLayoutMode(DrmDisplayPlane::RELATIVE_LAYOUT); plane->setWindowLayoutMode(DrmDisplayPlane::ABSOLUTE_LAYOUT); //plane->splitPlane(3, 3); // for (int i = 0; i < 16; i++) { for (int i = 0; i < 2; i++) { windows[i] = make_shared<ModuleDrmDisplay>(input_para, plane); windows[i]->setProductor(dec); windows[i]->init(); } windows[0]->setWindowRect(0, 0, 1920, 1080); windows[0]->setWindowVisibility(true); windows[1]->setWindowRect(100, 100, 960, 540); windows[1]->setWindowVisibility(true); 运行效果: 问题描述: 运行后叠加的画面会出现闪烁,麻烦大佬帮忙分析下原因,非常感谢! |
-
643 Bytes, 下载次数: 0, 下载积分: 灯泡 -1 , 经验 -1