openRtpServer接口新增re_use_port参数

This commit is contained in:
xiongziliang
2022-04-09 10:26:15 +08:00
parent 6073175e75
commit a6e82799f5
6 changed files with 18 additions and 16 deletions

View File

@@ -1056,7 +1056,7 @@ void installWebApi() {
}
RtpServer::Ptr server = std::make_shared<RtpServer>();
server->start(allArgs["port"], stream_id, allArgs["enable_tcp"].as<bool>(), "0.0.0.0", false);
server->start(allArgs["port"], stream_id, allArgs["enable_tcp"].as<bool>(), "0.0.0.0", allArgs["re_use_port"].as<bool>());
server->setOnDetach([stream_id]() {
//设置rtp超时移除事件
lock_guard<recursive_mutex> lck(s_rtpServerMapMtx);