From 404bc565a1e6d961f0ade564c3422845b7b176dc Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 9 Jul 2015 15:39:02 +0800 Subject: [PATCH] refine the pithy print mechenism. --- trunk/src/app/srs_app_pithy_print.hpp | 35 +++++++++++++++------------ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/trunk/src/app/srs_app_pithy_print.hpp b/trunk/src/app/srs_app_pithy_print.hpp index 9e333b83d..96c0f7055 100644 --- a/trunk/src/app/srs_app_pithy_print.hpp +++ b/trunk/src/app/srs_app_pithy_print.hpp @@ -55,22 +55,25 @@ public: }; /** -* the stage is used for a collection of object to do print, -* the print time in a stage is constant and not changed. -* for example, stage #1 for all play clients, print time is 3s, -* if there is 10clients, then all clients should print in 10*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: