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
|
@ -113,4 +113,29 @@
|
|||
class SrsCplxError;
|
||||
typedef SrsCplxError* srs_error_t;
|
||||
|
||||
// The context ID, it default to a string object, we can also use other objects.
|
||||
#include <string>
|
||||
struct _SrsContextId
|
||||
{
|
||||
std::string v_;
|
||||
_SrsContextId() {
|
||||
}
|
||||
_SrsContextId(std::string v) {
|
||||
v_ = v;
|
||||
}
|
||||
_SrsContextId(const _SrsContextId& cp) {
|
||||
v_ = cp.v_;
|
||||
}
|
||||
const char* c_str() {
|
||||
return v_.c_str();
|
||||
}
|
||||
bool empty() {
|
||||
return v_.empty();
|
||||
}
|
||||
bool equals(const _SrsContextId& to) {
|
||||
return v_ == to.v_;
|
||||
}
|
||||
};
|
||||
typedef _SrsContextId SrsContextId;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue