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-01-01 21:39:06 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
993c5daec702af70321e89b5c9060a7e72a74056
993c5dae
1 parent
4d631d74
chunk size default to 60000, high performance. set chunk size when forward
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
37 行增加
和
4 行删除
trunk/conf/srs.conf
trunk/src/core/srs_core_config.hpp
trunk/src/core/srs_core_rtmp.cpp
trunk/conf/srs.conf
查看文件 @
993c5da
...
...
@@ -4,8 +4,8 @@ listen 1935;
# some client does not support chunk size change,
# however, most clients supports it and it can improve
# performance about 10%.
# default: 4096
chunk_size
65000
;
# default: 60000
chunk_size
60000
;
# the logs dir.
# if enabled ffmpeg, each stracoding stream will create a log file.
# default: ./objs/logs
...
...
@@ -26,7 +26,7 @@ vhost __defaultVhost__ {
# for which cannot identify the required vhost.
# for default demo.
vhost
demo
.
srs
.
com
{
chunk_size
4096
;
chunk_size
60000
;
enabled
on
;
gop_cache
on
;
queue_length
30
;
...
...
trunk/src/core/srs_core_config.hpp
查看文件 @
993c5da
...
...
@@ -57,7 +57,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// the interval in seconds for bandwidth check
#define SRS_CONF_DEFAULT_BANDWIDTH_LIMIT_KBPS 1000
#define SRS_CONF_DEFAULT_CHUNK_SIZE 4096
// the default chunk size for system.
#define SRS_CONF_DEFAULT_CHUNK_SIZE 60000
#define SRS_STAGE_PLAY_USER_INTERVAL_MS 1300
#define SRS_STAGE_PUBLISH_USER_INTERVAL_MS 1100
...
...
trunk/src/core/srs_core_rtmp.cpp
查看文件 @
993c5da
...
...
@@ -391,12 +391,44 @@ int SrsRtmpClient::play(string stream, int stream_id)
}
}
// SetChunkSize
if
(
true
)
{
SrsCommonMessage
*
msg
=
new
SrsCommonMessage
();
SrsSetChunkSizePacket
*
pkt
=
new
SrsSetChunkSizePacket
();
pkt
->
chunk_size
=
SRS_CONF_DEFAULT_CHUNK_SIZE
;
msg
->
set_packet
(
pkt
,
0
);
if
((
ret
=
protocol
->
send_message
(
msg
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"send set chunk size failed. "
"stream=%s, chunk_size=%d, ret=%d"
,
stream
.
c_str
(),
SRS_CONF_DEFAULT_CHUNK_SIZE
,
ret
);
return
ret
;
}
}
return
ret
;
}
int
SrsRtmpClient
::
publish
(
string
stream
,
int
stream_id
)
{
int
ret
=
ERROR_SUCCESS
;
// SetChunkSize
if
(
true
)
{
SrsCommonMessage
*
msg
=
new
SrsCommonMessage
();
SrsSetChunkSizePacket
*
pkt
=
new
SrsSetChunkSizePacket
();
pkt
->
chunk_size
=
SRS_CONF_DEFAULT_CHUNK_SIZE
;
msg
->
set_packet
(
pkt
,
0
);
if
((
ret
=
protocol
->
send_message
(
msg
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"send set chunk size failed. "
"stream=%s, chunk_size=%d, ret=%d"
,
stream
.
c_str
(),
SRS_CONF_DEFAULT_CHUNK_SIZE
,
ret
);
return
ret
;
}
}
// publish(stream)
if
(
true
)
{
...
...
请
注册
或
登录
后发表评论