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

ST: Support set context id while thread running. v5.0.72

This commit is contained in:
winlin 2022-10-02 10:05:01 +08:00
parent 9525511032
commit dc20d5ddbc
12 changed files with 96 additions and 15 deletions

View file

@ -28,10 +28,13 @@ public:
virtual SrsContextId generate_id();
virtual const SrsContextId& get_id();
virtual const SrsContextId& set_id(const SrsContextId& v);
public:
private:
virtual void clear_cid();
};
// Set the context id of specified thread, not self.
extern const SrsContextId& srs_context_set_cid_of(srs_thread_t trd, const SrsContextId& v);
// The context restore stores the context and restore it when done.
// Usage:
// SrsContextRestore(_srs_context->get_id());