Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-12-03 22:51:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4785f882d47b6ab6d7185207528ad4ba9ae2b02f
4785f882
1 parent
850946bb
for bug #241, refine the max buffer and kbps.
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
9 行增加
和
3 行删除
trunk/src/app/srs_app_recv_thread.cpp
trunk/src/rtmp/srs_protocol_buffer.cpp
trunk/src/app/srs_app_recv_thread.cpp
查看文件 @
4785f88
...
...
@@ -35,7 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// use the bitrate in kbps to calc the max sleep time.
#define SRS_MR_MAX_BITRATE_KBPS 10000
#define SRS_MR_AVERAGE_BITRATE_KBPS 1000
#define SRS_MR_MIN_BITRATE_KBPS
64
#define SRS_MR_MIN_BITRATE_KBPS
32
// the max sleep time in ms
#define SRS_MR_MAX_SLEEP_MS 3000
// the max small bytes to group
...
...
trunk/src/rtmp/srs_protocol_buffer.cpp
查看文件 @
4785f88
...
...
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_kernel_error.hpp>
#include <srs_kernel_log.hpp>
#include <srs_kernel_utility.hpp>
// 4KB=4096
// 8KB=8192
...
...
@@ -33,6 +34,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// 64KB=65536
// @see https://github.com/winlinvip/simple-rtmp-server/issues/241
#define SOCKET_READ_SIZE 4096
// the max buffer for user space socket buffer.
#define SOCKET_MAX_BUF 65536
IMergeReadHandler
::
IMergeReadHandler
()
{
...
...
@@ -127,8 +130,11 @@ void SrsBuffer::set_merge_read(bool v, int max_buffer, IMergeReadHandler* handle
merged_read
=
v
;
_handler
=
handler
;
if
(
v
&&
max_buffer
!=
nb_buffer
)
{
reset_buffer
(
max_buffer
);
// limit the max buffer.
int
buffer_size
=
srs_min
(
max_buffer
,
SOCKET_MAX_BUF
);
if
(
v
&&
buffer_size
!=
nb_buffer
)
{
reset_buffer
(
buffer_size
);
}
}
...
...
请
注册
或
登录
后发表评论