http api新建的rtp服务器可以自动超时移除

This commit is contained in:
xiongziliang
2020-07-08 10:25:30 +08:00
parent e58a63c528
commit b2ff53037b
6 changed files with 47 additions and 2 deletions

View File

@@ -69,6 +69,13 @@ void RtpServer::start(uint16_t local_port, const string &stream_id, bool enable
_tcp_server = tcp_server;
_udp_server = udp_server;
_rtp_process = process;
}
void RtpServer::setOnDetach(const function<void()> &cb){
if(_rtp_process){
_rtp_process->setOnDetach(cb);
}
}
EventPoller::Ptr RtpServer::getPoller() {