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

Side by Side Diff: webrtc/modules/congestion_controller/acknowledged_bitrate_estimator.h

Issue 2931873002: Test and fix for huge bwe drop after alr state. (Closed)
Patch Set: Respond to commants Created 3 years, 6 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) 2017 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_CONGESTION_CONTROLLER_ACKNOWLEDGED_BITRATE_ESTIMATOR_H_
12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_ACKNOWLEDGED_BITRATE_ESTIMATOR_H_
13
14 #include <memory>
15 #include <vector>
16
17 #include "webrtc/base/optional.h"
18 #include "webrtc/modules/congestion_controller/bitrate_estimator.h"
19
20 namespace webrtc {
21
22 struct PacketFeedback;
23
24 class BitrateEstimatorCreator {
25 public:
26 virtual ~BitrateEstimatorCreator() = default;
27 virtual std::unique_ptr<BitrateEstimator> Create() const;
28 };
29
30 class AcknowledgedBitrateEstimator {
31 public:
32 AcknowledgedBitrateEstimator(
33 std::unique_ptr<BitrateEstimatorCreator> bitrate_estimator_creator);
34
35 void IncomingPacketFeedbackVector(
36 const std::vector<PacketFeedback>& packet_feedback_vector,
37 bool alr_state);
38 rtc::Optional<uint32_t> bitrate_bps() const;
39
40 private:
41 bool SentBeforLeftAlr(const PacketFeedback& packet);
holmer 2017/06/12 11:45:14 SentBeforeLeftAlr What does left alr mean?
tschumi 2017/06/12 11:53:04 The the function should return true when we left a
stefan-webrtc 2017/06/12 12:17:23 Maybe split in two and make this: if (SentInAlrSta
tschumi 2017/06/12 14:14:15 I tried to impl. this but the results where kind o
42 bool HasLeftAlrState(bool alr_state) const;
43 void MaybeResetBitrateEstimator(bool alr_state);
44
45 bool last_alr_state_;
46 rtc::Optional<int64_t> left_alr_state_ms_;
47 const std::unique_ptr<BitrateEstimatorCreator> bitrate_estimator_creator_;
48 std::unique_ptr<BitrateEstimator> bitrate_estimator_;
49 };
50
51 } // namespace webrtc
52
53 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_ACKNOWLEDGED_BITRATE_ESTIMATOR_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698