mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 03:41:55 +00:00
Squash: Fix padding packets for RTMP2RTC
This commit is contained in:
parent
c8a1e0f3da
commit
8f91a90f28
6 changed files with 18 additions and 8 deletions
|
@ -20,6 +20,7 @@ The changelog for SRS.
|
||||||
|
|
||||||
## SRS 4.0 Changelog
|
## SRS 4.0 Changelog
|
||||||
|
|
||||||
|
* v4.0, 2021-07-08, For [#2403](https://github.com/ossrs/srs/issues/2403), fix padding packets for RTMP2RTC. 4.0.140
|
||||||
* v4.0, 2021-07-04, For [#2424](https://github.com/ossrs/srs/issues/2424), use srandom/random to generate. 4.0.139
|
* v4.0, 2021-07-04, For [#2424](https://github.com/ossrs/srs/issues/2424), use srandom/random to generate. 4.0.139
|
||||||
* v4.0, 2021-07-01, Merge [#2452](https://github.com/ossrs/srs/pull/2452), fix FFmpeg bug by updating channel_layout. 4.0.138
|
* v4.0, 2021-07-01, Merge [#2452](https://github.com/ossrs/srs/pull/2452), fix FFmpeg bug by updating channel_layout. 4.0.138
|
||||||
* v4.0, 2021-06-30, Merge [#2440](https://github.com/ossrs/srs/pull/2440), fix [#2390](https://github.com/ossrs/srs/issues/2390), SRT bug for zerolatency. 4.0.137
|
* v4.0, 2021-06-30, Merge [#2440](https://github.com/ossrs/srs/pull/2440), fix [#2390](https://github.com/ossrs/srs/issues/2390), SRT bug for zerolatency. 4.0.137
|
||||||
|
|
|
@ -22,7 +22,7 @@ please set the CANDIDATE ([CN][v4_CN_WebRTC#config-candidate],[EN][v4_EN_WebRTC#
|
||||||
```bash
|
```bash
|
||||||
docker run --rm -it -p 1935:1935 -p 1985:1985 -p 8080:8080 \
|
docker run --rm -it -p 1935:1935 -p 1985:1985 -p 8080:8080 \
|
||||||
--env CANDIDATE=$(ifconfig en0 inet| grep 'inet '|awk '{print $2}') -p 8000:8000/udp \
|
--env CANDIDATE=$(ifconfig en0 inet| grep 'inet '|awk '{print $2}') -p 8000:8000/udp \
|
||||||
ossrs/srs:v4.0.117 ./objs/srs -c conf/srs.conf
|
ossrs/srs:v4.0.139 ./objs/srs -c conf/srs.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="usage-source"></a>
|
<a name="usage-source"></a>
|
||||||
|
|
|
@ -33,8 +33,8 @@ function SrsRtcPublisherAsync() {
|
||||||
// webrtc://r.ossrs.net:11985/live/mystream
|
// webrtc://r.ossrs.net:11985/live/mystream
|
||||||
// or set the api server to myapi.domain.com:
|
// or set the api server to myapi.domain.com:
|
||||||
// webrtc://myapi.domain.com/live/livestream
|
// webrtc://myapi.domain.com/live/livestream
|
||||||
// or set the candidate(ip) of answer:
|
// or set the candidate(eip) of answer:
|
||||||
// webrtc://r.ossrs.net/live/livestream?eip=39.107.238.185
|
// webrtc://r.ossrs.net/live/livestream?candidate=39.107.238.185
|
||||||
// or force to access https API:
|
// or force to access https API:
|
||||||
// webrtc://r.ossrs.net/live/livestream?schema=https
|
// webrtc://r.ossrs.net/live/livestream?schema=https
|
||||||
// or use plaintext, without SRTP:
|
// or use plaintext, without SRTP:
|
||||||
|
@ -272,8 +272,8 @@ function SrsRtcPlayerAsync() {
|
||||||
// webrtc://r.ossrs.net:11985/live/mystream
|
// webrtc://r.ossrs.net:11985/live/mystream
|
||||||
// or set the api server to myapi.domain.com:
|
// or set the api server to myapi.domain.com:
|
||||||
// webrtc://myapi.domain.com/live/livestream
|
// webrtc://myapi.domain.com/live/livestream
|
||||||
// or set the candidate(ip) of answer:
|
// or set the candidate(eip) of answer:
|
||||||
// webrtc://r.ossrs.net/live/livestream?eip=39.107.238.185
|
// webrtc://r.ossrs.net/live/livestream?candidate=39.107.238.185
|
||||||
// or force to access https API:
|
// or force to access https API:
|
||||||
// webrtc://r.ossrs.net/live/livestream?schema=https
|
// webrtc://r.ossrs.net/live/livestream?schema=https
|
||||||
// or use plaintext, without SRTP:
|
// or use plaintext, without SRTP:
|
||||||
|
|
|
@ -118,8 +118,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_discovery_tc_url(tcUrl, schema, host, vhost, app, stream_name, port, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
// For client to specifies the EIP of server.
|
// For client to specifies the candidate(EIP) of server.
|
||||||
string eip = r->query_get("eip");
|
string eip = r->query_get("eip");
|
||||||
|
if (eip.empty()) {
|
||||||
|
eip = r->query_get("candidate");
|
||||||
|
}
|
||||||
string codec = r->query_get("codec");
|
string codec = r->query_get("codec");
|
||||||
// For client to specifies whether encrypt by SRTP.
|
// For client to specifies whether encrypt by SRTP.
|
||||||
string srtp = r->query_get("encrypt");
|
string srtp = r->query_get("encrypt");
|
||||||
|
@ -338,8 +341,11 @@ srs_error_t SrsGoApiRtcPublish::do_serve_http(ISrsHttpResponseWriter* w, ISrsHtt
|
||||||
srs_discovery_tc_url(tcUrl, schema, host, vhost, app, stream_name, port, param);
|
srs_discovery_tc_url(tcUrl, schema, host, vhost, app, stream_name, port, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
// For client to specifies the EIP of server.
|
// For client to specifies the candidate(EIP) of server.
|
||||||
string eip = r->query_get("eip");
|
string eip = r->query_get("eip");
|
||||||
|
if (eip.empty()) {
|
||||||
|
eip = r->query_get("candidate");
|
||||||
|
}
|
||||||
string codec = r->query_get("codec");
|
string codec = r->query_get("codec");
|
||||||
|
|
||||||
srs_trace("RTC publish %s, api=%s, tid=%s, clientip=%s, app=%s, stream=%s, offer=%dB, eip=%s, codec=%s",
|
srs_trace("RTC publish %s, api=%s, tid=%s, clientip=%s, app=%s, stream=%s, offer=%dB, eip=%s, codec=%s",
|
||||||
|
|
|
@ -747,6 +747,9 @@ srs_error_t SrsSdp::parse(const std::string& sdp_str)
|
||||||
line.erase(line.size()-1, 1);
|
line.erase(line.size()-1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Strip the space of line, for pion WebRTC client.
|
||||||
|
line = srs_string_trim_end(line, " ");
|
||||||
|
|
||||||
if ((err = parse_line(line)) != srs_success) {
|
if ((err = parse_line(line)) != srs_success) {
|
||||||
return srs_error_wrap(err, "parse sdp line failed");
|
return srs_error_wrap(err, "parse sdp line failed");
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
#define VERSION_MAJOR 4
|
#define VERSION_MAJOR 4
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 139
|
#define VERSION_REVISION 140
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue