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

STAT: Refine tcUrl for SRT/RTC. v5.0.54

This commit is contained in:
winlin 2022-08-30 19:35:14 +08:00
parent d877c0b76f
commit 9c6774b644
21 changed files with 121 additions and 36 deletions

View file

@ -523,6 +523,10 @@ srs_error_t SrsLiveStream::update_auth(SrsLiveSource* s, SrsRequest* r)
srs_error_t SrsLiveStream::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
{
srs_error_t err = srs_success;
// Correct the app and stream by path, which is created from template.
// @remark Be careful that the stream has extension now, might cause identify fail.
req->stream = srs_path_basename(r->path());
if ((err = http_hooks_on_play(r)) != srs_success) {
return srs_error_wrap(err, "http hook");
@ -588,7 +592,7 @@ srs_error_t SrsLiveStream::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMess
SrsHttpConn* hc = dynamic_cast<SrsHttpConn*>(hr->connection());
// update client ip
req->ip = hc->remote_ip();
req->ip = hc->remote_ip();
// update the statistic when source disconveried.
SrsStatistic* stat = SrsStatistic::instance();