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
ae0871d696
3 changed files with 19 additions and 1 deletions
14
README.md
14
README.md
|
@ -1066,6 +1066,7 @@ The performance benchmark data and corelative commits are listed here.
|
|||
* See also: [Performance for x86/x64 Test Guide][v1_CN_Performance].
|
||||
* See also: [Performance for RaspberryPi][v1_CN_RaspberryPi].
|
||||
* For multiple processes performance, read [#775: REUSEPORT][bug #775] or OriginCluster([CN][v3_EN_OriginCluster]/[EN][v3_EN_OriginCluster]) or [go-oryx][oryx].
|
||||
* For RTC benchmark, please use [srs-bench](https://github.com/ossrs/srs-bench/tree/feature/rtc#usage).
|
||||
|
||||
<a name="play-rtmp-benchmark"></a>
|
||||
**Play RTMP benchmark**
|
||||
|
@ -1119,6 +1120,19 @@ The data for playing HTTP FLV was benchmarked by [SB][srs-bench]:
|
|||
| 2014-05-24 | 2.0.168 | 2.3k(2300) | players | 92% | 276MB | [code][p17] |
|
||||
| 2014-05-24 | 2.0.167 | 1.0k(1000) | players | 82% | 86MB | - |
|
||||
|
||||
<a name="rtc-benchmark"></a>
|
||||
**RTC benchmark**
|
||||
|
||||
The RTC benchmark data, by [srs-bench](https://github.com/ossrs/srs-bench/tree/feature/rtc#usage):
|
||||
|
||||
|
||||
| Update | SRS | Clients | Type | CPU | Memory | Threads |
|
||||
| ------------- | --------- | ------------- | ------------- | --------- | -------- | ------- |
|
||||
| 2021-03-31 | 4.0.87 | 550 | publishers | ~86% | 1.3GB | 1 |
|
||||
| 2021-03-31 | 4.0.87 | 800 | players | ~94% | 444MB | 1 |
|
||||
|
||||
> Note: CentOS7, 500Kbps, 4CPU, 2.5 GHz Intel Xeon Platinum 8163/8269CY.
|
||||
|
||||
<a name="latency-benchmark"></a>
|
||||
**Latency benchmark**
|
||||
|
||||
|
|
|
@ -1040,6 +1040,7 @@ srs_error_t SrsRtpPacket2::decode(SrsBuffer* buf)
|
|||
nalu_type = SrsAvcNaluType((uint8_t)(buf->head()[0] & kNalTypeMask));
|
||||
}
|
||||
|
||||
// TODO: FIXME: We should keep payload to NULL and return if buffer is empty.
|
||||
// If user set the decode handler, call it to set the payload.
|
||||
if (decode_handler) {
|
||||
decode_handler->on_before_decode_payload(this, buf, &payload_, &payload_type_);
|
||||
|
|
|
@ -294,8 +294,10 @@ private:
|
|||
private:
|
||||
// The original shared message, all RTP packets can refer to its data.
|
||||
// Note that the size of shared msg, is not the packet size, it's a larger aligned buffer.
|
||||
// @remark Note that it may point to the whole RTP packet(for RTP parser, which decode RTP packet from buffer),
|
||||
// and it may point to the RTP payload(for RTMP to RTP, which build RTP header and payload).
|
||||
SrsSharedPtrMessage* shared_buffer_;
|
||||
// The size of original packet.
|
||||
// The size of RTP packet or RTP payload.
|
||||
int actual_buffer_size_;
|
||||
// Helper fields.
|
||||
public:
|
||||
|
@ -333,6 +335,7 @@ public:
|
|||
// Parse the TWCC extension, ignore by default.
|
||||
void enable_twcc_decode() { header.enable_twcc_decode(); } // SrsRtpPacket2::enable_twcc_decode
|
||||
// Get and set the payload of packet.
|
||||
// @remark Note that return NULL if no payload.
|
||||
void set_payload(ISrsRtpPayloader* p, SrsRtpPacketPayloadType pt) { payload_ = p; payload_type_ = pt; }
|
||||
ISrsRtpPayloader* payload() { return payload_; }
|
||||
// Set the padding of RTP packet.
|
||||
|
|
Loading…
Reference in a new issue