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

For #910, Support HTTP FLV with HTTP callback. 2.0.254

This commit is contained in:
winlin 2018-08-11 19:09:56 +08:00
parent 6cea551c64
commit 1e7c12a6dd
8 changed files with 111 additions and 9 deletions

View file

@ -1776,6 +1776,12 @@ void SrsRequest::strip()
stream = srs_string_trim_start(stream, "/");
}
SrsRequest* SrsRequest::as_http()
{
schema = "http";
return this;
}
SrsResponse::SrsResponse()
{
stream_id = SRS_DEFAULT_SID;

View file

@ -606,6 +606,9 @@ public:
* strip url, user must strip when update the url.
*/
virtual void strip();
public:
// Transform it as HTTP request.
virtual SrsRequest* as_http();
};
/**

View file

@ -71,6 +71,10 @@ void srs_discovery_tc_url(
vhost = host;
srs_vhost_resolve(vhost, app, param);
srs_vhost_resolve(vhost, stream, param);
if (param == "?vhost="SRS_CONSTS_RTMP_DEFAULT_VHOST) {
param = "";
}
}
void srs_vhost_resolve(string& vhost, string& app, string& param)