OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 |
11 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/target_bitrate.h" | 11 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/target_bitrate.h" |
12 | 12 |
13 #include "webrtc/base/checks.h" | |
14 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" | 13 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
| 14 #include "webrtc/rtc_base/checks.h" |
15 | 15 |
16 namespace webrtc { | 16 namespace webrtc { |
17 namespace rtcp { | 17 namespace rtcp { |
18 constexpr size_t kTargetBitrateHeaderSizeBytes = 4; | 18 constexpr size_t kTargetBitrateHeaderSizeBytes = 4; |
19 constexpr uint8_t TargetBitrate::kBlockType; | 19 constexpr uint8_t TargetBitrate::kBlockType; |
20 const size_t TargetBitrate::kBitrateItemSizeBytes = 4; | 20 const size_t TargetBitrate::kBitrateItemSizeBytes = 4; |
21 | 21 |
22 TargetBitrate::BitrateItem::BitrateItem() | 22 TargetBitrate::BitrateItem::BitrateItem() |
23 : spatial_layer(0), temporal_layer(0), target_bitrate_kbps(0) {} | 23 : spatial_layer(0), temporal_layer(0), target_bitrate_kbps(0) {} |
24 | 24 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 for (const BitrateItem& item : bitrates_) { | 114 for (const BitrateItem& item : bitrates_) { |
115 buffer[index] = (item.spatial_layer << 4) | item.temporal_layer; | 115 buffer[index] = (item.spatial_layer << 4) | item.temporal_layer; |
116 ByteWriter<uint32_t, 3>::WriteBigEndian(&buffer[index + 1], | 116 ByteWriter<uint32_t, 3>::WriteBigEndian(&buffer[index + 1], |
117 item.target_bitrate_kbps); | 117 item.target_bitrate_kbps); |
118 index += kBitrateItemSizeBytes; | 118 index += kBitrateItemSizeBytes; |
119 } | 119 } |
120 } | 120 } |
121 | 121 |
122 } // namespace rtcp | 122 } // namespace rtcp |
123 } // namespace webrtc | 123 } // namespace webrtc |
OLD | NEW |