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

Support the publishing of RTP plaintext packets using WHIP. v5.0.155

This commit is contained in:
winlin 2023-05-14 12:43:35 +08:00
parent a570169a27
commit 261bebcad1
5 changed files with 18 additions and 2 deletions

View file

@ -8,6 +8,7 @@ The changelog for SRS.
## SRS 5.0 Changelog
* v5.0, 2023-05-14, Support the publishing of RTP plaintext packets using WHIP. v5.0.155
* v5.0, 2023-05-13, Merge [#3541](https://github.com/ossrs/srs/pull/3541): asan: Fix memory leak in asan by releasing global IPs when run_directly_or_daemon fails. v5.0.154 (#3541)
* v5.0, 2023-05-12, Merge [#3539](https://github.com/ossrs/srs/pull/3539): WHIP: Improve HTTP DELETE for notifying server unpublish event. v5.0.153 (#3539)
* v5.0, 2023-03-27, Merge [#3450](https://github.com/ossrs/srs/pull/3450): WebRTC: Error message carries the SDP when failed. v5.0.151 (#3450)

View file

@ -35,6 +35,7 @@ function user_extra_params(query, params, rtc) {
|| key === 'http_port' || key === 'pathname' || key === 'port'
|| key === 'server' || key === 'stream' || key === 'buffer'
|| key === 'schema' || key === 'vhost' || key === 'api'
|| key === 'path'
) {
continue;
}
@ -123,12 +124,14 @@ function build_default_whip_whep_url(query, apiPath) {
console.log('?eip=x.x.x.x to overwrite candidate. 覆盖服务器candidate(外网IP)配置');
console.log('?api=x to overwrite WebRTC API(1985).');
console.log('?schema=http|https to overwrite WebRTC API protocol.');
console.log(`?path=xxx to overwrite default ${apiPath}`);
var server = (!query.server)? window.location.hostname:query.server;
var vhost = (!query.vhost)? window.location.hostname:query.vhost;
var app = (!query.app)? "live":query.app;
var stream = (!query.stream)? "livestream":query.stream;
var api = ':' + (query.api || (window.location.protocol === 'http:' ? '1985' : '1990'));
const realApiPath = query.path || apiPath;
var queries = [];
if (server !== vhost && vhost !== "__defaultVhost__") {
@ -139,7 +142,7 @@ function build_default_whip_whep_url(query, apiPath) {
}
queries = user_extra_params(query, queries, true);
var uri = window.location.protocol + "//" + server + api + apiPath + "?app=" + app + "&stream=" + stream + "&" + queries.join('&');
var uri = window.location.protocol + "//" + server + api + realApiPath + "?app=" + app + "&stream=" + stream + "&" + queries.join('&');
while (uri.lastIndexOf("?") === uri.length - 1) {
uri = uri.slice(0, uri.length - 1);
}

View file

@ -217,6 +217,16 @@ srs_error_t SrsSemiSecurityTransport::protect_rtcp(void* packet, int* nb_cipher)
return srs_success;
}
srs_error_t SrsSemiSecurityTransport::unprotect_rtp(void* packet, int* nb_plaintext)
{
return srs_success;
}
srs_error_t SrsSemiSecurityTransport::unprotect_rtcp(void* packet, int* nb_plaintext)
{
return srs_success;
}
SrsPlaintextTransport::SrsPlaintextTransport(ISrsRtcNetwork* s)
{
network_ = s;

View file

@ -134,6 +134,8 @@ public:
public:
srs_error_t protect_rtp(void* packet, int* nb_cipher);
srs_error_t protect_rtcp(void* packet, int* nb_cipher);
srs_error_t unprotect_rtp(void* packet, int* nb_plaintext);
srs_error_t unprotect_rtcp(void* packet, int* nb_plaintext);
};
// Plaintext transport, without DTLS or SRTP.

View file

@ -9,6 +9,6 @@
#define VERSION_MAJOR 5
#define VERSION_MINOR 0
#define VERSION_REVISION 154
#define VERSION_REVISION 155
#endif