c++ - D3D11 Best way to decode multiple video in real-time
问题描述
I develop an application in C++/Qt which decode multiple camera IP videos in real-time. Each video stream is displayed at same time in different QWidget.
For performance purpose, I use D3D11 API to perform the decoding, post-processing (color domain conversion and scaling) and rendering.
I'm not sure what is the best architecture to do this. For this moment, I create only one ID3D11Device, ID3D11DeviceContext, ID3D11VideoDevice, ID3D11VideoContext and IDXGIFactory. For each IP camera stream, I launch a thread to handle the video processing. I set a ID3D11Multithread layer to ensure the thread safety and I create a specific swapchain link to each QWidget thank their winId(). With this architecture I need to protect the rendering steps because I have some issues with the viewport.
This architecture works fine but I don't if it's more efficient solution. Maybe it's preferable to create multiple ID3D11Device/Context etc for each thread to avoid thread safety issue? So, in your opinion, which is the best way to decoding multiple video in real time?
解决方案
推荐阅读
- javascript - 投票按钮无法禁用
- r - 汇总表中的内联图
- yocto - Yocto - 创建 /home 或 /opt 的 tar.bz2
- c - 已检测到 macOS Monterey v12.0.1(具有系统完整性保护)中 GNU gdb (GDB) 11.1 的内部问题,是否有修复?
- python - 将句子中的单词及其在字典中的索引转换为一个热向量 pytorch
- php - 处理一个问题的多个动态答案数
- c# - C# | 如何根据某些条件访问资源文件?
- oracle - 如何解密oracle加密的密码?
- vue.js - 在 Vue 中,将模态集合作为组件导入对内存/性能有好处
- c# - 如何在 EF Core 中按条件获取最新条目?