mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #2136: API: Cleanup no active streams for statistics. v4.0.256
This commit is contained in:
parent
41155b7789
commit
8e6d207e56
4 changed files with 50 additions and 17 deletions
|
@ -173,6 +173,10 @@ public:
|
|||
// only got the request object, so the client specified by id maybe not
|
||||
// exists in stat.
|
||||
virtual void on_disconnect(std::string id);
|
||||
private:
|
||||
// Cleanup the stream if stream is not active and for the last client.
|
||||
void cleanup_stream(SrsStatisticStream* stream);
|
||||
public:
|
||||
// Sample the kbps, add delta bytes of conn.
|
||||
// Use kbps_sample() to get all result of kbps stat.
|
||||
virtual void kbps_add_delta(std::string id, ISrsKbpsDelta* delta);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue