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

Squash: Merge SRS4

This commit is contained in:
winlin 2021-08-08 00:30:08 +08:00
parent 84d04adfff
commit 9bf5005bdd
6 changed files with 15 additions and 6 deletions

View file

@ -58,13 +58,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;
}
@ -96,14 +98,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;
}
}
}
}