diff --git a/trunk/src/app/srs_app_rtmp_conn.cpp b/trunk/src/app/srs_app_rtmp_conn.cpp index 8fcc3625c..e94913df9 100644 --- a/trunk/src/app/srs_app_rtmp_conn.cpp +++ b/trunk/src/app/srs_app_rtmp_conn.cpp @@ -513,14 +513,19 @@ int SrsRtmpConn::playing(SrsSource* source) SrsAutoFree(SrsConsumer, consumer); srs_verbose("consumer created success."); - rtmp->set_recv_timeout(SRS_CONSTS_RTMP_PULSE_TIMEOUT_US); - // initialize other components SrsPithyPrint pithy_print(SRS_CONSTS_STAGE_PLAY_USER); SrsMessageArray msgs(SYS_CONSTS_MAX_PLAY_SEND_MSGS); bool user_specified_duration_to_stop = (req->duration > 0); int64_t starttime = -1; + // TODO: use isolate thread to recv, + // @see: https://github.com/winlinvip/simple-rtmp-server/issues/196 + // the performance bottleneck not in the timeout recv, but + // in the multiple messages send, so it's ok for timeout recv, + // @see https://github.com/winlinvip/simple-rtmp-server/issues/194 + rtmp->set_recv_timeout(SRS_CONSTS_RTMP_PULSE_TIMEOUT_US); + while (true) { // TODO: to use isolate thread to recv, can improve about 5% performance. // @see: https://github.com/winlinvip/simple-rtmp-server/issues/196 diff --git a/trunk/src/rtmp/srs_protocol_stack.hpp b/trunk/src/rtmp/srs_protocol_stack.hpp index f19b3f309..27f671151 100644 --- a/trunk/src/rtmp/srs_protocol_stack.hpp +++ b/trunk/src/rtmp/srs_protocol_stack.hpp @@ -212,7 +212,9 @@ private: // peer out private: /** - * cache for multiple messages send + * cache for multiple messages send, + * initialize to iovec[SRS_CONSTS_IOVS_MAX] and realloc when consumed, + * it's ok to realloc the iovs cache, for all ptr is ok. */ iovec* out_iovs; int nb_out_iovs;