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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc

Issue 1232373004: Adapting sequence number type to fit standards (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merged with master Created 5 years, 5 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/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.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) 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 header_.sequenceNumber = sequence_number; 168 header_.sequenceNumber = sequence_number;
169 } 169 }
170 170
171 MediaPacket::MediaPacket(int flow_id, 171 MediaPacket::MediaPacket(int flow_id,
172 int64_t send_time_us, 172 int64_t send_time_us,
173 size_t payload_size, 173 size_t payload_size,
174 const RTPHeader& header) 174 const RTPHeader& header)
175 : Packet(flow_id, send_time_us, payload_size), header_(header) { 175 : Packet(flow_id, send_time_us, payload_size), header_(header) {
176 } 176 }
177 177
178 MediaPacket::MediaPacket(int64_t send_time_us, uint32_t sequence_number) 178 MediaPacket::MediaPacket(int64_t send_time_us, uint16_t sequence_number)
179 : Packet(0, send_time_us, 0) { 179 : Packet(0, send_time_us, 0) {
180 header_ = RTPHeader(); 180 header_ = RTPHeader();
181 header_.sequenceNumber = sequence_number; 181 header_.sequenceNumber = sequence_number;
182 } 182 }
183 183
184 void MediaPacket::SetAbsSendTimeMs(int64_t abs_send_time_ms) { 184 void MediaPacket::SetAbsSendTimeMs(int64_t abs_send_time_ms) {
185 header_.extension.hasAbsoluteSendTime = true; 185 header_.extension.hasAbsoluteSendTime = true;
186 header_.extension.absoluteSendTime = ((static_cast<int64_t>(abs_send_time_ms * 186 header_.extension.absoluteSendTime = ((static_cast<int64_t>(abs_send_time_ms *
187 (1 << 18)) + 500) / 1000) & 0x00fffffful; 187 (1 << 18)) + 500) / 1000) & 0x00fffffful;
188 } 188 }
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 uint32_t PeriodicKeyFrameSource::NextPacketSize(uint32_t frame_size, 831 uint32_t PeriodicKeyFrameSource::NextPacketSize(uint32_t frame_size,
832 uint32_t remaining_payload) { 832 uint32_t remaining_payload) {
833 uint32_t fragments = 833 uint32_t fragments =
834 (frame_size + (kMaxPayloadSizeBytes - 1)) / kMaxPayloadSizeBytes; 834 (frame_size + (kMaxPayloadSizeBytes - 1)) / kMaxPayloadSizeBytes;
835 uint32_t avg_size = (frame_size + fragments - 1) / fragments; 835 uint32_t avg_size = (frame_size + fragments - 1) / fragments;
836 return std::min(avg_size, remaining_payload); 836 return std::min(avg_size, remaining_payload);
837 } 837 }
838 } // namespace bwe 838 } // namespace bwe
839 } // namespace testing 839 } // namespace testing
840 } // namespace webrtc 840 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698