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

Side by Side Diff: webrtc/modules/video_coding/packet_buffer.cc

Issue 2051453002: Padding is now used to check for continuity in the packet sequence. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Nit fix. Created 4 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/video_coding/rtp_frame_reference_finder.h » ('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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 index = seq_num % size_; 59 index = seq_num % size_;
60 60
61 // Packet buffer is still full. 61 // Packet buffer is still full.
62 if (sequence_buffer_[index].used) 62 if (sequence_buffer_[index].used)
63 return false; 63 return false;
64 } 64 }
65 65
66 if (AheadOf(seq_num, last_seq_num_)) 66 if (AheadOf(seq_num, last_seq_num_))
67 last_seq_num_ = seq_num; 67 last_seq_num_ = seq_num;
68 68
69 // If this is a padding or FEC packet, don't insert it.
70 if (packet.sizeBytes == 0) {
71 reference_finder_.PaddingReceived(packet.seqNum);
72 return true;
73 }
74
69 sequence_buffer_[index].frame_begin = packet.isFirstPacket; 75 sequence_buffer_[index].frame_begin = packet.isFirstPacket;
70 sequence_buffer_[index].frame_end = packet.markerBit; 76 sequence_buffer_[index].frame_end = packet.markerBit;
71 sequence_buffer_[index].seq_num = packet.seqNum; 77 sequence_buffer_[index].seq_num = packet.seqNum;
72 sequence_buffer_[index].continuous = false; 78 sequence_buffer_[index].continuous = false;
73 sequence_buffer_[index].frame_created = false; 79 sequence_buffer_[index].frame_created = false;
74 sequence_buffer_[index].used = true; 80 sequence_buffer_[index].used = true;
75 data_buffer_[index] = packet; 81 data_buffer_[index] = packet;
76 82
77 FindFrames(seq_num); 83 FindFrames(seq_num);
78 return true; 84 return true;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 void PacketBuffer::Clear() { 230 void PacketBuffer::Clear() {
225 rtc::CritScope lock(&crit_); 231 rtc::CritScope lock(&crit_);
226 for (size_t i = 0; i < size_; ++i) 232 for (size_t i = 0; i < size_; ++i)
227 sequence_buffer_[i].used = false; 233 sequence_buffer_[i].used = false;
228 234
229 first_packet_received_ = false; 235 first_packet_received_ = false;
230 } 236 }
231 237
232 } // namespace video_coding 238 } // namespace video_coding
233 } // namespace webrtc 239 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/rtp_frame_reference_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698