mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
parent
6cde9a0230
commit
5f85d405e7
5 changed files with 18 additions and 8 deletions
|
@ -5,12 +5,12 @@
|
||||||
[](https://github.com/ossrs/srs/actions/workflows/release.yml?query=workflow%3ARelease)
|
[](https://github.com/ossrs/srs/actions/workflows/release.yml?query=workflow%3ARelease)
|
||||||
[](https://github.com/ossrs/srs/actions?query=workflow%3ATest+branch%3Adevelop)
|
[](https://github.com/ossrs/srs/actions?query=workflow%3ATest+branch%3Adevelop)
|
||||||
[](https://codecov.io/gh/ossrs/srs/branch/develop)
|
[](https://codecov.io/gh/ossrs/srs/branch/develop)
|
||||||
[](../../wikis/Contact#wechat)
|
[](../../wikis/Contact#wechat)
|
||||||
[](http://bbs.ossrs.net)
|
[](https://github.com/ossrs/srs/issues/2716)
|
||||||
|
|
||||||
SRS/4.0 [Leo](https://github.com/ossrs/srs/wiki/v4_CN_Product#release40) 是一个简单高效的实时视频服务器,支持RTMP/WebRTC/HLS/HTTP-FLV/SRT。
|
SRS/5.0 是一个简单高效的实时视频服务器,支持RTMP/WebRTC/HLS/HTTP-FLV/SRT。
|
||||||
|
|
||||||
SRS/4.0 [Leo](https://github.com/ossrs/srs/wiki/v4_CN_Product#release40) is a simple, high efficiency and realtime video server, supports 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.
|
||||||
|
|
||||||
SRS is licenced under [MIT](https://github.com/ossrs/srs/blob/develop/LICENSE), but some depended libraries are distributed using their [own licenses](https://github.com/ossrs/srs/wiki/LicenseMixing).
|
SRS is licenced under [MIT](https://github.com/ossrs/srs/blob/develop/LICENSE), but some depended libraries are distributed using their [own licenses](https://github.com/ossrs/srs/wiki/LicenseMixing).
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,8 @@ The changelog for SRS.
|
||||||
|
|
||||||
## SRS 4.0 Changelog
|
## SRS 4.0 Changelog
|
||||||
|
|
||||||
|
* 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
|
||||||
|
* v4.0, 2021-11-09, Merge [#2721](https://github.com/ossrs/srs/pull/2721): Rtc2Rtmp: Use RTP timestamp to identify video frames. v4.0.195
|
||||||
* v4.0, 2021-11-07, Merge [#2711](https://github.com/ossrs/srs/pull/2711): Config: Guess config files by [FHS](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard). v4.0.194
|
* v4.0, 2021-11-07, Merge [#2711](https://github.com/ossrs/srs/pull/2711): Config: Guess config files by [FHS](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard). v4.0.194
|
||||||
* v4.0, 2021-11-07, Merge [#2714](https://github.com/ossrs/srs/pull/2714): DVR: copy req from publish. v4.0.193
|
* v4.0, 2021-11-07, Merge [#2714](https://github.com/ossrs/srs/pull/2714): DVR: copy req from publish. v4.0.193
|
||||||
* v4.0, 2021-11-04, Merge [#2707](https://github.com/ossrs/srs/pull/2707): Refuse edge request when state is stopping. v4.0.192
|
* v4.0, 2021-11-04, Merge [#2707](https://github.com/ossrs/srs/pull/2707): Refuse edge request when state is stopping. v4.0.192
|
||||||
|
|
|
@ -659,6 +659,9 @@ std::vector<SrsRtcTrackDescription*> SrsRtcSource::get_track_desc(std::string ty
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == "audio") {
|
if (type == "audio") {
|
||||||
|
if (! stream_desc_->audio_track_desc_) {
|
||||||
|
return track_descs;
|
||||||
|
}
|
||||||
if (stream_desc_->audio_track_desc_->media_->name_ == media_name) {
|
if (stream_desc_->audio_track_desc_->media_->name_ == media_name) {
|
||||||
track_descs.push_back(stream_desc_->audio_track_desc_);
|
track_descs.push_back(stream_desc_->audio_track_desc_);
|
||||||
}
|
}
|
||||||
|
@ -1437,6 +1440,7 @@ srs_error_t SrsRtmpFromRtcBridger::packet_video(SrsRtpPacket* src)
|
||||||
cache_video_pkts_[index].pkt = pkt;
|
cache_video_pkts_[index].pkt = pkt;
|
||||||
cache_video_pkts_[index].sn = pkt->header.get_sequence();
|
cache_video_pkts_[index].sn = pkt->header.get_sequence();
|
||||||
cache_video_pkts_[index].ts = pkt->get_avsync_time();
|
cache_video_pkts_[index].ts = pkt->get_avsync_time();
|
||||||
|
cache_video_pkts_[index].rtp_ts = pkt->header.get_timestamp();
|
||||||
|
|
||||||
// check whether to recovery lost packet and can construct a video frame
|
// check whether to recovery lost packet and can construct a video frame
|
||||||
if (lost_sn_ == pkt->header.get_sequence()) {
|
if (lost_sn_ == pkt->header.get_sequence()) {
|
||||||
|
@ -1525,6 +1529,7 @@ srs_error_t SrsRtmpFromRtcBridger::packet_video_key_frame(SrsRtpPacket* pkt)
|
||||||
cache_video_pkts_[index].pkt = pkt;
|
cache_video_pkts_[index].pkt = pkt;
|
||||||
cache_video_pkts_[index].sn = pkt->header.get_sequence();
|
cache_video_pkts_[index].sn = pkt->header.get_sequence();
|
||||||
cache_video_pkts_[index].ts = pkt->get_avsync_time();
|
cache_video_pkts_[index].ts = pkt->get_avsync_time();
|
||||||
|
cache_video_pkts_[index].rtp_ts = pkt->header.get_timestamp();
|
||||||
|
|
||||||
int32_t sn = lost_sn_;
|
int32_t sn = lost_sn_;
|
||||||
uint16_t tail_sn = 0;
|
uint16_t tail_sn = 0;
|
||||||
|
@ -1622,6 +1627,7 @@ srs_error_t SrsRtmpFromRtcBridger::packet_video_rtmp(const uint16_t start, const
|
||||||
cache_video_pkts_[index].in_use = false;
|
cache_video_pkts_[index].in_use = false;
|
||||||
cache_video_pkts_[index].pkt = NULL;
|
cache_video_pkts_[index].pkt = NULL;
|
||||||
cache_video_pkts_[index].ts = 0;
|
cache_video_pkts_[index].ts = 0;
|
||||||
|
cache_video_pkts_[index].rtp_ts = 0;
|
||||||
cache_video_pkts_[index].sn = 0;
|
cache_video_pkts_[index].sn = 0;
|
||||||
|
|
||||||
SrsRtpFUAPayload2* fua_payload = dynamic_cast<SrsRtpFUAPayload2*>(pkt->payload());
|
SrsRtpFUAPayload2* fua_payload = dynamic_cast<SrsRtpFUAPayload2*>(pkt->payload());
|
||||||
|
@ -1692,7 +1698,7 @@ srs_error_t SrsRtmpFromRtcBridger::packet_video_rtmp(const uint16_t start, const
|
||||||
|
|
||||||
int32_t SrsRtmpFromRtcBridger::find_next_lost_sn(uint16_t current_sn, uint16_t& end_sn)
|
int32_t SrsRtmpFromRtcBridger::find_next_lost_sn(uint16_t current_sn, uint16_t& end_sn)
|
||||||
{
|
{
|
||||||
uint32_t last_ts = cache_video_pkts_[cache_index(header_sn_)].ts;
|
uint32_t last_rtp_ts = cache_video_pkts_[cache_index(header_sn_)].rtp_ts;
|
||||||
for (int i = 0; i < s_cache_size; ++i) {
|
for (int i = 0; i < s_cache_size; ++i) {
|
||||||
uint16_t lost_sn = current_sn + i;
|
uint16_t lost_sn = current_sn + i;
|
||||||
int index = cache_index(lost_sn);
|
int index = cache_index(lost_sn);
|
||||||
|
@ -1701,7 +1707,7 @@ int32_t SrsRtmpFromRtcBridger::find_next_lost_sn(uint16_t current_sn, uint16_t&
|
||||||
return lost_sn;
|
return lost_sn;
|
||||||
}
|
}
|
||||||
//check time first, avoid two small frame mixed case decode fail
|
//check time first, avoid two small frame mixed case decode fail
|
||||||
if (last_ts != cache_video_pkts_[index].ts) {
|
if (last_rtp_ts != cache_video_pkts_[index].rtp_ts) {
|
||||||
end_sn = lost_sn - 1;
|
end_sn = lost_sn - 1;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -1724,6 +1730,7 @@ void SrsRtmpFromRtcBridger::clear_cached_video()
|
||||||
srs_freep(cache_video_pkts_[i].pkt);
|
srs_freep(cache_video_pkts_[i].pkt);
|
||||||
cache_video_pkts_[i].sn = 0;
|
cache_video_pkts_[i].sn = 0;
|
||||||
cache_video_pkts_[i].ts = 0;
|
cache_video_pkts_[i].ts = 0;
|
||||||
|
cache_video_pkts_[i].rtp_ts = 0;
|
||||||
cache_video_pkts_[i].in_use = false;
|
cache_video_pkts_[i].in_use = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -300,6 +300,7 @@ private:
|
||||||
bool in_use;
|
bool in_use;
|
||||||
uint16_t sn;
|
uint16_t sn;
|
||||||
uint32_t ts;
|
uint32_t ts;
|
||||||
|
uint32_t rtp_ts;
|
||||||
SrsRtpPacket* pkt;
|
SrsRtpPacket* pkt;
|
||||||
};
|
};
|
||||||
const static uint16_t s_cache_size = 512;
|
const static uint16_t s_cache_size = 512;
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
#define VERSION_MAJOR 4
|
#define VERSION_MAJOR 4
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 194
|
#define VERSION_REVISION 196
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue