OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 return rtclog::MediaType::DATA; | 114 return rtclog::MediaType::DATA; |
115 } | 115 } |
116 RTC_NOTREACHED(); | 116 RTC_NOTREACHED(); |
117 return rtclog::ANY; | 117 return rtclog::ANY; |
118 } | 118 } |
119 | 119 |
120 // The RTP and RTCP buffers reserve space for twice the expected number of | 120 // The RTP and RTCP buffers reserve space for twice the expected number of |
121 // sent packets because they also contain received packets. | 121 // sent packets because they also contain received packets. |
122 static const int kEventsPerSecond = 1000; | 122 static const int kEventsPerSecond = 1000; |
123 static const int kControlMessagesPerSecond = 10; | 123 static const int kControlMessagesPerSecond = 10; |
| 124 |
124 } // namespace | 125 } // namespace |
125 | 126 |
126 // RtcEventLogImpl member functions. | 127 // RtcEventLogImpl member functions. |
127 RtcEventLogImpl::RtcEventLogImpl(const Clock* clock) | 128 RtcEventLogImpl::RtcEventLogImpl(const Clock* clock) |
128 // Allocate buffers for roughly one second of history. | 129 // Allocate buffers for roughly one second of history. |
129 : message_queue_(kControlMessagesPerSecond), | 130 : message_queue_(kControlMessagesPerSecond), |
130 event_queue_(kEventsPerSecond), | 131 event_queue_(kEventsPerSecond), |
131 clock_(clock), | 132 clock_(clock), |
132 helper_thread_(&message_queue_, &event_queue_, clock), | 133 helper_thread_(&message_queue_, &event_queue_, clock), |
133 thread_checker_() { | 134 thread_checker_() { |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 #else | 435 #else |
435 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); | 436 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); |
436 #endif // ENABLE_RTC_EVENT_LOG | 437 #endif // ENABLE_RTC_EVENT_LOG |
437 } | 438 } |
438 | 439 |
439 std::unique_ptr<RtcEventLog> RtcEventLog::CreateNull() { | 440 std::unique_ptr<RtcEventLog> RtcEventLog::CreateNull() { |
440 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); | 441 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); |
441 } | 442 } |
442 | 443 |
443 } // namespace webrtc | 444 } // namespace webrtc |
OLD | NEW |