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

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

Issue 2965233002: Let alr dectector use a budged to detect underuse. (Closed)
Patch Set: Created 3 years, 5 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
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_PACING_INTERVAL_BUDGET_H_
12 #define WEBRTC_MODULES_PACING_INTERVAL_BUDGET_H_
13
14 #include "webrtc/common_types.h"
15
16 namespace webrtc {
17
18 class IntervalBudget {
19 public:
20 explicit IntervalBudget(int initial_target_rate_kbps);
21 IntervalBudget(int initial_target_rate_kbps, bool can_build_up_underuse);
22 void set_target_rate_kbps(int target_rate_kbps);
23 void IncreaseBudget(int64_t delta_time_ms);
24 void UseBudget(size_t bytes);
25 size_t bytes_remaining() const;
26 int budget_level_percent() const;
27 int target_rate_kbps() const;
28
29 private:
30 int target_rate_kbps_;
31 int max_bytes_in_budget_;
32 int bytes_remaining_;
33 bool can_build_up_underuse_;
34 };
35
36 } // namespace webrtc
37
38 #endif // WEBRTC_MODULES_PACING_INTERVAL_BUDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698