mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
merge from srs2. for #513.
This commit is contained in:
parent
f30b3073a2
commit
664844b5f5
16 changed files with 25 additions and 553 deletions
|
@ -1514,67 +1514,3 @@ void SrsServer::on_unpublish(SrsSource* s, SrsRequest* r)
|
|||
#endif
|
||||
}
|
||||
|
||||
int SrsServer::on_hls_publish(SrsRequest* r)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
#ifdef SRS_AUTO_HTTP_SERVER
|
||||
if ((ret = http_server->mount_hls(r)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SrsServer::on_update_m3u8(SrsRequest* r, string m3u8)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
#ifdef SRS_AUTO_HTTP_SERVER
|
||||
if ((ret = http_server->hls_update_m3u8(r, m3u8)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SrsServer::on_update_ts(SrsRequest* r, string uri, string ts)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
#ifdef SRS_AUTO_HTTP_SERVER
|
||||
if ((ret = http_server->hls_update_ts(r, uri, ts)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int SrsServer::on_remove_ts(SrsRequest* r, string uri)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
#ifdef SRS_AUTO_HTTP_SERVER
|
||||
if ((ret = http_server->hls_remove_ts(r, uri)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SrsServer::on_hls_unpublish(SrsRequest* r)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
#ifdef SRS_AUTO_HTTP_SERVER
|
||||
http_server->unmount_hls(r);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue