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

Merge branch 'dev-28181' of https://github.com/xialixin/srs into xialixin-dev-28181

This commit is contained in:
winlin 2020-03-31 20:08:24 +08:00
commit 33455867f9
15 changed files with 2524 additions and 980 deletions

View file

@ -36,6 +36,8 @@
#include <srs_app_listener.hpp>
#include <srs_app_conn.hpp>
#include <srs_service_st.hpp>
#include <srs_app_gb28181.hpp>
#include <srs_app_gb28181_sip.hpp>
class SrsServer;
class SrsConnection;
@ -52,6 +54,8 @@ class SrsTcpListener;
class SrsAppCasterFlv;
class SrsRtspCaster;
class SrsCoroutineManager;
class SrsGb28181Caster;
// The listener type for server to identify the connection,
// that is, use different type to process the connection.
@ -69,8 +73,10 @@ enum SrsListenerType
SrsListenerRtsp = 4,
// TCP stream, FLV stream over HTTP.
SrsListenerFlv = 5,
// UDP stream, gb28181 stream
SrsListenerGb28181 = 6,
// UDP stream, gb28181 ps stream over rtp,
SrsListenerGb28181RtpMux = 6,
// UDP gb28181 sip server
SrsListenerGb28181Sip = 7,
};
// A common tcp listener, for RTMP/HTTP server.
@ -158,7 +164,7 @@ public:
virtual ~SrsUdpCasterListener();
};
// A UDP sip listener, for sip server.
// A UDP gb28181 listener, for sip and rtp stream mux server.
class SrsGb28181Listener : public SrsUdpStreamListener
{
public:
@ -313,6 +319,7 @@ private:
virtual srs_error_t listen_http_api();
virtual srs_error_t listen_http_stream();
virtual srs_error_t listen_stream_caster();
virtual srs_error_t listen_gb28281_sip(SrsConfDirective* c);
// Close the listeners for specified type,
// Remove the listen object from manager.
virtual void close_listeners(SrsListenerType type);