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

for #319, raw api support update the global RTMP chunk_size.

This commit is contained in:
winlin 2015-09-01 21:27:04 +08:00
parent 2cfb71616e
commit c8466c36bd
5 changed files with 68 additions and 9 deletions

View file

@ -2270,6 +2270,29 @@ int SrsConfig::raw_set_pid(string pid, bool& applied)
return ret;
}
int SrsConfig::raw_set_chunk_size(string chunk_size, bool& applied)
{
int ret = ERROR_SUCCESS;
applied = false;
SrsConfDirective* conf = root->get_or_create("chunk_size");
if (conf->arg0() == chunk_size) {
return ret;
}
conf->args.clear();
conf->args.push_back(chunk_size);
// directly supported reload for chunk_size change.
applied = true;
return ret;
}
int SrsConfig::do_reload_listen()
{
int ret = ERROR_SUCCESS;