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

Side by Side Diff: webrtc/common_types.h

Issue 2947633003: Allow parsing empty RTCP TargetBitrate messages, but stop sending them. (Closed)
Patch Set: Add comment about using ToString only in tests 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
« no previous file with comments | « no previous file | webrtc/common_types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 634
635 // Expensive, please use only in tests.
636 std::string ToString() const;
637 std::ostream& operator<<(std::ostream& os) const;
638
635 private: 639 private:
636 uint32_t sum_; 640 uint32_t sum_;
637 uint32_t bitrates_[kMaxSpatialLayers][kMaxTemporalStreams]; 641 uint32_t bitrates_[kMaxSpatialLayers][kMaxTemporalStreams];
638 }; 642 };
639 643
640 // Bandwidth over-use detector options. These are used to drive 644 // Bandwidth over-use detector options. These are used to drive
641 // experimentation with bandwidth estimation parameters. 645 // experimentation with bandwidth estimation parameters.
642 // See modules/remote_bitrate_estimator/overuse_detector.h 646 // See modules/remote_bitrate_estimator/overuse_detector.h
643 // TODO(terelius): This is only used in overuse_estimator.cc, and only in the 647 // 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 648 // default constructed state. Can we move the relevant variables into that
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 enum class RtcpMode { kOff, kCompound, kReducedSize }; 892 enum class RtcpMode { kOff, kCompound, kReducedSize };
889 893
890 enum NetworkState { 894 enum NetworkState {
891 kNetworkUp, 895 kNetworkUp,
892 kNetworkDown, 896 kNetworkDown,
893 }; 897 };
894 898
895 } // namespace webrtc 899 } // namespace webrtc
896 900
897 #endif // WEBRTC_COMMON_TYPES_H_ 901 #endif // WEBRTC_COMMON_TYPES_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/common_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698