1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

set send socket buf. mw/mr sleep default to 350.

This commit is contained in:
winlin 2014-12-05 11:24:05 +08:00
parent 4d1c162ebd
commit fad6074a25
10 changed files with 101 additions and 36 deletions

View file

@ -421,13 +421,14 @@ int SrsPublishRecvThread::on_reload_vhost_mr(string vhost)
void SrsPublishRecvThread::set_socket_buffer(int sleep_ms)
{
// the underlayer api will set to SRS_MR_SOCKET_BUFFER bytes.
// the bytes:
// 4KB=4096, 8KB=8192, 16KB=16384, 32KB=32768, 64KB=65536,
// 128KB=131072, 256KB=262144, 512KB=524288
// the buffer should set to SRS_MR_MAX_SLEEP_MS*kbps/8,
// the buffer should set to sleep*kbps/8,
// for example, your system delivery stream in 1000kbps,
// sleep 800ms for small bytes, the buffer should set to:
// 800*1000/8=100000B(about 128KB).
// other examples:
// 2000*3000/8=750000B(about 732KB).
// 2000*5000/8=1250000B(about 1220KB).
int kbps = 5000;