OLD | NEW |
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 |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 virtual ~RemoteBitrateObserver() {} | 39 virtual ~RemoteBitrateObserver() {} |
40 }; | 40 }; |
41 | 41 |
42 // TODO(holmer): Remove when all implementations have been updated. | 42 // TODO(holmer): Remove when all implementations have been updated. |
43 struct ReceiveBandwidthEstimatorStats {}; | 43 struct ReceiveBandwidthEstimatorStats {}; |
44 | 44 |
45 class RemoteBitrateEstimator : public CallStatsObserver, public Module { | 45 class RemoteBitrateEstimator : public CallStatsObserver, public Module { |
46 public: | 46 public: |
47 static const int kDefaultMinBitrateBps = 30000; | 47 static const int kDefaultMinBitrateBps = 30000; |
48 virtual ~RemoteBitrateEstimator() {} | 48 ~RemoteBitrateEstimator() override {} |
49 | 49 |
50 virtual void IncomingPacketFeedbackVector( | 50 virtual void IncomingPacketFeedbackVector( |
51 const std::vector<PacketInfo>& packet_feedback_vector) { | 51 const std::vector<PacketInfo>& packet_feedback_vector) = 0; |
52 assert(false); | |
53 } | |
54 | 52 |
55 // Called for each incoming packet. Updates the incoming payload bitrate | 53 // Called for each incoming packet. Updates the incoming payload bitrate |
56 // estimate and the over-use detector. If an over-use is detected the | 54 // estimate and the over-use detector. If an over-use is detected the |
57 // remote bitrate estimate will be updated. Note that |payload_size| is the | 55 // remote bitrate estimate will be updated. Note that |payload_size| is the |
58 // packet size excluding headers. | 56 // packet size excluding headers. |
59 // Note that |arrival_time_ms| can be of an arbitrary time base. | 57 // Note that |arrival_time_ms| can be of an arbitrary time base. |
60 virtual void IncomingPacket(int64_t arrival_time_ms, | 58 virtual void IncomingPacket(int64_t arrival_time_ms, |
61 size_t payload_size, | 59 size_t payload_size, |
62 const RTPHeader& header) = 0; | 60 const RTPHeader& header) = 0; |
63 | 61 |
(...skipping 14 matching lines...) Expand all Loading... |
78 virtual void SetMinBitrate(int min_bitrate_bps) = 0; | 76 virtual void SetMinBitrate(int min_bitrate_bps) = 0; |
79 | 77 |
80 protected: | 78 protected: |
81 static const int64_t kProcessIntervalMs = 500; | 79 static const int64_t kProcessIntervalMs = 500; |
82 static const int64_t kStreamTimeOutMs = 2000; | 80 static const int64_t kStreamTimeOutMs = 2000; |
83 }; | 81 }; |
84 | 82 |
85 } // namespace webrtc | 83 } // namespace webrtc |
86 | 84 |
87 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMA
TOR_H_ | 85 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMA
TOR_H_ |
OLD | NEW |