mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine the thread to three category.
This commit is contained in:
parent
2f0ef87d6d
commit
e5f449ce36
25 changed files with 648 additions and 416 deletions
|
@ -113,7 +113,7 @@ public:
|
|||
/**
|
||||
* the rtsp connection serve the fd.
|
||||
*/
|
||||
class SrsRtspConn : public ISrsThreadHandler
|
||||
class SrsRtspConn : public ISrsOneCycleThreadHandler
|
||||
{
|
||||
private:
|
||||
std::string output_template;
|
||||
|
@ -136,7 +136,7 @@ private:
|
|||
SrsStSocket* skt;
|
||||
SrsRtspStack* rtsp;
|
||||
SrsRtspCaster* caster;
|
||||
SrsThread* trd;
|
||||
SrsOneCycleThread* trd;
|
||||
private:
|
||||
SrsRequest* req;
|
||||
SrsStSocket* io;
|
||||
|
@ -163,7 +163,7 @@ private:
|
|||
// internal methods
|
||||
public:
|
||||
virtual int on_rtp_packet(SrsRtpPacket* pkt, int stream_id);
|
||||
// interface ISrsThreadHandler
|
||||
// interface ISrsOneCycleThreadHandler
|
||||
public:
|
||||
virtual int cycle();
|
||||
virtual void on_thread_stop();
|
||||
|
@ -182,8 +182,6 @@ private:
|
|||
// @remark ignore when not connected, reconnect when disconnected.
|
||||
virtual int connect();
|
||||
virtual int connect_app(std::string ep_server, std::string ep_port);
|
||||
// close the connected io and rtmp to ready to be re-connect.
|
||||
virtual void close();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue