for #319, api raw update global.listen

pull/556/head
winlin 10 years ago
parent 364460f2ab
commit a62c82bd46

@ -44,87 +44,69 @@ stream_caster {
rtp_port_min 57200;
rtp_port_max 57300;
}
vhost __defaultVhost__ {
}
vhost __defaultVhost__;
vhost vhost.srs.com {
enabled off;
chunk_size 128;
tcp_nodelay on;
min_latency on;
cluster {
mode remote;
origin 127.0.0.1:1935 localhost:1935;
token_traverse off;
vhost same.edge.srs.com;
debug_srs_upnode off;
}
forward {
enabled off;
destination 127.0.0.1:1936 127.0.0.1:1937;
}
play {
time_jitter full;
mix_correct off;
atc off;
atc_auto off;
mw_latency 100;
gop_cache off;
queue_length 10;
send_min_interval 10.0;
reduce_sequence_header on;
}
publish {
mr off;
mr_latency 350;
firstpkt_timeout 20000;
normal_timeout 7000;
}
refer {
enabled off;
all github.com github.io;
publish github.com github.io;
play github.com github.io;
}
bandcheck {
enabled off;
key 35c9b402c12a7246868752e2878f7e0e;
interval 30;
limit_kbps 4000;
}
security {
enabled off;
allow play all;
allow publish all;
deny publish all;
}
http_static {
enabled off;
mount [vhost]/hls;
dir ./objs/nginx/html/hls;
}
http_remux {
enabled off;
fast_cache 30;
mount [vhost]/[app]/[stream].flv;
hstrs on;
}
http_hooks {
enabled off;
on_connect http://127.0.0.1:8085/api/v1/clients http://localhost:8085/api/v1/clients;
@ -137,12 +119,10 @@ vhost vhost.srs.com {
on_hls http://127.0.0.1:8085/api/v1/hls http://localhost:8085/api/v1/hls;
on_hls_notify http://127.0.0.1:8085/api/v1/hls/[app]/[stream][ts_url];
}
exec {
enabled off;
publish ./objs/ffmpeg/bin/ffmpeg -f flv -i [url] -c copy -y ./[stream].flv;
}
hls {
enabled off;
hls_fragment 10;
@ -164,14 +144,12 @@ vhost vhost.srs.com {
hls_nb_notify 64;
hls_wait_keyframe on;
}
hds {
enabled off;
hds_fragment 10;
hds_window 60;
hds_path ./objs/nginx/html;
}
dvr {
enabled off;
dvr_plan session;
@ -180,7 +158,6 @@ vhost vhost.srs.com {
dvr_wait_keyframe on;
time_jitter full;
}
ingest livestream {
enabled off;
input {
@ -221,7 +198,6 @@ vhost vhost.srs.com {
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream];
}
}
transcode live {
enabled off;
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
@ -258,7 +234,6 @@ vhost vhost.srs.com {
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
}
}
transcode {
enabled off;
ffmpeg ./objs/ffmpeg/bin/ffmpeg;

@ -2182,6 +2182,17 @@ int SrsConfig::raw_set_listen(const vector<string>& eps)
SrsConfDirective* listen = root->get("listen");
listen->args = eps;
// force to reload the memory server.
vector<ISrsReloadHandler*>::iterator it;
for (it = subscribes.begin(); it != subscribes.end(); ++it) {
ISrsReloadHandler* subscribe = *it;
if ((ret = subscribe->on_reload_listen()) != ERROR_SUCCESS) {
srs_error("notify subscribes reload listen failed. ret=%d", ret);
return ret;
}
}
srs_trace("reload listen success.");
return ret;
}

@ -1016,7 +1016,6 @@ int SrsGoApiRaw::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
}
}
server->on_signal(SRS_SIGNAL_RELOAD);
server->on_signal(SRS_SIGNAL_PERSISTENCE_CONFIG);
srs_trace("raw api update %s=%s ok.", scope.c_str(), value.c_str());

Loading…
Cancel
Save