mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Log: Use object as context id for complex context
This commit is contained in:
parent
bff7ef085d
commit
6624b8acca
34 changed files with 276 additions and 238 deletions
|
|
@ -81,16 +81,16 @@ protected:
|
|||
SrsCoroutine* trd;
|
||||
ISrsMessagePumper* pumper;
|
||||
SrsRtmpServer* rtmp;
|
||||
std::string _parent_cid;
|
||||
SrsContextId _parent_cid;
|
||||
// The recv timeout in srs_utime_t.
|
||||
srs_utime_t timeout;
|
||||
public:
|
||||
// Constructor.
|
||||
// @param tm The receive timeout in srs_utime_t.
|
||||
SrsRecvThread(ISrsMessagePumper* p, SrsRtmpServer* r, srs_utime_t tm, std::string parent_cid);
|
||||
SrsRecvThread(ISrsMessagePumper* p, SrsRtmpServer* r, srs_utime_t tm, SrsContextId parent_cid);
|
||||
virtual ~SrsRecvThread();
|
||||
public:
|
||||
virtual std::string cid();
|
||||
virtual SrsContextId cid();
|
||||
public:
|
||||
virtual srs_error_t start();
|
||||
virtual void stop();
|
||||
|
|
@ -117,7 +117,7 @@ private:
|
|||
SrsConsumer* _consumer;
|
||||
public:
|
||||
// TODO: FIXME: Refine timeout in time unit.
|
||||
SrsQueueRecvThread(SrsConsumer* consumer, SrsRtmpServer* rtmp_sdk, srs_utime_t tm, std::string parent_cid);
|
||||
SrsQueueRecvThread(SrsConsumer* consumer, SrsRtmpServer* rtmp_sdk, srs_utime_t tm, SrsContextId parent_cid);
|
||||
virtual ~SrsQueueRecvThread();
|
||||
public:
|
||||
virtual srs_error_t start();
|
||||
|
|
@ -168,11 +168,11 @@ private:
|
|||
// @see https://github.com/ossrs/srs/issues/244
|
||||
srs_cond_t error;
|
||||
// The merged context id.
|
||||
std::string cid;
|
||||
std::string ncid;
|
||||
SrsContextId cid;
|
||||
SrsContextId ncid;
|
||||
public:
|
||||
SrsPublishRecvThread(SrsRtmpServer* rtmp_sdk, SrsRequest* _req,
|
||||
int mr_sock_fd, srs_utime_t tm, SrsRtmpConn* conn, SrsSource* source, std::string parent_cid);
|
||||
int mr_sock_fd, srs_utime_t tm, SrsRtmpConn* conn, SrsSource* source, SrsContextId parent_cid);
|
||||
virtual ~SrsPublishRecvThread();
|
||||
public:
|
||||
// Wait for error for some timeout.
|
||||
|
|
@ -181,7 +181,7 @@ public:
|
|||
virtual uint64_t nb_video_frames();
|
||||
virtual srs_error_t error_code();
|
||||
virtual void set_cid(std::string v);
|
||||
virtual std::string get_cid();
|
||||
virtual SrsContextId get_cid();
|
||||
public:
|
||||
virtual srs_error_t start();
|
||||
virtual void stop();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue