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

Refine get_queue_length and set_queue_size in time unit

This commit is contained in:
winlin 2019-04-16 07:55:19 +08:00
parent e3983b3513
commit c1b64ba24f
13 changed files with 43 additions and 32 deletions

View file

@ -4459,9 +4459,9 @@ bool SrsConfig::get_mix_correct(string vhost)
return SRS_CONF_PERFER_FALSE(conf->arg0());
}
double SrsConfig::get_queue_length(string vhost)
srs_utime_t SrsConfig::get_queue_length(string vhost)
{
static double DEFAULT = SRS_PERF_PLAY_QUEUE;
static srs_utime_t DEFAULT = SRS_PERF_PLAY_QUEUE;
SrsConfDirective* conf = get_vhost(vhost);
if (!conf) {
@ -4478,7 +4478,7 @@ double SrsConfig::get_queue_length(string vhost)
return DEFAULT;
}
return ::atoi(conf->arg0().c_str());
return srs_utime_t(::atoi(conf->arg0().c_str()) * SRS_UTIME_SECONDS);
}
bool SrsConfig::get_refer_enabled(string vhost)