Skip to content

Commit

Permalink
RTC: Support high performance NO-COPY-NACK. 4.0.76
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Feb 28, 2021
1 parent c20d8fb commit 36ea673
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ For previous versions, please read:

## V4 changes

* v4.0, 2021-02-28, RTC: Support high performance NO-COPY-NACK. 4.0.76
* v4.0, 2021-02-27, RTC: Support object cache pool. 4.0.75
* v4.0, 2021-02-12, RTC: Support high performance timer about 25ms resolution. 4.0.72
* v4.0, 2021-02-10, RTC: Refine performance about 700+ streams. 4.0.71
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
#ifndef SRS_CORE_VERSION4_HPP
#define SRS_CORE_VERSION4_HPP

#define SRS_VERSION4_REVISION 75
#define SRS_VERSION4_REVISION 76

#endif

1 comment on commit 36ea673

@winlinvip
Copy link
Member Author

@winlinvip winlinvip commented on 36ea673 Feb 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

零拷贝,就是不拷贝,直接使用RTP packet。这样系统没有额外拷贝的RTP Packet。包的流程如下:

  1. Publisher,收到UDP包,创建RTP Packet,从UDP包中解析出RTP Packet。
  2. 这个包拷贝给Player,每个Player都有自己的一个RTP Packet,需要修改PT和SSRC等。注意payload是shared message,引用计数不拷贝。
  3. Publisher NACK直接将解析出来的RTP Packet放到NACK队列,避免额外的拷贝。
  4. Player NACK直接将自己的RTP Packet放到NACK队列,避免额外的拷贝。

目前是(具体以代码为准)默认禁用,开启nack.no_copy的方法如下:

vhost __defaultVhost__ {
    rtc {
        enabled on;
    }
    nack {
        enabled on;
        no_copy on;
    }
}

相关Commit如下:

  • 支持禁用零拷贝NACK,默认禁用:c20d8fb
  • Player零拷贝NACK:af0b50f
  • Publisher零拷贝NACK:8382f57

Please sign in to comment.