mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
rtc: support publish twcc using twcc config
This commit is contained in:
parent
d5e91694d5
commit
9840ad8d55
3 changed files with 43 additions and 0 deletions
|
@ -5128,6 +5128,23 @@ bool SrsConfig::get_rtc_nack_enabled(string vhost)
|
|||
return SRS_CONF_PERFER_TRUE(conf->arg0());
|
||||
}
|
||||
|
||||
bool SrsConfig::get_rtc_twcc_enabled(string vhost)
|
||||
{
|
||||
static bool DEFAULT = true;
|
||||
SrsConfDirective* conf = get_vhost(vhost);
|
||||
if (!conf) {
|
||||
return DEFAULT;
|
||||
}
|
||||
conf = conf->get("twcc");
|
||||
if (!conf) {
|
||||
return DEFAULT;
|
||||
}
|
||||
conf = conf->get("enabled");
|
||||
if (!conf || conf->arg0().empty()) {
|
||||
return DEFAULT;
|
||||
}
|
||||
return SRS_CONF_PERFER_TRUE(conf->arg0());
|
||||
}
|
||||
SrsConfDirective* SrsConfig::get_vhost(string vhost, bool try_default_vhost)
|
||||
{
|
||||
srs_assert(root);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue