mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Refine resouce management
This commit is contained in:
parent
1173d35e33
commit
64705d1cc8
29 changed files with 364 additions and 177 deletions
|
@ -40,7 +40,7 @@ class SrsRtcConnection;
|
|||
class SrsRequest;
|
||||
class SrsSdp;
|
||||
class SrsRtcStream;
|
||||
class SrsConnectionManager;
|
||||
class SrsResourceManager;
|
||||
|
||||
// The UDP black hole, for developer to use wireshark to catch plaintext packets.
|
||||
// For example, server receive UDP packets at udp://8000, and forward the plaintext packet to black hole,
|
||||
|
@ -92,7 +92,6 @@ private:
|
|||
std::vector<SrsUdpMuxListener*> listeners;
|
||||
ISrsRtcServerHandler* handler;
|
||||
ISrsRtcServerHijacker* hijacker;
|
||||
SrsConnectionManager* manager;
|
||||
public:
|
||||
SrsRtcServer();
|
||||
virtual ~SrsRtcServer();
|
||||
|
@ -123,10 +122,6 @@ public:
|
|||
// We start offering, create_session2 to generate offer, setup_session2 to handle answer.
|
||||
srs_error_t create_session2(SrsRequest* req, SrsSdp& local_sdp, const std::string& mock_eip, bool unified_plan, SrsRtcConnection** psession);
|
||||
srs_error_t setup_session2(SrsRtcConnection* session, SrsRequest* req, const SrsSdp& remote_sdp);
|
||||
// Destroy the session and notify the callback.
|
||||
void dispose(SrsRtcConnection* session);
|
||||
// Destroy the session from server, without notify callback.
|
||||
void destroy(SrsRtcConnection* session);
|
||||
public:
|
||||
void insert_into_id_sessions(const std::string& peer_id, SrsRtcConnection* session);
|
||||
public:
|
||||
|
@ -150,5 +145,8 @@ public:
|
|||
virtual void stop();
|
||||
};
|
||||
|
||||
// Manager for RTC connections.
|
||||
extern SrsResourceManager* _srs_rtc_manager;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue