| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 #include "webrtc/modules/video_coding/main/source/jitter_buffer.h" | 10 #include "webrtc/modules/video_coding/main/source/jitter_buffer.h" |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 << num_consecutive_old_packets_ | 679 << num_consecutive_old_packets_ |
| 680 << " consecutive old packets received. Flushing the jitter buffer."; | 680 << " consecutive old packets received. Flushing the jitter buffer."; |
| 681 Flush(); | 681 Flush(); |
| 682 return kFlushIndicator; | 682 return kFlushIndicator; |
| 683 } | 683 } |
| 684 return kOldPacket; | 684 return kOldPacket; |
| 685 } | 685 } |
| 686 | 686 |
| 687 num_consecutive_old_packets_ = 0; | 687 num_consecutive_old_packets_ = 0; |
| 688 | 688 |
| 689 if (packet.codec == kVideoCodecVP9 && | |
| 690 packet.codecSpecificHeader.codecHeader.VP9.flexible_mode) { | |
| 691 // TODO(asapersson): Add support for flexible mode. | |
| 692 return kGeneralError; | |
| 693 } | |
| 694 | |
| 695 VCMFrameBuffer* frame; | 689 VCMFrameBuffer* frame; |
| 696 FrameList* frame_list; | 690 FrameList* frame_list; |
| 697 const VCMFrameBufferEnum error = GetFrame(packet, &frame, &frame_list); | 691 const VCMFrameBufferEnum error = GetFrame(packet, &frame, &frame_list); |
| 698 if (error != kNoError) | 692 if (error != kNoError) |
| 699 return error; | 693 return error; |
| 700 | 694 |
| 701 int64_t now_ms = clock_->TimeInMilliseconds(); | 695 int64_t now_ms = clock_->TimeInMilliseconds(); |
| 702 // We are keeping track of the first and latest seq numbers, and | 696 // We are keeping track of the first and latest seq numbers, and |
| 703 // the number of wraps to be able to calculate how many packets we expect. | 697 // the number of wraps to be able to calculate how many packets we expect. |
| 704 if (first_packet_since_reset_) { | 698 if (first_packet_since_reset_) { |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 } | 1313 } |
| 1320 // Evaluate if the RTT is higher than |high_rtt_nack_threshold_ms_|, and in | 1314 // Evaluate if the RTT is higher than |high_rtt_nack_threshold_ms_|, and in |
| 1321 // that case we don't wait for retransmissions. | 1315 // that case we don't wait for retransmissions. |
| 1322 if (high_rtt_nack_threshold_ms_ >= 0 && | 1316 if (high_rtt_nack_threshold_ms_ >= 0 && |
| 1323 rtt_ms_ >= high_rtt_nack_threshold_ms_) { | 1317 rtt_ms_ >= high_rtt_nack_threshold_ms_) { |
| 1324 return false; | 1318 return false; |
| 1325 } | 1319 } |
| 1326 return true; | 1320 return true; |
| 1327 } | 1321 } |
| 1328 } // namespace webrtc | 1322 } // namespace webrtc |
| OLD | NEW |