OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2005 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2005 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 : MediaMonitor(worker_thread, monitor_thread), | 54 : MediaMonitor(worker_thread, monitor_thread), |
55 media_channel_(media_channel) {} | 55 media_channel_(media_channel) {} |
56 sigslot::signal2<MC*, const MI&> SignalUpdate; | 56 sigslot::signal2<MC*, const MI&> SignalUpdate; |
57 | 57 |
58 protected: | 58 protected: |
59 // These routines assume the crit_ lock is held by the calling thread. | 59 // These routines assume the crit_ lock is held by the calling thread. |
60 virtual void GetStats() { | 60 virtual void GetStats() { |
61 media_info_.Clear(); | 61 media_info_.Clear(); |
62 media_channel_->GetStats(&media_info_); | 62 media_channel_->GetStats(&media_info_); |
63 } | 63 } |
64 virtual void Update() EXCLUSIVE_LOCKS_REQUIRED(crit_) { | 64 virtual void Update() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_) { |
65 MI stats(media_info_); | 65 MI stats(media_info_); |
66 crit_.Leave(); | 66 crit_.Leave(); |
67 SignalUpdate(media_channel_, stats); | 67 SignalUpdate(media_channel_, stats); |
68 crit_.Enter(); | 68 crit_.Enter(); |
69 } | 69 } |
70 | 70 |
71 private: | 71 private: |
72 MC* media_channel_; | 72 MC* media_channel_; |
73 MI media_info_; | 73 MI media_info_; |
74 }; | 74 }; |
75 | 75 |
76 typedef MediaMonitorT<VoiceMediaChannel, VoiceMediaInfo> VoiceMediaMonitor; | 76 typedef MediaMonitorT<VoiceMediaChannel, VoiceMediaInfo> VoiceMediaMonitor; |
77 typedef MediaMonitorT<VideoMediaChannel, VideoMediaInfo> VideoMediaMonitor; | 77 typedef MediaMonitorT<VideoMediaChannel, VideoMediaInfo> VideoMediaMonitor; |
78 typedef MediaMonitorT<DataMediaChannel, DataMediaInfo> DataMediaMonitor; | 78 typedef MediaMonitorT<DataMediaChannel, DataMediaInfo> DataMediaMonitor; |
79 | 79 |
80 } // namespace cricket | 80 } // namespace cricket |
81 | 81 |
82 #endif // WEBRTC_PC_MEDIAMONITOR_H_ | 82 #endif // WEBRTC_PC_MEDIAMONITOR_H_ |
OLD | NEW |