mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add bandwidth workflow
This commit is contained in:
parent
084ad79534
commit
908f0d87e9
2 changed files with 121 additions and 92 deletions
29
README.md
29
README.md
|
@ -131,6 +131,35 @@ Stream Architecture:
|
|||
| ...) | +-> DVR --------------+-> FILE |
|
||||
+-----------+-------------------------+----------------+
|
||||
</pre>
|
||||
Bandwidth Test Workflow:
|
||||
<pre>
|
||||
+------------+ +----------+
|
||||
| Client | | Server |
|
||||
+-----+------+ +-----+----+
|
||||
| |
|
||||
| connect vhost------> | if vhost enable bandwidth,
|
||||
| <-----result(success) | do bandwidth check.
|
||||
| |
|
||||
| <----call(start play) | onSrsBandCheckStartPlayBytes
|
||||
| result(playing)-----> | onSrsBandCheckStartingPlayBytes
|
||||
| <-------data(playing) | onSrsBandCheckStartingPlayBytes
|
||||
| <-----call(stop play) | onSrsBandCheckStopPlayBytes
|
||||
| result(stopped)-----> | onSrsBandCheckStoppedPlayBytes
|
||||
| |
|
||||
| <-call(start publish) | onSrsBandCheckStartPublishBytes
|
||||
| result(publishing)--> | onSrsBandCheckStartingPublishBytes
|
||||
| data(publishing)----> | onSrsBandCheckStartingPublishBytes
|
||||
| <--call(stop publish) | onSrsBandCheckStopPublishBytes
|
||||
| result(stopped)(1)--> | onSrsBandCheckStoppedPublishBytes
|
||||
| |
|
||||
| <--------------report |
|
||||
| final(2)------------> | finalClientPacket
|
||||
| <END> |
|
||||
1. when flash client, server ignore the publish stopped result,
|
||||
and directly send the report to flash client.
|
||||
2. flash client only. when got report, flash client should send out
|
||||
a final packet and close the connection immediately.
|
||||
</pre>
|
||||
|
||||
### System Requirements
|
||||
Supported operating systems and hardware:
|
||||
|
|
4
trunk/src/core/srs_core_bandwidth.hpp
Normal file → Executable file
4
trunk/src/core/srs_core_bandwidth.hpp
Normal file → Executable file
|
@ -57,10 +57,10 @@ class SrsRtmp;
|
|||
* | result(publishing)--> | onSrsBandCheckStartingPublishBytes
|
||||
* | data(publishing)----> | onSrsBandCheckStartingPublishBytes
|
||||
* | <--call(stop publish) | onSrsBandCheckStopPublishBytes
|
||||
* | result(stopped)-----> | onSrsBandCheckStoppedPublishBytes(1)
|
||||
* | result(stopped)(1)--> | onSrsBandCheckStoppedPublishBytes
|
||||
* | |
|
||||
* | <--------------report |
|
||||
* | final---------------> | finalClientPacket(2)
|
||||
* | final(2)------------> | finalClientPacket
|
||||
* | <END> |
|
||||
* 1. when flash client, server ignore the publish stopped result,
|
||||
* and directly send the report to flash client.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue