Index: webrtc/p2p/base/port.h |
diff --git a/webrtc/p2p/base/port.h b/webrtc/p2p/base/port.h |
index 2c3b61b718307173d152a1c8f35ecf933b00aaed..190a374ce62f00c1a3a14910e75d79369cc8fc28 100644 |
--- a/webrtc/p2p/base/port.h |
+++ b/webrtc/p2p/base/port.h |
@@ -590,6 +590,17 @@ class Connection : public CandidatePairInterface, |
// Returns the last received time of any data, stun request, or stun |
// response in milliseconds |
int64_t last_received() const; |
+ // Returns the first time since which the connection has been in receiving |
+ // state. |
pthatcher1
2016/07/14 18:01:44
I think it should be more like the time at which w
honghaiz3
2016/07/14 23:15:01
Done.
|
+ int64_t continuously_receiving_since() const { |
+ return continuously_receiving_since_; |
+ } |
+ |
+ void reset_continuously_receiving_since(int64_t now) { |
+ if (continuously_receiving_since_ > 0) { |
+ continuously_receiving_since_ = now; |
+ } |
+ } |
bool stable(int64_t now) const; |
@@ -618,7 +629,7 @@ class Connection : public CandidatePairInterface, |
// Changes the state and signals if necessary. |
void set_write_state(WriteState value); |
- void set_receiving(bool value); |
+ void UpdateReceiving(int64_t now); |
void set_state(State state); |
void set_connected(bool value); |
@@ -648,6 +659,7 @@ class Connection : public CandidatePairInterface, |
// side |
int64_t last_data_received_; |
int64_t last_ping_response_received_; |
+ int64_t continuously_receiving_since_ = 0; |
pthatcher1
2016/07/14 18:01:44
Well, that makes it sounds like we've been continu
honghaiz3
2016/07/14 23:15:01
As I said, the value should not be used at all if
|
std::vector<SentPing> pings_since_last_response_; |
rtc::RateTracker recv_rate_tracker_; |