|
|
|
@ -141,6 +141,7 @@ srs_error_t SrsHttpHooks::on_publish(string url, SrsRequest* req)
|
|
|
|
|
obj->set("app", SrsJsonAny::str(req->app.c_str()));
|
|
|
|
|
obj->set("tcUrl", SrsJsonAny::str(req->tcUrl.c_str()));
|
|
|
|
|
obj->set("stream", SrsJsonAny::str(req->stream.c_str()));
|
|
|
|
|
obj->set("param", SrsJsonAny::str(req->param.c_str()));
|
|
|
|
|
|
|
|
|
|
std::string data = obj->dumps();
|
|
|
|
|
std::string res;
|
|
|
|
@ -173,6 +174,7 @@ void SrsHttpHooks::on_unpublish(string url, SrsRequest* req)
|
|
|
|
|
obj->set("vhost", SrsJsonAny::str(req->vhost.c_str()));
|
|
|
|
|
obj->set("app", SrsJsonAny::str(req->app.c_str()));
|
|
|
|
|
obj->set("stream", SrsJsonAny::str(req->stream.c_str()));
|
|
|
|
|
obj->set("param", SrsJsonAny::str(req->param.c_str()));
|
|
|
|
|
|
|
|
|
|
std::string data = obj->dumps();
|
|
|
|
|
std::string res;
|
|
|
|
@ -208,6 +210,7 @@ srs_error_t SrsHttpHooks::on_play(string url, SrsRequest* req)
|
|
|
|
|
obj->set("vhost", SrsJsonAny::str(req->vhost.c_str()));
|
|
|
|
|
obj->set("app", SrsJsonAny::str(req->app.c_str()));
|
|
|
|
|
obj->set("stream", SrsJsonAny::str(req->stream.c_str()));
|
|
|
|
|
obj->set("param", SrsJsonAny::str(req->param.c_str()));
|
|
|
|
|
obj->set("pageUrl", SrsJsonAny::str(req->pageUrl.c_str()));
|
|
|
|
|
|
|
|
|
|
std::string data = obj->dumps();
|
|
|
|
@ -241,6 +244,7 @@ void SrsHttpHooks::on_stop(string url, SrsRequest* req)
|
|
|
|
|
obj->set("vhost", SrsJsonAny::str(req->vhost.c_str()));
|
|
|
|
|
obj->set("app", SrsJsonAny::str(req->app.c_str()));
|
|
|
|
|
obj->set("stream", SrsJsonAny::str(req->stream.c_str()));
|
|
|
|
|
obj->set("param", SrsJsonAny::str(req->param.c_str()));
|
|
|
|
|
|
|
|
|
|
std::string data = obj->dumps();
|
|
|
|
|
std::string res;
|
|
|
|
@ -277,6 +281,7 @@ srs_error_t SrsHttpHooks::on_dvr(int cid, string url, SrsRequest* req, string fi
|
|
|
|
|
obj->set("vhost", SrsJsonAny::str(req->vhost.c_str()));
|
|
|
|
|
obj->set("app", SrsJsonAny::str(req->app.c_str()));
|
|
|
|
|
obj->set("stream", SrsJsonAny::str(req->stream.c_str()));
|
|
|
|
|
obj->set("param", SrsJsonAny::str(req->param.c_str()));
|
|
|
|
|
obj->set("cwd", SrsJsonAny::str(cwd.c_str()));
|
|
|
|
|
obj->set("file", SrsJsonAny::str(file.c_str()));
|
|
|
|
|
|
|
|
|
@ -318,6 +323,7 @@ srs_error_t SrsHttpHooks::on_hls(int cid, string url, SrsRequest* req, string fi
|
|
|
|
|
obj->set("vhost", SrsJsonAny::str(req->vhost.c_str()));
|
|
|
|
|
obj->set("app", SrsJsonAny::str(req->app.c_str()));
|
|
|
|
|
obj->set("stream", SrsJsonAny::str(req->stream.c_str()));
|
|
|
|
|
obj->set("param", SrsJsonAny::str(req->param.c_str()));
|
|
|
|
|
obj->set("duration", SrsJsonAny::number(duration));
|
|
|
|
|
obj->set("cwd", SrsJsonAny::str(cwd.c_str()));
|
|
|
|
|
obj->set("file", SrsJsonAny::str(file.c_str()));
|
|
|
|
@ -355,6 +361,7 @@ srs_error_t SrsHttpHooks::on_hls_notify(int cid, std::string url, SrsRequest* re
|
|
|
|
|
url = srs_string_replace(url, "[app]", req->app);
|
|
|
|
|
url = srs_string_replace(url, "[stream]", req->stream);
|
|
|
|
|
url = srs_string_replace(url, "[ts_url]", ts_url);
|
|
|
|
|
url = srs_string_replace(url, "[param]", req->param);
|
|
|
|
|
|
|
|
|
|
int64_t starttime = srs_update_system_time_ms();
|
|
|
|
|
|
|
|
|
|