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

Side by Side Diff: webrtc/video/call_stats.h

Issue 1751903002: Replace scoped_ptr with unique_ptr in webrtc/video/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | webrtc/video/call_stats_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 #ifndef WEBRTC_VIDEO_CALL_STATS_H_ 11 #ifndef WEBRTC_VIDEO_CALL_STATS_H_
12 #define WEBRTC_VIDEO_CALL_STATS_H_ 12 #define WEBRTC_VIDEO_CALL_STATS_H_
13 13
14 #include <list> 14 #include <list>
15 #include <memory>
15 16
16 #include "webrtc/base/constructormagic.h" 17 #include "webrtc/base/constructormagic.h"
17 #include "webrtc/base/criticalsection.h" 18 #include "webrtc/base/criticalsection.h"
18 #include "webrtc/base/scoped_ptr.h"
19 #include "webrtc/modules/include/module.h" 19 #include "webrtc/modules/include/module.h"
20 #include "webrtc/system_wrappers/include/clock.h" 20 #include "webrtc/system_wrappers/include/clock.h"
21 21
22 namespace webrtc { 22 namespace webrtc {
23 23
24 class CallStatsObserver; 24 class CallStatsObserver;
25 class RtcpRttStats; 25 class RtcpRttStats;
26 26
27 // CallStats keeps track of statistics for a call. 27 // CallStats keeps track of statistics for a call.
28 class CallStats : public Module { 28 class CallStats : public Module {
(...skipping 28 matching lines...) Expand all
57 57
58 int64_t avg_rtt_ms() const; 58 int64_t avg_rtt_ms() const;
59 59
60 private: 60 private:
61 void UpdateHistograms(); 61 void UpdateHistograms();
62 62
63 Clock* const clock_; 63 Clock* const clock_;
64 // Protecting all members. 64 // Protecting all members.
65 rtc::CriticalSection crit_; 65 rtc::CriticalSection crit_;
66 // Observer receiving statistics updates. 66 // Observer receiving statistics updates.
67 rtc::scoped_ptr<RtcpRttStats> rtcp_rtt_stats_; 67 std::unique_ptr<RtcpRttStats> rtcp_rtt_stats_;
68 // The last time 'Process' resulted in statistic update. 68 // The last time 'Process' resulted in statistic update.
69 int64_t last_process_time_; 69 int64_t last_process_time_;
70 // The last RTT in the statistics update (zero if there is no valid estimate). 70 // The last RTT in the statistics update (zero if there is no valid estimate).
71 int64_t max_rtt_ms_; 71 int64_t max_rtt_ms_;
72 int64_t avg_rtt_ms_; 72 int64_t avg_rtt_ms_;
73 int64_t sum_avg_rtt_ms_ GUARDED_BY(crit_); 73 int64_t sum_avg_rtt_ms_ GUARDED_BY(crit_);
74 int64_t num_avg_rtt_ GUARDED_BY(crit_); 74 int64_t num_avg_rtt_ GUARDED_BY(crit_);
75 int64_t time_of_first_rtt_ms_ GUARDED_BY(crit_); 75 int64_t time_of_first_rtt_ms_ GUARDED_BY(crit_);
76 76
77 // All Rtt reports within valid time interval, oldest first. 77 // All Rtt reports within valid time interval, oldest first.
78 std::list<RttTime> reports_; 78 std::list<RttTime> reports_;
79 79
80 // Observers getting stats reports. 80 // Observers getting stats reports.
81 std::list<CallStatsObserver*> observers_; 81 std::list<CallStatsObserver*> observers_;
82 82
83 RTC_DISALLOW_COPY_AND_ASSIGN(CallStats); 83 RTC_DISALLOW_COPY_AND_ASSIGN(CallStats);
84 }; 84 };
85 85
86 } // namespace webrtc 86 } // namespace webrtc
87 87
88 #endif // WEBRTC_VIDEO_CALL_STATS_H_ 88 #endif // WEBRTC_VIDEO_CALL_STATS_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/video/call_stats_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698