正在显示
1 个修改的文件
包含
5 行增加
和
2 行删除
| @@ -341,6 +341,8 @@ int SrsHttpHooks::on_hls_notify(std::string url, SrsRequest* req, std::string ts | @@ -341,6 +341,8 @@ int SrsHttpHooks::on_hls_notify(std::string url, SrsRequest* req, std::string ts | ||
| 341 | url = srs_string_replace(url, "[stream]", req->stream); | 341 | url = srs_string_replace(url, "[stream]", req->stream); |
| 342 | url = srs_string_replace(url, "[ts_url]", ts_url); | 342 | url = srs_string_replace(url, "[ts_url]", ts_url); |
| 343 | 343 | ||
| 344 | + int64_t starttime = srs_update_system_time_ms(); | ||
| 345 | + | ||
| 344 | SrsHttpUri uri; | 346 | SrsHttpUri uri; |
| 345 | if ((ret = uri.initialize(url)) != ERROR_SUCCESS) { | 347 | if ((ret = uri.initialize(url)) != ERROR_SUCCESS) { |
| 346 | srs_error("http: post failed. url=%s, ret=%d", url.c_str(), ret); | 348 | 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 | @@ -366,8 +368,9 @@ int SrsHttpHooks::on_hls_notify(std::string url, SrsRequest* req, std::string ts | ||
| 366 | break; | 368 | break; |
| 367 | } | 369 | } |
| 368 | 370 | ||
| 369 | - srs_trace("http hook on_hls_notify success. client_id=%d, url=%s, code=%d, ret=%d", | ||
| 370 | - client_id, url.c_str(), msg->status_code(), ret); | 371 | + int spenttime = (int)(srs_update_system_time_ms() - starttime); |
| 372 | + srs_trace("http hook on_hls_notify success. client_id=%d, url=%s, code=%d, spent=%dms, ret=%d", | ||
| 373 | + client_id, url.c_str(), msg->status_code(), spenttime, ret); | ||
| 371 | 374 | ||
| 372 | // ignore any error for on_hls_notify. | 375 | // ignore any error for on_hls_notify. |
| 373 | ret = ERROR_SUCCESS; | 376 | ret = ERROR_SUCCESS; |
-
请 注册 或 登录 后发表评论