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:
parent
d877c0b76f
commit
9c6774b644
21 changed files with 121 additions and 36 deletions
|
@ -175,9 +175,9 @@ long srs_random()
|
|||
return random();
|
||||
}
|
||||
|
||||
string srs_generate_tc_url(string host, string vhost, string app, int port)
|
||||
string srs_generate_tc_url(string schema, string host, string vhost, string app, int port)
|
||||
{
|
||||
string tcUrl = "rtmp://";
|
||||
string tcUrl = schema + "://";
|
||||
|
||||
if (vhost == SRS_CONSTS_RTMP_DEFAULT_VHOST) {
|
||||
tcUrl += host.empty() ? SRS_CONSTS_RTMP_DEFAULT_VHOST : host;
|
||||
|
@ -324,10 +324,9 @@ string srs_generate_stream_url(string vhost, string app, string stream)
|
|||
if (SRS_CONSTS_RTMP_DEFAULT_VHOST != vhost){
|
||||
url += vhost;
|
||||
}
|
||||
url += "/";
|
||||
url += app;
|
||||
url += "/";
|
||||
url += stream;
|
||||
url += "/" + app;
|
||||
// Note that we ignore any extension.
|
||||
url += "/" + srs_path_filename(stream);
|
||||
|
||||
return url;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue