mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Stat the WebRTC clients bandwidth. v5.0.50
This commit is contained in:
parent
d7c2d5ab01
commit
4fe90d4885
5 changed files with 49 additions and 2 deletions
|
@ -51,6 +51,8 @@ class SrsStatistic;
|
|||
class SrsRtcUserConfig;
|
||||
class SrsRtcSendTrack;
|
||||
class SrsRtcPublishStream;
|
||||
class SrsKbps;
|
||||
class SrsWallClock;
|
||||
|
||||
const uint8_t kSR = 200;
|
||||
const uint8_t kRR = 201;
|
||||
|
@ -433,7 +435,7 @@ private:
|
|||
//
|
||||
// For performance, we use non-public from resource,
|
||||
// see https://stackoverflow.com/questions/3747066/c-cannot-convert-from-base-a-to-derived-type-b-via-virtual-base-a
|
||||
class SrsRtcConnection : public ISrsResource, public ISrsDisposingHandler, public ISrsExpire
|
||||
class SrsRtcConnection : public ISrsResource, public ISrsDisposingHandler, public ISrsExpire, public ISrsKbpsDelta
|
||||
{
|
||||
friend class SrsSecurityTransport;
|
||||
friend class SrsRtcPlayStream;
|
||||
|
@ -490,6 +492,9 @@ private:
|
|||
SrsErrorPithyPrint* pli_epp;
|
||||
private:
|
||||
bool nack_enabled_;
|
||||
private:
|
||||
SrsKbps* kbps_;
|
||||
SrsWallClock* clock_;
|
||||
public:
|
||||
SrsRtcConnection(SrsRtcServer* s, const SrsContextId& cid);
|
||||
virtual ~SrsRtcConnection();
|
||||
|
@ -510,6 +515,9 @@ public:
|
|||
std::string username();
|
||||
// Get all addresses client used.
|
||||
std::vector<SrsUdpMuxSocket*> peer_addresses();
|
||||
// Interface ISrsKbpsDelta.
|
||||
public:
|
||||
virtual void remark(int64_t* in, int64_t* out);
|
||||
// Interface ISrsResource.
|
||||
public:
|
||||
virtual const SrsContextId& get_id();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue