| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 int GetRequiredNackListSize(int target_delay_ms); | 194 int GetRequiredNackListSize(int target_delay_ms); |
| 195 | 195 |
| 196 // ViEChannel exposes methods that allow to modify observers and callbacks | 196 // ViEChannel exposes methods that allow to modify observers and callbacks |
| 197 // to be modified. Such an API-style is cumbersome to implement and maintain | 197 // to be modified. Such an API-style is cumbersome to implement and maintain |
| 198 // at all the levels when comparing to only setting them at construction. As | 198 // at all the levels when comparing to only setting them at construction. As |
| 199 // so this class instantiates its children with a wrapper that can be modified | 199 // so this class instantiates its children with a wrapper that can be modified |
| 200 // at a later time. | 200 // at a later time. |
| 201 template <class T> | 201 template <class T> |
| 202 class RegisterableCallback : public T { | 202 class RegisterableCallback : public T { |
| 203 public: | 203 public: |
| 204 RegisterableCallback() : callback_(NULL) {} | 204 RegisterableCallback() : callback_(nullptr) {} |
| 205 | 205 |
| 206 void Set(T* callback) { | 206 void Set(T* callback) { |
| 207 rtc::CritScope lock(&critsect_); | 207 rtc::CritScope lock(&critsect_); |
| 208 callback_ = callback; | 208 callback_ = callback; |
| 209 } | 209 } |
| 210 | 210 |
| 211 protected: | 211 protected: |
| 212 // Note: this should be implemented with a RW-lock to allow simultaneous | 212 // Note: this should be implemented with a RW-lock to allow simultaneous |
| 213 // calls into the callback. However that doesn't seem to be needed for the | 213 // calls into the callback. However that doesn't seem to be needed for the |
| 214 // current type of callbacks covered by this class. | 214 // current type of callbacks covered by this class. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 302 |
| 303 int64_t last_rtt_ms_ GUARDED_BY(crit_); | 303 int64_t last_rtt_ms_ GUARDED_BY(crit_); |
| 304 | 304 |
| 305 // RtpRtcp modules, declared last as they use other members on construction. | 305 // RtpRtcp modules, declared last as they use other members on construction. |
| 306 const std::vector<RtpRtcp*> rtp_rtcp_modules_; | 306 const std::vector<RtpRtcp*> rtp_rtcp_modules_; |
| 307 }; | 307 }; |
| 308 | 308 |
| 309 } // namespace webrtc | 309 } // namespace webrtc |
| 310 | 310 |
| 311 #endif // WEBRTC_VIDEO_VIE_CHANNEL_H_ | 311 #endif // WEBRTC_VIDEO_VIE_CHANNEL_H_ |
| OLD | NEW |