Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: webrtc/logging/rtc_event_log/rtc_event_log.cc

Issue 2353033005: Refactoring: move ownership of RtcEventLog from Call to PeerConnection (Closed)
Patch Set: Updated unit tests to use RtcEventLogNullImpl. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698