deepstream官方示例中包含了如何在运行时动态添加流,但是这只针对于nvstreammux
,而nvstreamdemux
目前(5.1)是不支持动态添加的,非常蛋疼。
在论坛里面找到了曲线救国的方法:在pipeline启动前申请足够多的nvstreamdemux
的pad,调用的时候通过get_static_pad
来获取。
https://forums.developer.nvidia.com/t/how-to-add-source-and-sink-with-nvstreammux-and-nvstreamdemux-dynamically/111448/10