Merge branch 'srs.master'

pull/133/head
winlin 10 years ago
commit 94df80dc39

@ -513,14 +513,19 @@ int SrsRtmpConn::playing(SrsSource* source)
SrsAutoFree(SrsConsumer, consumer); SrsAutoFree(SrsConsumer, consumer);
srs_verbose("consumer created success."); srs_verbose("consumer created success.");
rtmp->set_recv_timeout(SRS_CONSTS_RTMP_PULSE_TIMEOUT_US);
// initialize other components // initialize other components
SrsPithyPrint pithy_print(SRS_CONSTS_STAGE_PLAY_USER); SrsPithyPrint pithy_print(SRS_CONSTS_STAGE_PLAY_USER);
SrsMessageArray msgs(SYS_CONSTS_MAX_PLAY_SEND_MSGS); SrsMessageArray msgs(SYS_CONSTS_MAX_PLAY_SEND_MSGS);
bool user_specified_duration_to_stop = (req->duration > 0); bool user_specified_duration_to_stop = (req->duration > 0);
int64_t starttime = -1; 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) { while (true) {
// TODO: to use isolate thread to recv, can improve about 5% performance. // TODO: to use isolate thread to recv, can improve about 5% performance.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/196 // @see: https://github.com/winlinvip/simple-rtmp-server/issues/196

@ -212,7 +212,9 @@ private:
// peer out // peer out
private: 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; iovec* out_iovs;
int nb_out_iovs; int nb_out_iovs;

Loading…
Cancel
Save