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

rtc framework

This commit is contained in:
xiaozhihong 2020-02-28 23:18:39 +08:00
parent 51abb0844e
commit 62563bdd81
14 changed files with 448 additions and 372 deletions

View file

@ -41,6 +41,7 @@ class SrsServer;
class SrsConnection;
class SrsHttpServeMux;
class SrsHttpServer;
class SrsRtcServer;
class SrsIngester;
class SrsHttpHeartbeat;
class SrsKbps;
@ -68,8 +69,8 @@ enum SrsListenerType
SrsListenerRtsp = 4,
// TCP stream, FLV stream over HTTP.
SrsListenerFlv = 5,
// UDP sream, rtp over udp
SrsListenerRtcOverUdp = 6,
// UDP remux, rtp over udp
SrsListenerRtc = 6,
};
// A common tcp listener, for RTMP/HTTP server.
@ -157,19 +158,15 @@ public:
virtual ~SrsUdpCasterListener();
};
class SrsRtcOverUdp;
// A UDP listener, for udp stream caster server.
// A UDP listener, for udp remux rtc server
class SrsRtcListener : public SrsListener
{
protected:
SrsUdpListener* listener;
ISrsUdpHandler* rtc;
public:
SrsRtcListener(SrsServer* svr, SrsListenerType t);
SrsRtcListener(SrsServer* svr, SrsRtcServer* rtc_svr, SrsListenerType t);
virtual ~SrsRtcListener();
SrsRtcOverUdp* get_rtc();
public:
virtual srs_error_t listen(std::string i, int p);
};
@ -225,6 +222,7 @@ private:
// TODO: FIXME: rename to http_api
SrsHttpServeMux* http_api_mux;
SrsHttpServer* http_server;
SrsRtcServer* rtc_server;
SrsHttpHeartbeat* http_heartbeat;
SrsIngester* ingester;
SrsCoroutineManager* conn_manager;