GB28181单端口接收流支持多线程

This commit is contained in:
ziyue
2021-06-08 14:03:25 +08:00
parent 92736db5b2
commit c4817c6d5f
5 changed files with 85 additions and 51 deletions

View File

@@ -15,6 +15,7 @@
#include <memory>
#include "Network/Socket.h"
#include "Network/TcpServer.h"
#include "Network/UdpServer.h"
#include "RtpSession.h"
using namespace std;
@@ -47,18 +48,14 @@ public:
*/
uint16_t getPort();
/**
* 获取绑定的线程
*/
EventPoller::Ptr getPoller();
/**
* 设置RtpProcess onDetach事件回调
*/
void setOnDetach(const function<void()> &cb);
protected:
Socket::Ptr _udp_server;
Socket::Ptr _rtp_socket;
UdpServer::Ptr _udp_server;
TcpServer::Ptr _tcp_server;
RtpProcess::Ptr _rtp_process;
function<void()> _on_clearup;