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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h

Issue 2532113002: Only create |remote_rate| when needed in RemoteBitrateEstimatorSingleStream. (Closed)
Patch Set: Created 4 years 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 typedef std::map<uint32_t, Detector*> SsrcOveruseEstimatorMap; 46 typedef std::map<uint32_t, Detector*> SsrcOveruseEstimatorMap;
47 47
48 // Triggers a new estimate calculation. 48 // Triggers a new estimate calculation.
49 void UpdateEstimate(int64_t time_now) 49 void UpdateEstimate(int64_t time_now)
50 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()); 50 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get());
51 51
52 void GetSsrcs(std::vector<uint32_t>* ssrcs) const 52 void GetSsrcs(std::vector<uint32_t>* ssrcs) const
53 SHARED_LOCKS_REQUIRED(crit_sect_.get()); 53 SHARED_LOCKS_REQUIRED(crit_sect_.get());
54 54
55 // Returns |remote_rate_| if the pointed to object exists,
56 // otherwise creates it.
57 AimdRateControl* GetRemoteRate() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get());
58
55 Clock* clock_; 59 Clock* clock_;
56 SsrcOveruseEstimatorMap overuse_detectors_ GUARDED_BY(crit_sect_.get()); 60 SsrcOveruseEstimatorMap overuse_detectors_ GUARDED_BY(crit_sect_.get());
57 RateStatistics incoming_bitrate_ GUARDED_BY(crit_sect_.get()); 61 RateStatistics incoming_bitrate_ GUARDED_BY(crit_sect_.get());
58 uint32_t last_valid_incoming_bitrate_ GUARDED_BY(crit_sect_.get()); 62 uint32_t last_valid_incoming_bitrate_ GUARDED_BY(crit_sect_.get());
59 std::unique_ptr<AimdRateControl> remote_rate_ GUARDED_BY(crit_sect_.get()); 63 std::unique_ptr<AimdRateControl> remote_rate_ GUARDED_BY(crit_sect_.get());
60 RemoteBitrateObserver* observer_ GUARDED_BY(crit_sect_.get()); 64 RemoteBitrateObserver* observer_ GUARDED_BY(crit_sect_.get());
61 std::unique_ptr<CriticalSectionWrapper> crit_sect_; 65 std::unique_ptr<CriticalSectionWrapper> crit_sect_;
62 int64_t last_process_time_; 66 int64_t last_process_time_;
63 int64_t process_interval_ms_ GUARDED_BY(crit_sect_.get()); 67 int64_t process_interval_ms_ GUARDED_BY(crit_sect_.get());
64 bool uma_recorded_; 68 bool uma_recorded_;
65 69
66 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RemoteBitrateEstimatorSingleStream); 70 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RemoteBitrateEstimatorSingleStream);
67 }; 71 };
68 72
69 } // namespace webrtc 73 } // namespace webrtc
70 74
71 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_SING LE_STREAM_H_ 75 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_SING LE_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698