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-07-16 10:19:50 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
88dc1523d8b4b4c23966f5038bf845d24e7fc37b
88dc1523
1 parent
7945a427
refine code, add comments for bandwidth; remove the bwtc configure script test item.
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
42 行增加
和
8 行删除
trunk/scripts/test_configure.sh
trunk/src/app/srs_app_bandwidth.hpp
trunk/scripts/test_configure.sh
查看文件 @
88dc152
...
...
@@ -119,12 +119,6 @@ ok_msg "test \" ${item} \""
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
failed_msg
"test
\"
${
item
}
\"
failed. ret=
$ret
"
;
exit
$ret
;
fi
ok_msg
"test
\"
${
item
}
\"
success"
item
=
"./configure --fast --with-bwtc"
ok_msg
"test
\"
${
item
}
\"
"
(
./configure --fast --with-bwtc
&&
make
)
>>
$log
2>&1
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
failed_msg
"test
\"
${
item
}
\"
failed. ret=
$ret
"
;
exit
$ret
;
fi
ok_msg
"test
\"
${
item
}
\"
success"
item
=
"./configure --fast --with-research"
ok_msg
"test
\"
${
item
}
\"
"
(
./configure --fast --with-research
&&
make
)
>>
$log
2>&1
...
...
trunk/src/app/srs_app_bandwidth.hpp
查看文件 @
88dc152
...
...
@@ -141,20 +141,60 @@ private:
* @param limit, the bandwidth limit object, to slowdown if exceed the kbps.
*/
virtual
int
do_bandwidth_check
(
SrsKbpsLimit
*
limit
);
// play check/test, downloading bandwidth kbps.
private:
/**
* play check/test, downloading bandwidth kbps.
* start play/download bandwidth check/test,
* send start-play command to client, client must response starting-play
* to start the test.
*/
virtual
int
play_start
(
SrsBandwidthSample
*
sample
,
SrsKbpsLimit
*
limit
);
/**
* do play/download bandwidth check/test,
* server send call messages to client in specified time,
* calc the time and bytes sent, then we got the kbps.
*/
virtual
int
play_checking
(
SrsBandwidthSample
*
sample
,
SrsKbpsLimit
*
limit
);
/**
* stop play/download bandwidth check/test,
* send stop-play command to client, client must response stopped-play
* to stop the test.
*/
virtual
int
play_stop
(
SrsBandwidthSample
*
sample
,
SrsKbpsLimit
*
limit
);
// publish check/test, publishing bandwidth kbps.
private:
/**
* publish check/test, publishing bandwidth kbps.
* start publish/upload bandwidth check/test,
* send start-publish command to client, client must response starting-publish
* to start the test.
*/
virtual
int
publish_start
(
SrsBandwidthSample
*
sample
,
SrsKbpsLimit
*
limit
);
/**
* do publish/upload bandwidth check/test,
* client send call messages to client in specified time,
* server calc the time and bytes received, then we got the kbps.
* @remark, for linux client, it will send a stop publish client, server will stop publishing.
* then enter the publish-stop stage with client.
* @remark, for flash client, it will send many many call messages, that is,
* the send queue is fullfill with call messages, so we should never expect the
* response message in the publish-stop stage.
*/
virtual
int
publish_checking
(
SrsBandwidthSample
*
sample
,
SrsKbpsLimit
*
limit
);
/**
* stop publish/upload bandwidth check/test,
* send stop-publish command to client,
* for linux client, always expect a stopped-publish response from client,
* for flash client, the sent queue is fullfill with publishing call messages,
* so server never expect the stopped-publish from it.
*/
virtual
int
publish_stop
(
SrsBandwidthSample
*
sample
,
SrsKbpsLimit
*
limit
);
private
:
/**
* report and final packet
* report a finish packet, with the bytes/time/kbps bandwidth check/test result,
* for linux client, server always expect a final packet from client,
* for flash client, the sent queue is fullfill with publishing call messages,
* so server never expect the final packet from it.
*/
virtual
int
finial
(
SrsBandwidthSample
&
play_sample
,
SrsBandwidthSample
&
publish_sample
,
int64_t
start_time
,
int64_t
&
end_time
);
};
...
...
请
注册
或
登录
后发表评论