mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
Update
This commit is contained in:
commit
a0aa6e7d9b
10 changed files with 47 additions and 12 deletions
|
@ -13,8 +13,9 @@
|
|||
[![](https://badgen.net/twitter/follow/winlinvip)](https://twitter.com/winlinvip)
|
||||
[![](https://img.shields.io/youtube/channel/views/UCP6ZblCL_fIJoEyUzZxC1ng?style=social)](https://www.youtube.com/channel/UCP6ZblCL_fIJoEyUzZxC1ng)
|
||||
[![](https://img.shields.io/twitch/status/winlinvip?style=social)](https://www.twitch.tv/winlinvip)
|
||||
[![](https://badgen.net/discord/members/yZ4BnPmHAd)](https://discord.gg/yZ4BnPmHAd)
|
||||
|
||||
SRS/5.0 是一个简单高效的实时视频服务器,支持RTMP/WebRTC/HLS/HTTP-FLV/SRT。
|
||||
SRS/5.0,[Bee](https://github.com/ossrs/srs/wiki/Product#release50) 是一个简单高效的实时视频服务器,支持RTMP/WebRTC/HLS/HTTP-FLV/SRT。
|
||||
|
||||
SRS/5.0 is a simple, high efficiency and realtime video server, supports RTMP/WebRTC/HLS/HTTP-FLV/SRT.
|
||||
|
||||
|
@ -82,6 +83,8 @@ Other important wiki:
|
|||
|
||||
## AUTHORS
|
||||
|
||||
![](https://opencollective.com/srs-server/contributors.svg?width=800&button=false)
|
||||
|
||||
The [TOC(Technical Oversight Committee)](trunk/AUTHORS.md#toc) and [contributors](trunk/AUTHORS.md#contributors):
|
||||
|
||||
* [Winlin](https://github.com/winlinvip): Focus on [ST](https://github.com/ossrs/state-threads) and [Issues/PR](https://github.com/ossrs/srs/issues).
|
||||
|
@ -371,4 +374,3 @@ Winlin
|
|||
[r0.3]: https://github.com/ossrs/srs/releases/tag/v0.3.0
|
||||
[r0.2]: https://github.com/ossrs/srs/releases/tag/v0.2.0
|
||||
[r0.1]: https://github.com/ossrs/srs/releases/tag/v0.1.0
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ stats {
|
|||
}
|
||||
rtc_server {
|
||||
enabled on;
|
||||
listen 8000;
|
||||
listen 8000; # UDP port
|
||||
# @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate
|
||||
candidate $CANDIDATE;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ stats {
|
|||
}
|
||||
rtc_server {
|
||||
enabled on;
|
||||
listen 8000;
|
||||
listen 8000; # UDP port
|
||||
# @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate
|
||||
candidate $CANDIDATE;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ stats {
|
|||
}
|
||||
rtc_server {
|
||||
enabled on;
|
||||
listen 8000;
|
||||
listen 8000; # UDP port
|
||||
# @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate
|
||||
candidate $CANDIDATE;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ http_server {
|
|||
}
|
||||
rtc_server {
|
||||
enabled on;
|
||||
listen 8000;
|
||||
listen 8000; # UDP port
|
||||
# @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate
|
||||
candidate $CANDIDATE;
|
||||
}
|
||||
|
|
|
@ -30,10 +30,12 @@ The changelog for SRS.
|
|||
|
||||
## SRS 4.0 Changelog
|
||||
|
||||
* v4.0, 2021-12-04, Merge [#2768](https://github.com/ossrs/srs/pull/2768): RTC: Fix bugs for RTC2RTMP. (#2768). v4.0.203
|
||||
* v4.0, 2021-12-04, Merge [#2757](https://github.com/ossrs/srs/pull/2757): RTC: Ignore empty audio packet when transcoding (#2757). v4.0.202
|
||||
* v4.0, 2021-12-01, Fix [#2762](https://github.com/ossrs/srs/pull/2762): RTC: Refine publish security error message (#2762). v4.0.200
|
||||
* v4.0, 2021-11-25, Merge [#2751](https://github.com/ossrs/srs/pull/2751): RTC: Fix crash when pkt->payload() if pkt is nullptr (#2751). v4.0.199
|
||||
* v4.0, 2021-12-07, Merge [#2771](https://github.com/ossrs/srs/pull/2771): RTC: Fix memory leak when replace rtp packet in cache. (#2771). v4.0.205
|
||||
* v4.0, 2021-12-06, Merge [#2766](https://github.com/ossrs/srs/pull/2766): RTC: Fix nack encode seqnum. (#2766). v4.0.204
|
||||
* v4.0, 2021-12-04, Merge [#2768](https://github.com/ossrs/srs/pull/2768): RTC: Fix bugs for RTC2RTMP. (#2768). v4.0.203
|
||||
* v4.0, 2021-12-04, Merge [#2757](https://github.com/ossrs/srs/pull/2757): RTC: Ignore empty audio packet when transcoding (#2757). v4.0.202
|
||||
* v4.0, 2021-12-01, Fix [#2762](https://github.com/ossrs/srs/pull/2762): RTC: Refine publish security error message (#2762). v4.0.200
|
||||
* v4.0, 2021-11-25, Merge [#2751](https://github.com/ossrs/srs/pull/2751): RTC: Fix crash when pkt->payload() if pkt is nullptr (#2751). v4.0.199
|
||||
* v4.0, 2021-11-15, For [#1708](https://github.com/ossrs/srs/pull/1708): ST: Print log when multiple thread stop one coroutine. (#1708). v4.0.198
|
||||
* v4.0, 2021-11-14, Merge [#2732](https://github.com/ossrs/srs/pull/2732): WebRTC: Fail to publish RTC automatically for HTML5. (#2732). v4.0.197
|
||||
* v4.0, 2021-11-13, Merge [#2729](https://github.com/ossrs/srs/pull/2729): RTC: check audio track exist when negotiate (#2729). v4.0.196
|
||||
|
|
|
@ -1437,6 +1437,7 @@ srs_error_t SrsRtmpFromRtcBridger::packet_video(SrsRtpPacket* src)
|
|||
// store in cache
|
||||
int index = cache_index(pkt->header.get_sequence());
|
||||
cache_video_pkts_[index].in_use = true;
|
||||
srs_freep(cache_video_pkts_[index].pkt);
|
||||
cache_video_pkts_[index].pkt = pkt;
|
||||
cache_video_pkts_[index].sn = pkt->header.get_sequence();
|
||||
cache_video_pkts_[index].ts = pkt->get_avsync_time();
|
||||
|
@ -1526,6 +1527,7 @@ srs_error_t SrsRtmpFromRtcBridger::packet_video_key_frame(SrsRtpPacket* pkt)
|
|||
|
||||
uint16_t index = cache_index(pkt->header.get_sequence());
|
||||
cache_video_pkts_[index].in_use = true;
|
||||
srs_freep(cache_video_pkts_[index].pkt);
|
||||
cache_video_pkts_[index].pkt = pkt;
|
||||
cache_video_pkts_[index].sn = pkt->header.get_sequence();
|
||||
cache_video_pkts_[index].ts = pkt->get_avsync_time();
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 4
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 203
|
||||
#define VERSION_REVISION 205
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1348,7 +1348,10 @@ srs_error_t SrsRtcpNack::encode(SrsBuffer *buffer)
|
|||
} else if( (sn - pid) > 16) {
|
||||
// add new chunk
|
||||
chunks.push_back(chunk);
|
||||
chunk.in_use = false;
|
||||
chunk.pid = sn;
|
||||
chunk.blp = 0;
|
||||
chunk.in_use = true;
|
||||
pid = sn;
|
||||
} else {
|
||||
chunk.blp |= 1 << (sn-pid-1);
|
||||
}
|
||||
|
|
|
@ -744,6 +744,32 @@ VOID TEST(KernelRTCTest, NACKFetchRTPPacket)
|
|||
}
|
||||
}
|
||||
|
||||
VOID TEST(KernelRTCTest, NACKEncode)
|
||||
{
|
||||
uint32_t ssrc = 123;
|
||||
char buf_before[kRtcpPacketSize];
|
||||
SrsBuffer stream_before(buf_before, sizeof(buf_before));
|
||||
|
||||
SrsRtcpNack rtcp_nack_encode(ssrc);
|
||||
for(uint16_t i = 16; i < 50; ++i) {
|
||||
rtcp_nack_encode.add_lost_sn(i);
|
||||
}
|
||||
srs_error_t err_before = rtcp_nack_encode.encode(&stream_before);
|
||||
EXPECT_TRUE(err_before == 0);
|
||||
char buf_after[kRtcpPacketSize];
|
||||
memcpy(buf_after, buf_before, kRtcpPacketSize);
|
||||
SrsBuffer stream_after(buf_after, sizeof(buf_after));
|
||||
SrsRtcpNack rtcp_nack_decode(ssrc);
|
||||
srs_error_t err_after = rtcp_nack_decode.decode(&stream_after);
|
||||
EXPECT_TRUE(err_after == 0);
|
||||
vector<uint16_t> before = rtcp_nack_encode.get_lost_sns();
|
||||
vector<uint16_t> after = rtcp_nack_decode.get_lost_sns();
|
||||
EXPECT_TRUE(before.size() == after.size());
|
||||
for(int i = 0; i < before.size() && i < after.size(); ++i) {
|
||||
EXPECT_TRUE(before.at(i) == after.at(i));
|
||||
}
|
||||
}
|
||||
|
||||
extern bool srs_is_stun(const uint8_t* data, size_t size);
|
||||
extern bool srs_is_dtls(const uint8_t* data, size_t len);
|
||||
extern bool srs_is_rtp_or_rtcp(const uint8_t* data, size_t len);
|
||||
|
|
Loading…
Reference in a new issue