Chromium Code Reviews| 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 624 | 624 |
| 625 uint32_t get_sum_bps() const { return sum_; } // Sum of all bitrates. | 625 uint32_t get_sum_bps() const { return sum_; } // Sum of all bitrates. |
| 626 uint32_t get_sum_kbps() const { return (sum_ + 500) / 1000; } | 626 uint32_t get_sum_kbps() const { return (sum_ + 500) / 1000; } |
| 627 | 627 |
| 628 inline bool operator==(const BitrateAllocation& other) const { | 628 inline bool operator==(const BitrateAllocation& other) const { |
| 629 return memcmp(bitrates_, other.bitrates_, sizeof(bitrates_)) == 0; | 629 return memcmp(bitrates_, other.bitrates_, sizeof(bitrates_)) == 0; |
| 630 } | 630 } |
| 631 inline bool operator!=(const BitrateAllocation& other) const { | 631 inline bool operator!=(const BitrateAllocation& other) const { |
| 632 return !(*this == other); | 632 return !(*this == other); |
| 633 } | 633 } |
| 634 std::string ToString() const; | |
| 634 | 635 |
| 635 private: | 636 private: |
| 636 uint32_t sum_; | 637 uint32_t sum_; |
| 637 uint32_t bitrates_[kMaxSpatialLayers][kMaxTemporalStreams]; | 638 uint32_t bitrates_[kMaxSpatialLayers][kMaxTemporalStreams]; |
| 638 }; | 639 }; |
| 639 | 640 |
| 641 std::ostream& operator<<(std::ostream& os, const BitrateAllocation& bitrate); | |
|
stefan-webrtc
2017/06/22 11:10:38
Where is this used? To me it seems like it should
sprang_webrtc
2017/06/22 11:28:29
It is not used, at the moment.
It is however somet
stefan-webrtc
2017/06/22 11:38:12
Ok, I'm mostly worried about adding usage of strin
sprang_webrtc
2017/06/22 12:06:57
Right.. I'll add a comment about about using this
| |
| 642 | |
| 640 // Bandwidth over-use detector options. These are used to drive | 643 // Bandwidth over-use detector options. These are used to drive |
| 641 // experimentation with bandwidth estimation parameters. | 644 // experimentation with bandwidth estimation parameters. |
| 642 // See modules/remote_bitrate_estimator/overuse_detector.h | 645 // See modules/remote_bitrate_estimator/overuse_detector.h |
| 643 // TODO(terelius): This is only used in overuse_estimator.cc, and only in the | 646 // TODO(terelius): This is only used in overuse_estimator.cc, and only in the |
| 644 // default constructed state. Can we move the relevant variables into that | 647 // default constructed state. Can we move the relevant variables into that |
| 645 // class and delete this? See also disabled warning at line 27 | 648 // class and delete this? See also disabled warning at line 27 |
| 646 struct OverUseDetectorOptions { | 649 struct OverUseDetectorOptions { |
| 647 OverUseDetectorOptions() | 650 OverUseDetectorOptions() |
| 648 : initial_slope(8.0 / 512.0), | 651 : initial_slope(8.0 / 512.0), |
| 649 initial_offset(0), | 652 initial_offset(0), |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 888 enum class RtcpMode { kOff, kCompound, kReducedSize }; | 891 enum class RtcpMode { kOff, kCompound, kReducedSize }; |
| 889 | 892 |
| 890 enum NetworkState { | 893 enum NetworkState { |
| 891 kNetworkUp, | 894 kNetworkUp, |
| 892 kNetworkDown, | 895 kNetworkDown, |
| 893 }; | 896 }; |
| 894 | 897 |
| 895 } // namespace webrtc | 898 } // namespace webrtc |
| 896 | 899 |
| 897 #endif // WEBRTC_COMMON_TYPES_H_ | 900 #endif // WEBRTC_COMMON_TYPES_H_ |
| OLD | NEW |