OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 void MediaPacket::SetAbsSendTimeMs(int64_t abs_send_time_ms) { | 150 void MediaPacket::SetAbsSendTimeMs(int64_t abs_send_time_ms) { |
151 header_.extension.hasAbsoluteSendTime = true; | 151 header_.extension.hasAbsoluteSendTime = true; |
152 header_.extension.absoluteSendTime = ((static_cast<int64_t>(abs_send_time_ms * | 152 header_.extension.absoluteSendTime = ((static_cast<int64_t>(abs_send_time_ms * |
153 (1 << 18)) + 500) / 1000) & 0x00fffffful; | 153 (1 << 18)) + 500) / 1000) & 0x00fffffful; |
154 } | 154 } |
155 | 155 |
156 BbrBweFeedback::BbrBweFeedback( | 156 BbrBweFeedback::BbrBweFeedback( |
157 int flow_id, | 157 int flow_id, |
158 int64_t send_time_us, | 158 int64_t send_time_us, |
159 int64_t latest_send_time_ms, | 159 int64_t latest_send_time_ms, |
160 const std::vector<std::pair<uint64_t, int64_t>>& packet_feedback_vector) | 160 const std::vector<uint64_t>& packet_feedback_vector) |
161 : FeedbackPacket(flow_id, send_time_us, latest_send_time_ms), | 161 : FeedbackPacket(flow_id, send_time_us, latest_send_time_ms), |
162 packet_feedback_vector_(packet_feedback_vector) {} | 162 packet_feedback_vector_(packet_feedback_vector) {} |
163 | 163 |
164 RembFeedback::RembFeedback(int flow_id, | 164 RembFeedback::RembFeedback(int flow_id, |
165 int64_t send_time_us, | 165 int64_t send_time_us, |
166 int64_t last_send_time_ms, | 166 int64_t last_send_time_ms, |
167 uint32_t estimated_bps, | 167 uint32_t estimated_bps, |
168 RTCPReportBlock report_block) | 168 RTCPReportBlock report_block) |
169 : FeedbackPacket(flow_id, send_time_us, last_send_time_ms), | 169 : FeedbackPacket(flow_id, send_time_us, last_send_time_ms), |
170 estimated_bps_(estimated_bps), | 170 estimated_bps_(estimated_bps), |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 uint32_t PeriodicKeyFrameSource::NextPacketSize(uint32_t frame_size, | 820 uint32_t PeriodicKeyFrameSource::NextPacketSize(uint32_t frame_size, |
821 uint32_t remaining_payload) { | 821 uint32_t remaining_payload) { |
822 uint32_t fragments = | 822 uint32_t fragments = |
823 (frame_size + (kMaxPayloadSizeBytes - 1)) / kMaxPayloadSizeBytes; | 823 (frame_size + (kMaxPayloadSizeBytes - 1)) / kMaxPayloadSizeBytes; |
824 uint32_t avg_size = (frame_size + fragments - 1) / fragments; | 824 uint32_t avg_size = (frame_size + fragments - 1) / fragments; |
825 return std::min(avg_size, remaining_payload); | 825 return std::min(avg_size, remaining_payload); |
826 } | 826 } |
827 } // namespace bwe | 827 } // namespace bwe |
828 } // namespace testing | 828 } // namespace testing |
829 } // namespace webrtc | 829 } // namespace webrtc |
OLD | NEW |