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

for #133, rtsp extract tcp/udp listener.

This commit is contained in:
winlin 2015-02-17 16:28:28 +08:00
parent 4807f7850d
commit 40fbfd8560
17 changed files with 876 additions and 300 deletions

View file

@ -1395,7 +1395,7 @@ int SrsConfig::check_config()
SrsConfDirective* conf = stream_caster->at(i);
string n = conf->name;
if (n != "enabled" && n != "caster" && n != "output"
&& n != "listen"
&& n != "listen" && n != "rtp_port_min" && n != "rtp_port_max"
) {
ret = ERROR_SYSTEM_CONFIG_INVALID;
srs_error("unsupported stream_caster directive %s, ret=%d", n.c_str(), ret);
@ -2065,6 +2065,30 @@ int SrsConfig::get_stream_caster_listen(SrsConfDirective* sc)
return ::atoi(conf->arg0().c_str());
}
int SrsConfig::get_stream_caster_rtp_port_min(SrsConfDirective* sc)
{
srs_assert(sc);
SrsConfDirective* conf = sc->get("rtp_port_min");
if (!conf) {
return 0;
}
return ::atoi(conf->arg0().c_str());
}
int SrsConfig::get_stream_caster_rtp_port_max(SrsConfDirective* sc)
{
srs_assert(sc);
SrsConfDirective* conf = sc->get("rtp_port_max");
if (!conf) {
return 0;
}
return ::atoi(conf->arg0().c_str());
}
SrsConfDirective* SrsConfig::get_vhost(string vhost)
{
srs_assert(root);