mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
+server support band check +every vhost can have it's own chunk size
This commit is contained in:
parent
8887754b17
commit
6e9f375606
16 changed files with 668 additions and 108 deletions
10
trunk/src/core/srs_core.cpp
Normal file → Executable file
10
trunk/src/core/srs_core.cpp
Normal file → Executable file
|
|
@ -33,7 +33,7 @@ static int64_t _srs_system_time_us_cache = 0;
|
|||
|
||||
int64_t srs_get_system_time_ms()
|
||||
{
|
||||
return _srs_system_time_us_cache / 1000;
|
||||
return _srs_system_time_us_cache / 1000;
|
||||
}
|
||||
|
||||
void srs_update_system_time_ms()
|
||||
|
|
@ -43,7 +43,7 @@ void srs_update_system_time_ms()
|
|||
gettimeofday(&now, NULL);
|
||||
|
||||
// we must convert the tv_sec/tv_usec to int64_t.
|
||||
_srs_system_time_us_cache = now.tv_sec * 1000 * 1000 + now.tv_usec;
|
||||
_srs_system_time_us_cache = ((int64_t)now.tv_sec) * 1000 * 1000 + (int64_t)now.tv_usec;
|
||||
|
||||
_srs_system_time_us_cache = srs_max(0, _srs_system_time_us_cache);
|
||||
}
|
||||
|
|
@ -103,11 +103,11 @@ void srs_vhost_resolve(std::string& vhost, std::string& app)
|
|||
if ((pos = query.find("vhost?")) != std::string::npos
|
||||
|| (pos = query.find("vhost=")) != std::string::npos
|
||||
|| (pos = query.find("Vhost?")) != std::string::npos
|
||||
|| (pos = query.find("Vhost=")) != std::string::npos
|
||||
) {
|
||||
|| (pos = query.find("Vhost=")) != std::string::npos)
|
||||
{
|
||||
query = query.substr(pos + 6);
|
||||
if (!query.empty()) {
|
||||
vhost = query;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue