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

Refine typo in app.

This commit is contained in:
winlin 2019-04-30 08:24:52 +08:00
parent aac8a13f42
commit 45009785fb
27 changed files with 409 additions and 703 deletions

View file

@ -28,9 +28,7 @@
#include <srs_app_reload.hpp>
/**
* the stage info to calc the age.
*/
// The stage info to calc the age.
class SrsStageInfo : public ISrsReloadHandler
{
public:
@ -50,26 +48,24 @@ public:
virtual srs_error_t on_reload_pithy_print();
};
/**
* the stage is used for a collection of object to do print,
* the print time in a stage is constant and not changed,
* that is, we always got one message to print every specified time.
*
* for example, stage #1 for all play clients, print time is 3s,
* if there is 1client, it will print every 3s.
* if there is 10clients, random select one to print every 3s.
* Usage:
* SrsPithyPrint* pprint = SrsPithyPrint::create_rtmp_play();
* SrsAutoFree(SrsPithyPrint, pprint);
* while (true) {
* pprint->elapse();
* if (pprint->can_print()) {
* // print pithy message.
* // user can get the elapse time by: pprint->age()
* }
* // read and write RTMP messages.
* }
*/
// The stage is used for a collection of object to do print,
// the print time in a stage is constant and not changed,
// that is, we always got one message to print every specified time.
//
// For example, stage #1 for all play clients, print time is 3s,
// if there is 1client, it will print every 3s.
// if there is 10clients, random select one to print every 3s.
// Usage:
// SrsPithyPrint* pprint = SrsPithyPrint::create_rtmp_play();
// SrsAutoFree(SrsPithyPrint, pprint);
// while (true) {
// pprint->elapse();
// if (pprint->can_print()) {
// // print pithy message.
// // user can get the elapse time by: pprint->age()
// }
// // read and write RTMP messages.
// }
class SrsPithyPrint
{
private:
@ -93,26 +89,16 @@ public:
static SrsPithyPrint* create_http_stream_cache();
virtual ~SrsPithyPrint();
private:
/**
* enter the specified stage, return the client id.
*/
// Enter the specified stage, return the client id.
virtual int enter_stage();
/**
* leave the specified stage, release the client id.
*/
// Leave the specified stage, release the client id.
virtual void leave_stage();
public:
/**
* auto calc the elapse time
*/
// Auto calc the elapse time
virtual void elapse();
/**
* whether current client can print.
*/
// Whether current client can print.
virtual bool can_print();
/**
* get the elapsed time in srs_utime_t.
*/
// Get the elapsed time in srs_utime_t.
virtual srs_utime_t age();
};