| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // |it| is expected to point to the last packet of the previous partition, | 107 // |it| is expected to point to the last packet of the previous partition, |
| 108 // or to the first packet of the frame. |packets_skipped| is incremented | 108 // or to the first packet of the frame. |packets_skipped| is incremented |
| 109 // for each packet found which doesn't have the beginning bit set. | 109 // for each packet found which doesn't have the beginning bit set. |
| 110 PacketIterator FindNextPartitionBeginning(PacketIterator it) const; | 110 PacketIterator FindNextPartitionBeginning(PacketIterator it) const; |
| 111 | 111 |
| 112 // Returns an iterator pointing to the last packet of the partition pointed to | 112 // Returns an iterator pointing to the last packet of the partition pointed to |
| 113 // by |it|. | 113 // by |it|. |
| 114 PacketIterator FindPartitionEnd(PacketIterator it) const; | 114 PacketIterator FindPartitionEnd(PacketIterator it) const; |
| 115 static bool InSequence(const PacketIterator& it, | 115 static bool InSequence(const PacketIterator& it, |
| 116 const PacketIterator& prev_it); | 116 const PacketIterator& prev_it); |
| 117 size_t InsertBuffer(uint8_t* frame_buffer, | 117 bool InsertBuffer(uint8_t* frame_buffer, |
| 118 PacketIterator packetIterator); | 118 size_t* inserted_length, |
| 119 PacketIterator packetIterator); |
| 120 |
| 119 size_t Insert(const uint8_t* buffer, | 121 size_t Insert(const uint8_t* buffer, |
| 120 size_t length, | 122 size_t length, |
| 121 bool insert_start_code, | 123 bool insert_start_code, |
| 122 uint8_t* frame_buffer); | 124 uint8_t* frame_buffer); |
| 123 void ShiftSubsequentPackets(PacketIterator it, int steps_to_shift); | 125 void ShiftSubsequentPackets(PacketIterator it, int steps_to_shift); |
| 124 PacketIterator FindNaluEnd(PacketIterator packet_iter) const; | 126 PacketIterator FindNaluEnd(PacketIterator packet_iter) const; |
| 125 // Deletes the data of all packets between |start| and |end|, inclusively. | 127 // Deletes the data of all packets between |start| and |end|, inclusively. |
| 126 // Note that this function doesn't delete the actual packets. | 128 // Note that this function doesn't delete the actual packets. |
| 127 size_t DeletePacketData(PacketIterator start, | 129 size_t DeletePacketData(PacketIterator start, |
| 128 PacketIterator end); | 130 PacketIterator end); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 // They are not necessarily equal to the front and back packets, as packets | 163 // They are not necessarily equal to the front and back packets, as packets |
| 162 // may enter out of order. | 164 // may enter out of order. |
| 163 // TODO(mikhal): Refactor the list to use a map. | 165 // TODO(mikhal): Refactor the list to use a map. |
| 164 int first_packet_seq_num_; | 166 int first_packet_seq_num_; |
| 165 int last_packet_seq_num_; | 167 int last_packet_seq_num_; |
| 166 }; | 168 }; |
| 167 | 169 |
| 168 } // namespace webrtc | 170 } // namespace webrtc |
| 169 | 171 |
| 170 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_SESSION_INFO_H_ | 172 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_SESSION_INFO_H_ |
| OLD | NEW |