|
|
@ -55,22 +55,25 @@ public:
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* the stage is used for a collection of object to do print,
|
|
|
|
* the stage is used for a collection of object to do print,
|
|
|
|
* the print time in a stage is constant and not changed.
|
|
|
|
* the print time in a stage is constant and not changed,
|
|
|
|
* for example, stage #1 for all play clients, print time is 3s,
|
|
|
|
* that is, we always got one message to print every specified time.
|
|
|
|
* if there is 10clients, then all clients should print in 10*3s.
|
|
|
|
*
|
|
|
|
* Usage:
|
|
|
|
* for example, stage #1 for all play clients, print time is 3s,
|
|
|
|
SrsPithyPrint* pprint = SrsPithyPrint::create_rtmp_play();
|
|
|
|
* if there is 1client, it will print every 3s.
|
|
|
|
SrsAutoFree(SrsPithyPrint, pprint);
|
|
|
|
* if there is 10clients, random select one to print every 3s.
|
|
|
|
while (true) {
|
|
|
|
* Usage:
|
|
|
|
pprint->elapse();
|
|
|
|
SrsPithyPrint* pprint = SrsPithyPrint::create_rtmp_play();
|
|
|
|
if (pprint->can_print()) {
|
|
|
|
SrsAutoFree(SrsPithyPrint, pprint);
|
|
|
|
// print pithy message.
|
|
|
|
while (true) {
|
|
|
|
// user can get the elapse time by: pprint->age()
|
|
|
|
pprint->elapse();
|
|
|
|
}
|
|
|
|
if (pprint->can_print()) {
|
|
|
|
// read and write RTMP messages.
|
|
|
|
// print pithy message.
|
|
|
|
}
|
|
|
|
// user can get the elapse time by: pprint->age()
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
// read and write RTMP messages.
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
class SrsPithyPrint
|
|
|
|
class SrsPithyPrint
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|