mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine code
This commit is contained in:
parent
ee376da0c6
commit
92cbb1f072
1 changed files with 9 additions and 2 deletions
|
@ -75,13 +75,15 @@ void srs_build_features(stringstream& ss)
|
|||
SrsConfDirective* conf = root->at(i);
|
||||
|
||||
if (!rtsp && conf->is_stream_caster() && _srs_config->get_stream_caster_enabled(conf)) {
|
||||
if (_srs_config->get_stream_caster_engine(conf) == "rtsp") {
|
||||
string engine = _srs_config->get_stream_caster_engine(conf);
|
||||
if (engine == "rtsp") {
|
||||
rtsp = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (conf->is_vhost() && _srs_config->get_vhost_enabled(conf)) {
|
||||
nn_vhosts++;
|
||||
|
||||
if (!forward && _srs_config->get_forward_enabled(conf)) {
|
||||
forward = true;
|
||||
}
|
||||
|
@ -113,14 +115,19 @@ void srs_build_features(stringstream& ss)
|
|||
security = true;
|
||||
}
|
||||
|
||||
for (int j = 0; j < (int)conf->directives.size(); j++) {
|
||||
for (int j = 0; j < (int)conf->directives.size() && j < 64; j++) {
|
||||
SrsConfDirective* prop = conf->directives.at(j);
|
||||
|
||||
if (!ingest && prop->name == "ingest" && _srs_config->get_ingest_enabled(prop)) {
|
||||
ingest = true;
|
||||
}
|
||||
if (!transcode && prop->name == "transcode" && _srs_config->get_transcode_enabled(prop)) {
|
||||
transcode = true;
|
||||
}
|
||||
|
||||
if (ingest && transcode) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue