|
|
|
@ -879,8 +879,11 @@ srs_error_t SrsGoApiRtcPlay::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMe
|
|
|
|
|
srs_discovery_tc_url(tcUrl, schema, host, vhost, app, stream_name, port, param);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
srs_trace("RTC play %s, api=%s, clientip=%s, app=%s, stream=%s, offer=%dB",
|
|
|
|
|
streamurl.c_str(), api.c_str(), clientip.c_str(), app.c_str(), stream_name.c_str(), remote_sdp_str.length());
|
|
|
|
|
// For client to specifies the EIP of server.
|
|
|
|
|
string eip = r->query_get("eip");
|
|
|
|
|
|
|
|
|
|
srs_trace("RTC play %s, api=%s, clientip=%s, app=%s, stream=%s, offer=%dB, eip=%s",
|
|
|
|
|
streamurl.c_str(), api.c_str(), clientip.c_str(), app.c_str(), stream_name.c_str(), remote_sdp_str.length(), eip.c_str());
|
|
|
|
|
|
|
|
|
|
// TODO: FIXME: It seems remote_sdp doesn't represents the full SDP information.
|
|
|
|
|
SrsSdp remote_sdp;
|
|
|
|
@ -903,7 +906,7 @@ srs_error_t SrsGoApiRtcPlay::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMe
|
|
|
|
|
|
|
|
|
|
// TODO: FIXME: Maybe need a better name?
|
|
|
|
|
// TODO: FIXME: When server enabled, but vhost disabled, should report error.
|
|
|
|
|
SrsRtcSession* rtc_session = rtc_server->create_rtc_session(request, remote_sdp, local_sdp);
|
|
|
|
|
SrsRtcSession* rtc_session = rtc_server->create_rtc_session(request, remote_sdp, local_sdp, eip);
|
|
|
|
|
|
|
|
|
|
ostringstream os;
|
|
|
|
|
if ((err = local_sdp.encode(os)) != srs_success) {
|
|
|
|
|