mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 20:01:56 +00:00
Merge branch 'srs.master'
This commit is contained in:
commit
9d5b92ae57
4 changed files with 11 additions and 16 deletions
|
@ -242,6 +242,7 @@ Supported operating systems and hardware:
|
||||||
* 2013-10-17, Created.<br/>
|
* 2013-10-17, Created.<br/>
|
||||||
|
|
||||||
## History
|
## History
|
||||||
|
* v2.0, 2014-11-08, fix [#194](https://github.com/winlinvip/simple-rtmp-server/issues/194), optmized st for timeout recv. pulse to 500ms. 2.0.14.
|
||||||
* v2.0, 2014-11-08, fix [#195](https://github.com/winlinvip/simple-rtmp-server/issues/195), remove the confuse code st_usleep(0). 2.0.13.
|
* v2.0, 2014-11-08, fix [#195](https://github.com/winlinvip/simple-rtmp-server/issues/195), remove the confuse code st_usleep(0). 2.0.13.
|
||||||
* v2.0, 2014-11-08, fix [#191](https://github.com/winlinvip/simple-rtmp-server/issues/191), configure --export-librtmp-project and --export-librtmp-single. 2.0.11.
|
* v2.0, 2014-11-08, fix [#191](https://github.com/winlinvip/simple-rtmp-server/issues/191), configure --export-librtmp-project and --export-librtmp-single. 2.0.11.
|
||||||
* v2.0, 2014-11-08, fix [#66](https://github.com/winlinvip/simple-rtmp-server/issues/66), srs-librtmp support write h264 raw packet. 2.0.9.
|
* v2.0, 2014-11-08, fix [#66](https://github.com/winlinvip/simple-rtmp-server/issues/66), srs-librtmp support write h264 raw packet. 2.0.9.
|
||||||
|
@ -442,10 +443,12 @@ Supported operating systems and hardware:
|
||||||
|
|
||||||
Performance benchmark history, on virtual box:
|
Performance benchmark history, on virtual box:
|
||||||
|
|
||||||
* 2013-11-28, SRS 0.5.0, 1800clients, 90%CPU, 41MB. [benchmark](https://github.com/winlinvip/simple-rtmp-server/commit/023e23bc8261bec15a70a7ae932098fb4f82b679)
|
* 2013-11-28, SRS 0.5.0, 1800clients, 90%CPU, 41MB. [benchmark](https://github.com/winlinvip/simple-rtmp-server/commit/023e23bc8261bec15a70a7ae932098fb4f82b679)
|
||||||
* 2014-07-12, SRS 0.9.156, 1800clients, 68%CPU, 38MB. [benchmark](https://github.com/winlinvip/simple-rtmp-server/commit/e2d273f4939348374bf9644df9d54c4293b39c1a)
|
* 2014-07-12, SRS 0.9.156, 1800clients, 68%CPU, 38MB. [benchmark](https://github.com/winlinvip/simple-rtmp-server/commit/e2d273f4939348374bf9644df9d54c4293b39c1a)
|
||||||
* 2014-07-12, SRS 0.9.156, 2700clients, 89%CPU, 61MB. [benchmark](https://github.com/winlinvip/simple-rtmp-server/commit/6d12280b7cc54c465b1caf8b1402149e77c4c7d9)
|
* 2014-07-12, SRS 0.9.156, 2700clients, 89%CPU, 61MB. [benchmark](https://github.com/winlinvip/simple-rtmp-server/commit/6d12280b7cc54c465b1caf8b1402149e77c4c7d9)
|
||||||
* 2014-11-11, SRS 1.0.5/2.0.12, 2700clients, 85%CPU, 66MB.
|
* 2014-11-11, SRS 1.0.5, 2700clients, 85%CPU, 66MB. (1.0 equals 2.0.12)
|
||||||
|
* 2014-11-12, SRS 2.0.14, 2700clients, 69%CPU, 59MB.
|
||||||
|
* 2014-11-12, SRS 2.0.14, 3500clients, 95%CPU, 78MB.
|
||||||
|
|
||||||
Latest benchmark(2014-07-12):
|
Latest benchmark(2014-07-12):
|
||||||
|
|
||||||
|
|
|
@ -516,10 +516,7 @@ int SrsRtmpConn::playing(SrsSource* source)
|
||||||
SrsAutoFree(SrsConsumer, consumer);
|
SrsAutoFree(SrsConsumer, consumer);
|
||||||
srs_verbose("consumer created success.");
|
srs_verbose("consumer created success.");
|
||||||
|
|
||||||
// TODO: FIXME: remove following.
|
|
||||||
rtmp->set_recv_timeout(SRS_CONSTS_RTMP_PULSE_TIMEOUT_US);
|
rtmp->set_recv_timeout(SRS_CONSTS_RTMP_PULSE_TIMEOUT_US);
|
||||||
//rtmp->set_recv_timeout(ST_UTIME_NO_TIMEOUT);
|
|
||||||
//rtmp->set_send_timeout(ST_UTIME_NO_TIMEOUT);
|
|
||||||
|
|
||||||
// initialize other components
|
// initialize other components
|
||||||
SrsPithyPrint pithy_print(SRS_CONSTS_STAGE_PLAY_USER);
|
SrsPithyPrint pithy_print(SRS_CONSTS_STAGE_PLAY_USER);
|
||||||
|
@ -531,6 +528,8 @@ int SrsRtmpConn::playing(SrsSource* source)
|
||||||
// collect elapse for pithy print.
|
// collect elapse for pithy print.
|
||||||
pithy_print.elapse();
|
pithy_print.elapse();
|
||||||
|
|
||||||
|
// read message when no data to send.
|
||||||
|
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/194
|
||||||
// read from client.
|
// read from client.
|
||||||
if (true) {
|
if (true) {
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
|
@ -561,13 +560,6 @@ int SrsRtmpConn::playing(SrsSource* source)
|
||||||
srs_error("get messages from consumer failed. ret=%d", ret);
|
srs_error("get messages from consumer failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// no data, sleep a while.
|
|
||||||
// for the poll_fd maybe not active, and no message.
|
|
||||||
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/194
|
|
||||||
//if (count <= 0) {
|
|
||||||
// st_usleep(SRS_CONSTS_RTMP_PULSE_TIMEOUT_US);
|
|
||||||
//}
|
|
||||||
|
|
||||||
// reportable
|
// reportable
|
||||||
if (pithy_print.can_print()) {
|
if (pithy_print.can_print()) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR 2
|
#define VERSION_MAJOR 2
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 13
|
#define VERSION_REVISION 14
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "SRS"
|
#define RTMP_SIG_SRS_KEY "SRS"
|
||||||
#define RTMP_SIG_SRS_ROLE "origin/edge server"
|
#define RTMP_SIG_SRS_ROLE "origin/edge server"
|
||||||
|
|
|
@ -67,18 +67,18 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// the following is the timeout for rtmp protocol,
|
// the following is the timeout for rtmp protocol,
|
||||||
// to avoid death connection.
|
// to avoid death connection.
|
||||||
|
|
||||||
// the timeout to wait client data,
|
// the timeout to send data to client,
|
||||||
// if timeout, close the connection.
|
// if timeout, close the connection.
|
||||||
#define SRS_CONSTS_RTMP_SEND_TIMEOUT_US (int64_t)(30*1000*1000LL)
|
#define SRS_CONSTS_RTMP_SEND_TIMEOUT_US (int64_t)(30*1000*1000LL)
|
||||||
|
|
||||||
// the timeout to send data to client,
|
// the timeout to wait client data,
|
||||||
// if timeout, close the connection.
|
// if timeout, close the connection.
|
||||||
#define SRS_CONSTS_RTMP_RECV_TIMEOUT_US (int64_t)(30*1000*1000LL)
|
#define SRS_CONSTS_RTMP_RECV_TIMEOUT_US (int64_t)(30*1000*1000LL)
|
||||||
|
|
||||||
// the timeout to wait for client control message,
|
// the timeout to wait for client control message,
|
||||||
// if timeout, we generally ignore and send the data to client,
|
// if timeout, we generally ignore and send the data to client,
|
||||||
// generally, it's the pulse time for data seding.
|
// generally, it's the pulse time for data seding.
|
||||||
#define SRS_CONSTS_RTMP_PULSE_TIMEOUT_US (int64_t)(200*1000LL)
|
#define SRS_CONSTS_RTMP_PULSE_TIMEOUT_US (int64_t)(500*1000LL)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* max rtmp header size:
|
* max rtmp header size:
|
||||||
|
|
Loading…
Reference in a new issue