mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine the hls_on_notify, calc the spent time in ms.
This commit is contained in:
parent
e6d6bdfe57
commit
310157ab77
1 changed files with 5 additions and 2 deletions
|
@ -341,6 +341,8 @@ int SrsHttpHooks::on_hls_notify(std::string url, SrsRequest* req, std::string ts
|
|||
url = srs_string_replace(url, "[stream]", req->stream);
|
||||
url = srs_string_replace(url, "[ts_url]", ts_url);
|
||||
|
||||
int64_t starttime = srs_update_system_time_ms();
|
||||
|
||||
SrsHttpUri uri;
|
||||
if ((ret = uri.initialize(url)) != ERROR_SUCCESS) {
|
||||
srs_error("http: post failed. url=%s, ret=%d", url.c_str(), ret);
|
||||
|
@ -366,8 +368,9 @@ int SrsHttpHooks::on_hls_notify(std::string url, SrsRequest* req, std::string ts
|
|||
break;
|
||||
}
|
||||
|
||||
srs_trace("http hook on_hls_notify success. client_id=%d, url=%s, code=%d, ret=%d",
|
||||
client_id, url.c_str(), msg->status_code(), ret);
|
||||
int spenttime = (int)(srs_update_system_time_ms() - starttime);
|
||||
srs_trace("http hook on_hls_notify success. client_id=%d, url=%s, code=%d, spent=%dms, ret=%d",
|
||||
client_id, url.c_str(), msg->status_code(), spenttime, ret);
|
||||
|
||||
// ignore any error for on_hls_notify.
|
||||
ret = ERROR_SUCCESS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue