OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 class StatsObserver : public rtc::RefCountInterface { | 117 class StatsObserver : public rtc::RefCountInterface { |
118 public: | 118 public: |
119 virtual void OnComplete(const StatsReports& reports) = 0; | 119 virtual void OnComplete(const StatsReports& reports) = 0; |
120 | 120 |
121 protected: | 121 protected: |
122 virtual ~StatsObserver() {} | 122 virtual ~StatsObserver() {} |
123 }; | 123 }; |
124 | 124 |
125 class MetricsObserverInterface : public rtc::RefCountInterface { | 125 class MetricsObserverInterface : public rtc::RefCountInterface { |
126 public: | 126 public: |
| 127 // TODO(guoweis): Remove this function once IncrementEnumCounter gets into |
| 128 // chromium. IncrementCounter only deals with one type of enumeration counter, |
| 129 // i.e. PeerConnectionMetricsCounter. Instead of creating a function for each |
| 130 // enum type, IncrementEnumCounter is generalized with the enum type |
| 131 // parameter. |
127 virtual void IncrementCounter(PeerConnectionMetricsCounter type) = 0; | 132 virtual void IncrementCounter(PeerConnectionMetricsCounter type) = 0; |
| 133 |
| 134 virtual void IncrementEnumCounter(PeerConnectionEnumCounterType, |
| 135 int enum_counter, |
| 136 int enum_counter_max) {} |
| 137 |
128 virtual void AddHistogramSample(PeerConnectionMetricsName type, | 138 virtual void AddHistogramSample(PeerConnectionMetricsName type, |
129 int value) = 0; | 139 int value) = 0; |
130 // TODO(jbauch): Make method abstract when it is implemented by Chromium. | 140 // TODO(jbauch): Make method abstract when it is implemented by Chromium. |
131 virtual void AddHistogramSample(PeerConnectionMetricsName type, | 141 virtual void AddHistogramSample(PeerConnectionMetricsName type, |
132 const std::string& value) {} | 142 const std::string& value) {} |
133 | 143 |
134 protected: | 144 protected: |
135 virtual ~MetricsObserverInterface() {} | 145 virtual ~MetricsObserverInterface() {} |
136 }; | 146 }; |
137 | 147 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 enum IceConnectionState { | 181 enum IceConnectionState { |
172 kIceConnectionNew, | 182 kIceConnectionNew, |
173 kIceConnectionChecking, | 183 kIceConnectionChecking, |
174 kIceConnectionConnected, | 184 kIceConnectionConnected, |
175 kIceConnectionCompleted, | 185 kIceConnectionCompleted, |
176 kIceConnectionFailed, | 186 kIceConnectionFailed, |
177 kIceConnectionDisconnected, | 187 kIceConnectionDisconnected, |
178 kIceConnectionClosed, | 188 kIceConnectionClosed, |
179 }; | 189 }; |
180 | 190 |
| 191 const int kIceConnectionState_Max = kIceConnectionClosed + 1; |
| 192 |
181 struct IceServer { | 193 struct IceServer { |
182 // TODO(jbauch): Remove uri when all code using it has switched to urls. | 194 // TODO(jbauch): Remove uri when all code using it has switched to urls. |
183 std::string uri; | 195 std::string uri; |
184 std::vector<std::string> urls; | 196 std::vector<std::string> urls; |
185 std::string username; | 197 std::string username; |
186 std::string password; | 198 std::string password; |
187 }; | 199 }; |
188 typedef std::vector<IceServer> IceServers; | 200 typedef std::vector<IceServer> IceServers; |
189 | 201 |
190 enum IceTransportsType { | 202 enum IceTransportsType { |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 CreatePeerConnectionFactory( | 639 CreatePeerConnectionFactory( |
628 rtc::Thread* worker_thread, | 640 rtc::Thread* worker_thread, |
629 rtc::Thread* signaling_thread, | 641 rtc::Thread* signaling_thread, |
630 AudioDeviceModule* default_adm, | 642 AudioDeviceModule* default_adm, |
631 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 643 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
632 cricket::WebRtcVideoDecoderFactory* decoder_factory); | 644 cricket::WebRtcVideoDecoderFactory* decoder_factory); |
633 | 645 |
634 } // namespace webrtc | 646 } // namespace webrtc |
635 | 647 |
636 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ | 648 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ |
OLD | NEW |