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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 if (it == packets_.end()) | 90 if (it == packets_.end()) |
91 return false; | 91 return false; |
92 if (packet) | 92 if (packet) |
93 *packet = (*it); | 93 *packet = (*it); |
94 return true; | 94 return true; |
95 } | 95 } |
96 | 96 |
97 bool StreamGenerator::NextPacket(VCMPacket* packet) { | 97 bool StreamGenerator::NextPacket(VCMPacket* packet) { |
98 if (packets_.empty()) | 98 if (packets_.empty()) |
99 return false; | 99 return false; |
100 if (packet != NULL) | 100 if (packet != nullptr) |
101 *packet = packets_.front(); | 101 *packet = packets_.front(); |
102 packets_.pop_front(); | 102 packets_.pop_front(); |
103 return true; | 103 return true; |
104 } | 104 } |
105 | 105 |
106 void StreamGenerator::DropLastPacket() { | 106 void StreamGenerator::DropLastPacket() { |
107 packets_.pop_back(); | 107 packets_.pop_back(); |
108 } | 108 } |
109 | 109 |
110 uint16_t StreamGenerator::NextSequenceNumber() const { | 110 uint16_t StreamGenerator::NextSequenceNumber() const { |
(...skipping 10 matching lines...) Expand all Loading... |
121 std::list<VCMPacket>::iterator it = packets_.begin(); | 121 std::list<VCMPacket>::iterator it = packets_.begin(); |
122 for (int i = 0; i < index; ++i) { | 122 for (int i = 0; i < index; ++i) { |
123 ++it; | 123 ++it; |
124 if (it == packets_.end()) | 124 if (it == packets_.end()) |
125 break; | 125 break; |
126 } | 126 } |
127 return it; | 127 return it; |
128 } | 128 } |
129 | 129 |
130 } // namespace webrtc | 130 } // namespace webrtc |
OLD | NEW |