1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

add srt mpegts to rtmp

This commit is contained in:
runner365 2020-01-21 19:20:09 +08:00
parent 7b9e3ecdc4
commit 5c5fd805c5
17 changed files with 682 additions and 172 deletions

View file

@ -118,7 +118,11 @@ void srt_server::srt_handle_connection(SRT_SOCKSTATUS status, SRTSOCKET input_fd
}
//add new srt connect into srt handle
std::string streamid = UDT::getstreamid(conn_fd);
if (!is_streamid_valid(streamid)) {
srs_trace("srt streamid(%s) error, fd:%d", streamid.c_str(), conn_fd);
srt_close(conn_fd);
return;
}
SRT_CONN_PTR srt_conn_ptr = std::make_shared<srt_conn>(conn_fd, streamid);
std::string vhost_str = srt_conn_ptr->get_vhost();
@ -179,7 +183,6 @@ void srt_server::on_work()
int ret = srt_epoll_wait(_pollid, read_fds, &rfd_num, write_fds, &wfd_num, -1,
nullptr, nullptr, nullptr, nullptr);
if (ret < 0) {
srs_error("listen srt epoll is timeout, port=%d", listen_port);
continue;
}
srs_trace("srt server epoll get: ret=%d, rfd_num=%d, wfd_num=%d",