mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Identify the WebRTC publisher in param for hooks. v4.0.247
This commit is contained in:
parent
107ca2cbb8
commit
e26db694ca
3 changed files with 6 additions and 5 deletions
|
@ -8,6 +8,7 @@ The changelog for SRS.
|
||||||
|
|
||||||
## SRS 4.0 Changelog
|
## SRS 4.0 Changelog
|
||||||
|
|
||||||
|
* v4.0, 2022-03-07, RTC: Identify the WebRTC publisher in param for hooks. v4.0.247
|
||||||
* v4.0, 2022-03-07, SRT: Append vhost to stream, not app. v4.0.246
|
* v4.0, 2022-03-07, SRT: Append vhost to stream, not app. v4.0.246
|
||||||
* v4.0, 2022-02-15, Fix warnings for uuid. v4.0.245
|
* v4.0, 2022-02-15, Fix warnings for uuid. v4.0.245
|
||||||
* v4.0, 2022-02-15, Merge [#2917](https://github.com/ossrs/srs/pull/2917): SRT: Close connection if RTMP failed. (#2917). v4.0.244
|
* v4.0, 2022-02-15, Merge [#2917](https://github.com/ossrs/srs/pull/2917): SRT: Close connection if RTMP failed. (#2917). v4.0.244
|
||||||
|
|
|
@ -394,10 +394,12 @@ srs_error_t SrsGoApiRtcPublish::do_serve_http(ISrsHttpResponseWriter* w, ISrsHtt
|
||||||
ruc.api_ = api;
|
ruc.api_ = api;
|
||||||
|
|
||||||
srs_parse_rtmp_url(streamurl, ruc.req_->tcUrl, ruc.req_->stream);
|
srs_parse_rtmp_url(streamurl, ruc.req_->tcUrl, ruc.req_->stream);
|
||||||
|
|
||||||
srs_discovery_tc_url(ruc.req_->tcUrl, ruc.req_->schema, ruc.req_->host, ruc.req_->vhost,
|
srs_discovery_tc_url(ruc.req_->tcUrl, ruc.req_->schema, ruc.req_->host, ruc.req_->vhost,
|
||||||
ruc.req_->app, ruc.req_->stream, ruc.req_->port, ruc.req_->param);
|
ruc.req_->app, ruc.req_->stream, ruc.req_->port, ruc.req_->param);
|
||||||
|
|
||||||
|
// Identify WebRTC publisher by param upstream=rtc
|
||||||
|
ruc.req_->param = srs_string_trim_start(ruc.req_->param + "&upstream=rtc", "&");
|
||||||
|
|
||||||
// discovery vhost, resolve the vhost from config
|
// discovery vhost, resolve the vhost from config
|
||||||
SrsConfDirective* parsed_vhost = _srs_config->get_vhost(ruc.req_->vhost);
|
SrsConfDirective* parsed_vhost = _srs_config->get_vhost(ruc.req_->vhost);
|
||||||
if (parsed_vhost) {
|
if (parsed_vhost) {
|
||||||
|
@ -527,11 +529,9 @@ srs_error_t SrsGoApiRtcPublish::http_hooks_on_publish(SrsRequest* req)
|
||||||
|
|
||||||
if (true) {
|
if (true) {
|
||||||
SrsConfDirective* conf = _srs_config->get_vhost_on_publish(req->vhost);
|
SrsConfDirective* conf = _srs_config->get_vhost_on_publish(req->vhost);
|
||||||
|
|
||||||
if (!conf) {
|
if (!conf) {
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
hooks = conf->args;
|
hooks = conf->args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
#define VERSION_MAJOR 4
|
#define VERSION_MAJOR 4
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 246
|
#define VERSION_REVISION 247
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue