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

Side by Side Diff: webrtc/common_types.h

Issue 2947633003: Allow parsing empty RTCP TargetBitrate messages, but stop sending them. (Closed)
Patch Set: Shotgun fix: missing initializer for unrelated member 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
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
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
640 // Bandwidth over-use detector options. These are used to drive 641 // Bandwidth over-use detector options. These are used to drive
641 // experimentation with bandwidth estimation parameters. 642 // experimentation with bandwidth estimation parameters.
642 // See modules/remote_bitrate_estimator/overuse_detector.h 643 // See modules/remote_bitrate_estimator/overuse_detector.h
643 // TODO(terelius): This is only used in overuse_estimator.cc, and only in the 644 // TODO(terelius): This is only used in overuse_estimator.cc, and only in the
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 enum class RtcpMode { kOff, kCompound, kReducedSize }; 889 enum class RtcpMode { kOff, kCompound, kReducedSize };
889 890
890 enum NetworkState { 891 enum NetworkState {
891 kNetworkUp, 892 kNetworkUp,
892 kNetworkDown, 893 kNetworkDown,
893 }; 894 };
894 895
895 } // namespace webrtc 896 } // namespace webrtc
896 897
897 #endif // WEBRTC_COMMON_TYPES_H_ 898 #endif // WEBRTC_COMMON_TYPES_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/common_types.cc » ('j') | webrtc/modules/rtp_rtcp/source/rtcp_packet/target_bitrate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698