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

Refactor: Extract SrsNetworkKbps from SrsKbps. v5.0.53

This commit is contained in:
winlin 2022-08-30 13:41:27 +08:00
parent 937605b18c
commit 2c259bd95b
20 changed files with 949 additions and 662 deletions

View file

@ -17,7 +17,7 @@ class SrsRtmpClient;
class SrsCommonMessage;
class SrsSharedPtrMessage;
class SrsPacket;
class SrsKbps;
class SrsNetworkKbps;
class SrsWallClock;
// The simple RTMP client, provides friendly APIs.
@ -38,8 +38,7 @@ protected:
private:
SrsTcpClient* transport;
SrsRtmpClient* client;
SrsKbps* kbps;
SrsWallClock* clk;
SrsNetworkKbps* kbps;
int stream_id;
public:
// Constructor.
@ -59,8 +58,8 @@ protected:
public:
virtual srs_error_t publish(int chunk_size, bool with_vhost = true, std::string* pstream = NULL);
virtual srs_error_t play(int chunk_size, bool with_vhost = true, std::string* pstream = NULL);
virtual void kbps_sample(const char* label, int64_t age);
virtual void kbps_sample(const char* label, int64_t age, int msgs);
virtual void kbps_sample(const char* label, srs_utime_t age);
virtual void kbps_sample(const char* label, srs_utime_t age, int msgs);
virtual int sid();
public:
virtual srs_error_t recv_message(SrsCommonMessage** pmsg);