mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine SrsPithyPrint.age or SrsIngesterFFMPEG.alive in time unit.
This commit is contained in:
parent
522cbf1df8
commit
283c4c7449
4 changed files with 10 additions and 10 deletions
|
@ -62,9 +62,9 @@ string SrsIngesterFFMPEG::uri()
|
|||
return vhost + "/" + id;
|
||||
}
|
||||
|
||||
int SrsIngesterFFMPEG::alive()
|
||||
srs_utime_t SrsIngesterFFMPEG::alive()
|
||||
{
|
||||
return srsu2msi(srs_get_system_time() - starttime);
|
||||
return srs_get_system_time() - starttime;
|
||||
}
|
||||
|
||||
bool SrsIngesterFFMPEG::equals(string v)
|
||||
|
@ -454,8 +454,8 @@ void SrsIngester::show_ingest_log_message()
|
|||
|
||||
// reportable
|
||||
if (pprint->can_print()) {
|
||||
srs_trace("-> " SRS_CONSTS_LOG_INGESTER " time=%" PRId64 ", ingesters=%d, #%d(alive=%ds, %s)",
|
||||
pprint->age(), (int)ingesters.size(), index, ingester->alive() / 1000, ingester->uri().c_str());
|
||||
srs_trace("-> " SRS_CONSTS_LOG_INGESTER " time=%dms, ingesters=%d, #%d(alive=%dms, %s)",
|
||||
srsu2msi(pprint->age()), (int)ingesters.size(), index, srsu2msi(ingester->alive()), ingester->uri().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,8 +52,8 @@ public:
|
|||
virtual srs_error_t initialize(SrsFFMPEG* ff, std::string v, std::string i);
|
||||
// the ingest uri, [vhost]/[ingest id]
|
||||
virtual std::string uri();
|
||||
// the alive in ms.
|
||||
virtual int alive();
|
||||
// the alive in srs_utime_t.
|
||||
virtual srs_utime_t alive();
|
||||
virtual bool equals(std::string v, std::string i);
|
||||
virtual bool equals(std::string v);
|
||||
public:
|
||||
|
|
|
@ -224,9 +224,9 @@ bool SrsPithyPrint::can_print()
|
|||
return stage->can_print();
|
||||
}
|
||||
|
||||
int64_t SrsPithyPrint::age()
|
||||
srs_utime_t SrsPithyPrint::age()
|
||||
{
|
||||
return srsu2ms(_age);
|
||||
return _age;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -111,9 +111,9 @@ public:
|
|||
*/
|
||||
virtual bool can_print();
|
||||
/**
|
||||
* get the elapsed time in ms.
|
||||
* get the elapsed time in srs_utime_t.
|
||||
*/
|
||||
virtual int64_t age();
|
||||
virtual srs_utime_t age();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue