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

add hds reload supported.#328

This commit is contained in:
wenjie.zhao 2015-03-12 22:38:11 +08:00
parent abe0713980
commit 643f18abe4
9 changed files with 75 additions and 3 deletions

View file

@ -1013,6 +1013,26 @@ int SrsSource::on_reload_vhost_hls(string vhost)
return ret;
}
int SrsSource::on_reload_vhost_hds(string vhost)
{
int ret = ERROR_SUCCESS;
if (_req->vhost != vhost) {
return ret;
}
#ifdef SRS_AUTO_HDS
hds->on_unpublish();
if ((ret = hds->on_publish(_req)) != ERROR_SUCCESS) {
srs_error("hds publish failed. ret=%d", ret);
return ret;
}
srs_trace("vhost %s hds reload success", vhost.c_str());
#endif
return ret;
}
int SrsSource::on_reload_vhost_dvr(string vhost)
{
int ret = ERROR_SUCCESS;