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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // |it| is expected to point to the last packet of the previous partition, | 109 // |it| is expected to point to the last packet of the previous partition, |
110 // or to the first packet of the frame. |packets_skipped| is incremented | 110 // or to the first packet of the frame. |packets_skipped| is incremented |
111 // for each packet found which doesn't have the beginning bit set. | 111 // for each packet found which doesn't have the beginning bit set. |
112 PacketIterator FindNextPartitionBeginning(PacketIterator it) const; | 112 PacketIterator FindNextPartitionBeginning(PacketIterator it) const; |
113 | 113 |
114 // Returns an iterator pointing to the last packet of the partition pointed to | 114 // Returns an iterator pointing to the last packet of the partition pointed to |
115 // by |it|. | 115 // by |it|. |
116 PacketIterator FindPartitionEnd(PacketIterator it) const; | 116 PacketIterator FindPartitionEnd(PacketIterator it) const; |
117 static bool InSequence(const PacketIterator& it, | 117 static bool InSequence(const PacketIterator& it, |
118 const PacketIterator& prev_it); | 118 const PacketIterator& prev_it); |
119 size_t InsertBuffer(uint8_t* frame_buffer, | 119 size_t InsertBuffer(uint8_t* frame_buffer, PacketIterator packetIterator); |
120 PacketIterator packetIterator); | |
121 size_t Insert(const uint8_t* buffer, | 120 size_t Insert(const uint8_t* buffer, |
122 size_t length, | 121 size_t length, |
123 bool insert_start_code, | 122 bool insert_start_code, |
124 uint8_t* frame_buffer); | 123 uint8_t* frame_buffer); |
125 void ShiftSubsequentPackets(PacketIterator it, int steps_to_shift); | 124 void ShiftSubsequentPackets(PacketIterator it, int steps_to_shift); |
126 PacketIterator FindNaluEnd(PacketIterator packet_iter) const; | 125 PacketIterator FindNaluEnd(PacketIterator packet_iter) const; |
127 // Deletes the data of all packets between |start| and |end|, inclusively. | 126 // Deletes the data of all packets between |start| and |end|, inclusively. |
128 // Note that this function doesn't delete the actual packets. | 127 // Note that this function doesn't delete the actual packets. |
129 size_t DeletePacketData(PacketIterator start, | 128 size_t DeletePacketData(PacketIterator start, PacketIterator end); |
130 PacketIterator end); | |
131 void UpdateCompleteSession(); | 129 void UpdateCompleteSession(); |
132 | 130 |
133 // When enabled, determine if session is decodable, i.e. incomplete but | 131 // When enabled, determine if session is decodable, i.e. incomplete but |
134 // would be sent to the decoder. | 132 // would be sent to the decoder. |
135 // Note: definition assumes random loss. | 133 // Note: definition assumes random loss. |
136 // A frame is defined to be decodable when: | 134 // A frame is defined to be decodable when: |
137 // Round trip time is higher than threshold | 135 // Round trip time is higher than threshold |
138 // It is not a key frame | 136 // It is not a key frame |
139 // It has the first packet: In VP8 the first packet contains all or part of | 137 // It has the first packet: In VP8 the first packet contains all or part of |
140 // the first partition, which consists of the most relevant information for | 138 // the first partition, which consists of the most relevant information for |
(...skipping 22 matching lines...) Expand all Loading... |
163 // They are not necessarily equal to the front and back packets, as packets | 161 // They are not necessarily equal to the front and back packets, as packets |
164 // may enter out of order. | 162 // may enter out of order. |
165 // TODO(mikhal): Refactor the list to use a map. | 163 // TODO(mikhal): Refactor the list to use a map. |
166 int first_packet_seq_num_; | 164 int first_packet_seq_num_; |
167 int last_packet_seq_num_; | 165 int last_packet_seq_num_; |
168 }; | 166 }; |
169 | 167 |
170 } // namespace webrtc | 168 } // namespace webrtc |
171 | 169 |
172 #endif // WEBRTC_MODULES_VIDEO_CODING_SESSION_INFO_H_ | 170 #endif // WEBRTC_MODULES_VIDEO_CODING_SESSION_INFO_H_ |
OLD | NEW |