Index: talk/app/webrtc/statscollector.h |
diff --git a/talk/app/webrtc/statscollector.h b/talk/app/webrtc/statscollector.h |
index 99130a3f0133791ebf9d9e89119edb9c0b78ee7b..7dec9296b08038be50f1761129693d4942a3403d 100644 |
--- a/talk/app/webrtc/statscollector.h |
+++ b/talk/app/webrtc/statscollector.h |
@@ -43,6 +43,8 @@ |
namespace webrtc { |
+class PeerConnection; |
+ |
// Conversion function to convert candidate type string to the corresponding one |
// from enum RTCStatsIceCandidateType. |
const char* IceCandidateTypeToStatsType(const std::string& candidate_type); |
@@ -57,9 +59,9 @@ typedef std::map<std::string, StatsReport*> TrackIdMap; |
class StatsCollector { |
public: |
- // The caller is responsible for ensuring that the session outlives the |
- // StatsCollector instance. |
- explicit StatsCollector(WebRtcSession* session); |
+ // The caller is responsible for ensuring that the pc and session |
+ // outlive the StatsCollector instance. |
+ explicit StatsCollector(PeerConnection* pc, WebRtcSession* session); |
Taylor Brandstetter
2015/10/07 00:26:19
I don't really like passing the StatsCollector a P
pthatcher1
2015/10/07 02:50:51
It makes sense to pass a PeerConnection in. It's
pthatcher1
2015/10/08 22:05:36
Or maybe pc_->session()?
Taylor Brandstetter
2015/10/09 19:54:09
Done.
|
virtual ~StatsCollector(); |
// Adds a MediaStream with tracks that can be used as a |selector| in a call |
@@ -148,7 +150,9 @@ class StatsCollector { |
// A collection for all of our stats reports. |
StatsCollection reports_; |
TrackIdMap track_ids_; |
- // Raw pointer to the session the statistics are gathered from. |
+ // Raw pointers to the peer connection and session the statistics are |
+ // gathered from. |
+ PeerConnection* const pc_; |
WebRtcSession* const session_; |
double stats_gathering_started_; |
cricket::ProxyTransportMap proxy_to_transport_; |