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

Support WHIP and WHEP player. v5.0.147 and v6.0.35 (#3460)

PICK c001acaae9

Co-authored-by: chundonglinlin <chundonglinlin@163.com>
Co-authored-by: panda <542638787@qq.com>
This commit is contained in:
Winlin 2023-03-21 08:49:07 +08:00 committed by winlin
parent 2f1d0ccd34
commit dfef94411f
11 changed files with 455 additions and 9 deletions

View file

@ -638,6 +638,7 @@ srs_error_t SrsGoApiRtcWhip::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessa
ruc.req_->vhost = ruc.req_->host;
ruc.req_->app = app.empty() ? "live" : app;
ruc.req_->stream = stream.empty() ? "livestream" : stream;
ruc.req_->param = r->query();
// discovery vhost, resolve the vhost from config
SrsConfDirective* parsed_vhost = _srs_config->get_vhost(ruc.req_->vhost);
@ -645,9 +646,9 @@ srs_error_t SrsGoApiRtcWhip::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessa
ruc.req_->vhost = parsed_vhost->arg0();
}
srs_trace("RTC whip %s %s, clientip=%s, app=%s, stream=%s, offer=%dB, eip=%s, codec=%s",
srs_trace("RTC whip %s %s, clientip=%s, app=%s, stream=%s, offer=%dB, eip=%s, codec=%s, param=%s",
action.c_str(), ruc.req_->get_stream_url().c_str(), clientip.c_str(), ruc.req_->app.c_str(), ruc.req_->stream.c_str(),
remote_sdp_str.length(), eip.c_str(), codec.c_str()
remote_sdp_str.length(), eip.c_str(), codec.c_str(), ruc.req_->param.c_str()
);
ruc.eip_ = eip;