mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge branch '3.0release' into 4.0release
This commit is contained in:
commit
6c7ffdeedf
1 changed files with 5 additions and 2 deletions
|
@ -40,9 +40,12 @@ string srs_generate_id()
|
||||||
static int64_t srs_gvid = 0;
|
static int64_t srs_gvid = 0;
|
||||||
|
|
||||||
if (srs_gvid == 0) {
|
if (srs_gvid == 0) {
|
||||||
srs_gvid = getpid() * 3;
|
srs_gvid = getpid();
|
||||||
}
|
}
|
||||||
return "vid-" + srs_int2str(srs_gvid++);
|
|
||||||
|
string prefix = "vid";
|
||||||
|
string rand_id = srs_int2str(srs_get_system_time() % 1000);
|
||||||
|
return prefix + "-" + srs_int2str(srs_gvid++) + "-" + rand_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
SrsStatisticVhost::SrsStatisticVhost()
|
SrsStatisticVhost::SrsStatisticVhost()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue