mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Refine for writing doc. 4.0.92
This commit is contained in:
parent
f4f616d4e9
commit
659e173e15
7 changed files with 67 additions and 84 deletions
|
@ -3789,8 +3789,7 @@ srs_error_t SrsConfig::check_normal_config()
|
|||
&& n != "play" && n != "publish" && n != "cluster"
|
||||
&& n != "security" && n != "http_remux" && n != "dash"
|
||||
&& n != "http_static" && n != "hds" && n != "exec"
|
||||
&& n != "in_ack_size" && n != "out_ack_size" && n != "rtc" && n != "nack"
|
||||
&& n != "twcc") {
|
||||
&& n != "in_ack_size" && n != "out_ack_size" && n != "rtc") {
|
||||
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "illegal vhost.%s", n.c_str());
|
||||
}
|
||||
// for each sub directives of vhost.
|
||||
|
@ -5104,7 +5103,7 @@ bool SrsConfig::get_rtc_enabled(string vhost)
|
|||
|
||||
bool SrsConfig::get_rtc_bframe_discard(string vhost)
|
||||
{
|
||||
static bool DEFAULT = false;
|
||||
static bool DEFAULT = true;
|
||||
|
||||
SrsConfDirective* conf = get_rtc(vhost);
|
||||
|
||||
|
@ -5117,7 +5116,7 @@ bool SrsConfig::get_rtc_bframe_discard(string vhost)
|
|||
return DEFAULT;
|
||||
}
|
||||
|
||||
return conf->arg0() == "discard";
|
||||
return conf->arg0() != "keep";
|
||||
}
|
||||
|
||||
bool SrsConfig::get_rtc_aac_discard(string vhost)
|
||||
|
@ -5214,7 +5213,7 @@ int SrsConfig::get_rtc_drop_for_pt(string vhost)
|
|||
{
|
||||
static int DEFAULT = 0;
|
||||
|
||||
SrsConfDirective* conf = get_vhost(vhost);
|
||||
SrsConfDirective* conf = get_rtc(vhost);
|
||||
if (!conf) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
@ -5231,7 +5230,7 @@ bool SrsConfig::get_rtc_nack_enabled(string vhost)
|
|||
{
|
||||
static bool DEFAULT = true;
|
||||
|
||||
SrsConfDirective* conf = get_vhost(vhost);
|
||||
SrsConfDirective* conf = get_rtc(vhost);
|
||||
if (!conf) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
@ -5241,11 +5240,6 @@ bool SrsConfig::get_rtc_nack_enabled(string vhost)
|
|||
return DEFAULT;
|
||||
}
|
||||
|
||||
conf = conf->get("enabled");
|
||||
if (!conf || conf->arg0().empty()) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
return SRS_CONF_PERFER_TRUE(conf->arg0());
|
||||
}
|
||||
|
||||
|
@ -5253,17 +5247,12 @@ bool SrsConfig::get_rtc_nack_no_copy(string vhost)
|
|||
{
|
||||
static bool DEFAULT = true;
|
||||
|
||||
SrsConfDirective* conf = get_vhost(vhost);
|
||||
SrsConfDirective* conf = get_rtc(vhost);
|
||||
if (!conf) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
conf = conf->get("nack");
|
||||
if (!conf) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
conf = conf->get("no_copy");
|
||||
conf = conf->get("nack_no_copy");
|
||||
if (!conf || conf->arg0().empty()) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
@ -5275,7 +5264,7 @@ bool SrsConfig::get_rtc_twcc_enabled(string vhost)
|
|||
{
|
||||
static bool DEFAULT = true;
|
||||
|
||||
SrsConfDirective* conf = get_vhost(vhost);
|
||||
SrsConfDirective* conf = get_rtc(vhost);
|
||||
if (!conf) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
@ -5285,11 +5274,6 @@ bool SrsConfig::get_rtc_twcc_enabled(string vhost)
|
|||
return DEFAULT;
|
||||
}
|
||||
|
||||
conf = conf->get("enabled");
|
||||
if (!conf || conf->arg0().empty()) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
return SRS_CONF_PERFER_TRUE(conf->arg0());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue