|
|
@ -100,7 +100,7 @@ public:
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// The rtsp connection serve the fd.
|
|
|
|
// The rtsp connection serve the fd.
|
|
|
|
class SrsRtspConn : public ISrsCoroutineHandler
|
|
|
|
class SrsRtspConn : public ISrsCoroutineHandler, public ISrsConnection
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
std::string output_template;
|
|
|
|
std::string output_template;
|
|
|
@ -143,6 +143,7 @@ public:
|
|
|
|
virtual ~SrsRtspConn();
|
|
|
|
virtual ~SrsRtspConn();
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
virtual srs_error_t serve();
|
|
|
|
virtual srs_error_t serve();
|
|
|
|
|
|
|
|
virtual std::string remote_ip();
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
virtual srs_error_t do_cycle();
|
|
|
|
virtual srs_error_t do_cycle();
|
|
|
|
// internal methods
|
|
|
|
// internal methods
|
|
|
@ -179,6 +180,7 @@ private:
|
|
|
|
std::map<int, bool> used_ports;
|
|
|
|
std::map<int, bool> used_ports;
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
std::vector<SrsRtspConn*> clients;
|
|
|
|
std::vector<SrsRtspConn*> clients;
|
|
|
|
|
|
|
|
SrsCoroutineManager* manager;
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
SrsRtspCaster(SrsConfDirective* c);
|
|
|
|
SrsRtspCaster(SrsConfDirective* c);
|
|
|
|
virtual ~SrsRtspCaster();
|
|
|
|
virtual ~SrsRtspCaster();
|
|
|
@ -188,6 +190,7 @@ public:
|
|
|
|
virtual srs_error_t alloc_port(int* pport);
|
|
|
|
virtual srs_error_t alloc_port(int* pport);
|
|
|
|
// Free the alloced rtp port.
|
|
|
|
// Free the alloced rtp port.
|
|
|
|
virtual void free_port(int lpmin, int lpmax);
|
|
|
|
virtual void free_port(int lpmin, int lpmax);
|
|
|
|
|
|
|
|
virtual srs_error_t initialize();
|
|
|
|
// Interface ISrsTcpHandler
|
|
|
|
// Interface ISrsTcpHandler
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
virtual srs_error_t on_tcp_client(srs_netfd_t stfd);
|
|
|
|
virtual srs_error_t on_tcp_client(srs_netfd_t stfd);
|
|
|
|