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

Side by Side Diff: webrtc/modules/pacing/paced_sender.h

Issue 1785173002: Replace scoped_ptr with unique_ptr in webrtc/modules/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@up8
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
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_MODULES_PACING_PACED_SENDER_H_ 11 #ifndef WEBRTC_MODULES_PACING_PACED_SENDER_H_
12 #define WEBRTC_MODULES_PACING_PACED_SENDER_H_ 12 #define WEBRTC_MODULES_PACING_PACED_SENDER_H_
13 13
14 #include <list> 14 #include <list>
15 #include <memory>
15 #include <set> 16 #include <set>
16 17
17 #include "webrtc/base/scoped_ptr.h"
18 #include "webrtc/base/thread_annotations.h" 18 #include "webrtc/base/thread_annotations.h"
19 #include "webrtc/modules/include/module.h" 19 #include "webrtc/modules/include/module.h"
20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
21 #include "webrtc/typedefs.h" 21 #include "webrtc/typedefs.h"
22 22
23 namespace webrtc { 23 namespace webrtc {
24 class BitrateProber; 24 class BitrateProber;
25 class Clock; 25 class Clock;
26 class CriticalSectionWrapper; 26 class CriticalSectionWrapper;
27 27
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 void UpdateBytesPerInterval(int64_t delta_time_in_ms) 129 void UpdateBytesPerInterval(int64_t delta_time_in_ms)
130 EXCLUSIVE_LOCKS_REQUIRED(critsect_); 130 EXCLUSIVE_LOCKS_REQUIRED(critsect_);
131 131
132 bool SendPacket(const paced_sender::Packet& packet) 132 bool SendPacket(const paced_sender::Packet& packet)
133 EXCLUSIVE_LOCKS_REQUIRED(critsect_); 133 EXCLUSIVE_LOCKS_REQUIRED(critsect_);
134 void SendPadding(size_t padding_needed) EXCLUSIVE_LOCKS_REQUIRED(critsect_); 134 void SendPadding(size_t padding_needed) EXCLUSIVE_LOCKS_REQUIRED(critsect_);
135 135
136 Clock* const clock_; 136 Clock* const clock_;
137 Callback* const callback_; 137 Callback* const callback_;
138 138
139 rtc::scoped_ptr<CriticalSectionWrapper> critsect_; 139 std::unique_ptr<CriticalSectionWrapper> critsect_;
140 bool paused_ GUARDED_BY(critsect_); 140 bool paused_ GUARDED_BY(critsect_);
141 bool probing_enabled_; 141 bool probing_enabled_;
142 // This is the media budget, keeping track of how many bits of media 142 // This is the media budget, keeping track of how many bits of media
143 // we can pace out during the current interval. 143 // we can pace out during the current interval.
144 rtc::scoped_ptr<paced_sender::IntervalBudget> media_budget_ 144 std::unique_ptr<paced_sender::IntervalBudget> media_budget_
145 GUARDED_BY(critsect_); 145 GUARDED_BY(critsect_);
146 // This is the padding budget, keeping track of how many bits of padding we're 146 // This is the padding budget, keeping track of how many bits of padding we're
147 // allowed to send out during the current interval. This budget will be 147 // allowed to send out during the current interval. This budget will be
148 // utilized when there's no media to send. 148 // utilized when there's no media to send.
149 rtc::scoped_ptr<paced_sender::IntervalBudget> padding_budget_ 149 std::unique_ptr<paced_sender::IntervalBudget> padding_budget_
150 GUARDED_BY(critsect_); 150 GUARDED_BY(critsect_);
151 151
152 rtc::scoped_ptr<BitrateProber> prober_ GUARDED_BY(critsect_); 152 std::unique_ptr<BitrateProber> prober_ GUARDED_BY(critsect_);
153 // Actual configured bitrates (media_budget_ may temporarily be higher in 153 // Actual configured bitrates (media_budget_ may temporarily be higher in
154 // order to meet pace time constraint). 154 // order to meet pace time constraint).
155 int bitrate_bps_ GUARDED_BY(critsect_); 155 int bitrate_bps_ GUARDED_BY(critsect_);
156 int max_bitrate_kbps_ GUARDED_BY(critsect_); 156 int max_bitrate_kbps_ GUARDED_BY(critsect_);
157 157
158 int64_t time_last_update_us_ GUARDED_BY(critsect_); 158 int64_t time_last_update_us_ GUARDED_BY(critsect_);
159 159
160 rtc::scoped_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); 160 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_);
161 uint64_t packet_counter_; 161 uint64_t packet_counter_;
162 }; 162 };
163 } // namespace webrtc 163 } // namespace webrtc
164 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ 164 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698