mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
Merge branch '4.0release' into merge/develop
This commit is contained in:
commit
2bd0deac47
5 changed files with 34 additions and 24 deletions
|
@ -18,6 +18,7 @@ The changelog for SRS.
|
|||
|
||||
## SRS 4.0 Changelog
|
||||
|
||||
* 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-28, Merge [#2435](https://github.com/ossrs/srs/pull/2435), fix bug for HTTP-RAW-API to check vhost. 4.0.136
|
||||
* v4.0, 2021-06-28, Fix [#2431](https://github.com/ossrs/srs/issues/2431), configure FFmpeg bug. 4.0.135
|
||||
* v4.0, 2021-06-28, Merge [#2444](https://github.com/ossrs/srs/pull/2444), add libavcodec/crystalhd.c for FFmpeg. 4.0.134
|
||||
|
|
36
README.md
36
README.md
|
@ -106,26 +106,40 @@ A big THANK YOU goes to:
|
|||
|
||||
The ports used by SRS, kernel services:
|
||||
|
||||
* tcp://1935, for RTMP live streaming server([CN][v4_CN_DeliveryRTMP],[EN][v4_EN_DeliveryRTMP]).
|
||||
* tcp://1985, HTTP API server, for HTTP-API([CN][v4_CN_HTTPApi], [EN][v4_EN_HTTPApi]), WebRTC([CN][v4_CN_WebRTC], [EN][v4_EN_WebRTC]), etc.
|
||||
* tcp://8080, HTTP live streaming server, HTTP-FLV([CN][v4_CN_SampleHttpFlv], [EN][v4_EN_SampleHttpFlv]), HLS([CN][v4_CN_SampleHLS], [EN][v4_EN_SampleHLS]) as such.
|
||||
* udp://8000, WebRTC Media([CN][v4_CN_WebRTC], [EN][v4_EN_WebRTC]) server.
|
||||
* `tcp://1935`, for RTMP live streaming server([CN][v4_CN_DeliveryRTMP],[EN][v4_EN_DeliveryRTMP]).
|
||||
* `tcp://1985`, HTTP API server, for HTTP-API([CN][v4_CN_HTTPApi], [EN][v4_EN_HTTPApi]), WebRTC([CN][v4_CN_WebRTC], [EN][v4_EN_WebRTC]), etc.
|
||||
* `tcp://8080`, HTTP live streaming server, HTTP-FLV([CN][v4_CN_SampleHttpFlv], [EN][v4_EN_SampleHttpFlv]), HLS([CN][v4_CN_SampleHLS], [EN][v4_EN_SampleHLS]) as such.
|
||||
* `udp://8000`, WebRTC Media([CN][v4_CN_WebRTC], [EN][v4_EN_WebRTC]) server.
|
||||
|
||||
For optional HTTPS services, which might be provided by other web servers:
|
||||
|
||||
* tcp://8088, HTTPS live streaming server.
|
||||
* tcp://1990, HTTPS API server.
|
||||
* `tcp://8088`, HTTPS live streaming server.
|
||||
* `tcp://1990`, HTTPS API server.
|
||||
|
||||
For optional stream caster services, to push streams to SRS:
|
||||
|
||||
* udp://8935, Stream Caster: [Push MPEGTS over UDP](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-mpeg-ts-over-udp) server.
|
||||
* tcp://554, Stream Caster: [Push RTSP](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-rtsp-to-srs) server.
|
||||
* tcp://8936, Stream Caster: [Push HTTP-FLV](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-http-flv-to-srs) server.
|
||||
* udp://10080, Stream Caster: [Push SRT Media](https://github.com/ossrs/srs/issues/1147#issuecomment-577469119) server.
|
||||
* `udp://8935`, Stream Caster: [Push MPEGTS over UDP](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-mpeg-ts-over-udp) server.
|
||||
* `tcp://554`, Stream Caster: [Push RTSP](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-rtsp-to-srs) server.
|
||||
* `tcp://8936`, Stream Caster: [Push HTTP-FLV](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-http-flv-to-srs) server.
|
||||
* `udp://10080`, Stream Caster: [Push SRT Media](https://github.com/ossrs/srs/issues/1147#issuecomment-577469119) server.
|
||||
|
||||
For external services to work with SRS:
|
||||
|
||||
* udp://1989, [WebRTC Signaling](https://github.com/ossrs/signaling#usage) server.
|
||||
* `udp://1989`, [WebRTC Signaling](https://github.com/ossrs/signaling#usage) server.
|
||||
|
||||
## APIs
|
||||
|
||||
The API used by SRS:
|
||||
|
||||
* `/api/v1/` The HTTP API path.
|
||||
* `/rtc/v1/` The HTTP API path for RTC.
|
||||
* `/sig/v1/` The [demo signaling](https://github.com/ossrs/signaling) API.
|
||||
|
||||
Other API used by [ossrs.net](https://ossrs.net):
|
||||
|
||||
* `/gif/v1` The statistic API.
|
||||
* `/service/v1/` The latest available version API.
|
||||
* `/ws-service/v1/` The latest available version API, by websocket.
|
||||
|
||||
## Features
|
||||
|
||||
|
|
|
@ -54,12 +54,7 @@ srs_error_t SrsLatestVersion::start()
|
|||
return srs_success;
|
||||
}
|
||||
|
||||
char buf[10];
|
||||
srs_random_generate(buf, sizeof(buf));
|
||||
for (int i = 0; i < (int)sizeof(buf); i++) {
|
||||
buf[i] = 'a' + uint8_t(buf[i])%25;
|
||||
}
|
||||
server_id_ = string(buf, sizeof(buf));
|
||||
server_id_ = srs_random_str(10);
|
||||
|
||||
return trd_->start();
|
||||
}
|
||||
|
|
|
@ -944,6 +944,11 @@ srs_error_t SrsRtmpConn::acquire_publish(SrsLiveSource* source)
|
|||
|
||||
SrsRequest* req = info->req;
|
||||
|
||||
// Check whether RTMP stream is busy.
|
||||
if (!source->can_publish(info->edge)) {
|
||||
return srs_error_new(ERROR_SYSTEM_STREAM_BUSY, "rtmp: stream %s is busy", req->get_stream_url().c_str());
|
||||
}
|
||||
|
||||
// Check whether RTC stream is busy.
|
||||
#ifdef SRS_RTC
|
||||
SrsRtcSource *rtc = NULL;
|
||||
|
@ -955,16 +960,11 @@ srs_error_t SrsRtmpConn::acquire_publish(SrsLiveSource* source)
|
|||
}
|
||||
|
||||
if (!rtc->can_publish()) {
|
||||
return srs_error_new(ERROR_RTC_SOURCE_BUSY, "rtc stream %s busy", req->get_stream_url().c_str());
|
||||
return srs_error_new(ERROR_SYSTEM_STREAM_BUSY, "rtc stream %s busy", req->get_stream_url().c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check whether RTMP stream is busy.
|
||||
if (!source->can_publish(info->edge)) {
|
||||
return srs_error_new(ERROR_SYSTEM_STREAM_BUSY, "rtmp: stream %s is busy", req->get_stream_url().c_str());
|
||||
}
|
||||
|
||||
// Bridge to RTC streaming.
|
||||
#if defined(SRS_RTC) && defined(SRS_FFMPEG_FIT)
|
||||
if (rtc) {
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 4
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 136
|
||||
#define VERSION_REVISION 137
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue