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:
parent
4807f7850d
commit
40fbfd8560
17 changed files with 876 additions and 300 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue