| 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 28 matching lines...) Expand all Loading... |
| 39 uint32_t timestamp = 90 * (time_ms - start_time_); | 39 uint32_t timestamp = 90 * (time_ms - start_time_); |
| 40 for (int i = 0; i < num_media_packets; ++i) { | 40 for (int i = 0; i < num_media_packets; ++i) { |
| 41 const int packet_size = | 41 const int packet_size = |
| 42 (kFrameSize + num_media_packets / 2) / num_media_packets; | 42 (kFrameSize + num_media_packets / 2) / num_media_packets; |
| 43 bool marker_bit = (i == num_media_packets - 1); | 43 bool marker_bit = (i == num_media_packets - 1); |
| 44 packets_.push_back(GeneratePacket( | 44 packets_.push_back(GeneratePacket( |
| 45 sequence_number_, timestamp, packet_size, (i == 0), marker_bit, type)); | 45 sequence_number_, timestamp, packet_size, (i == 0), marker_bit, type)); |
| 46 ++sequence_number_; | 46 ++sequence_number_; |
| 47 } | 47 } |
| 48 for (int i = 0; i < num_empty_packets; ++i) { | 48 for (int i = 0; i < num_empty_packets; ++i) { |
| 49 packets_.push_back(GeneratePacket( | 49 packets_.push_back(GeneratePacket(sequence_number_, timestamp, 0, false, |
| 50 sequence_number_, timestamp, 0, false, false, kFrameEmpty)); | 50 false, kEmptyFrame)); |
| 51 ++sequence_number_; | 51 ++sequence_number_; |
| 52 } | 52 } |
| 53 } | 53 } |
| 54 | 54 |
| 55 VCMPacket StreamGenerator::GeneratePacket(uint16_t sequence_number, | 55 VCMPacket StreamGenerator::GeneratePacket(uint16_t sequence_number, |
| 56 uint32_t timestamp, | 56 uint32_t timestamp, |
| 57 unsigned int size, | 57 unsigned int size, |
| 58 bool first_packet, | 58 bool first_packet, |
| 59 bool marker_bit, | 59 bool marker_bit, |
| 60 FrameType type) { | 60 FrameType type) { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 std::list<VCMPacket>::iterator it = packets_.begin(); | 118 std::list<VCMPacket>::iterator it = packets_.begin(); |
| 119 for (int i = 0; i < index; ++i) { | 119 for (int i = 0; i < index; ++i) { |
| 120 ++it; | 120 ++it; |
| 121 if (it == packets_.end()) | 121 if (it == packets_.end()) |
| 122 break; | 122 break; |
| 123 } | 123 } |
| 124 return it; | 124 return it; |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace webrtc | 127 } // namespace webrtc |
| OLD | NEW |