| 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 | 10 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 const uint8_t* payload_data, | 243 const uint8_t* payload_data, |
| 244 size_t payload_size, | 244 size_t payload_size, |
| 245 const WebRtcRTPHeader* rtp_header) { | 245 const WebRtcRTPHeader* rtp_header) { |
| 246 WebRtcRTPHeader rtp_header_with_ntp = *rtp_header; | 246 WebRtcRTPHeader rtp_header_with_ntp = *rtp_header; |
| 247 rtp_header_with_ntp.ntp_time_ms = | 247 rtp_header_with_ntp.ntp_time_ms = |
| 248 ntp_estimator_.Estimate(rtp_header->header.timestamp); | 248 ntp_estimator_.Estimate(rtp_header->header.timestamp); |
| 249 VCMPacket packet(payload_data, payload_size, rtp_header_with_ntp); | 249 VCMPacket packet(payload_data, payload_size, rtp_header_with_ntp); |
| 250 packet.timesNacked = | 250 packet.timesNacked = |
| 251 nack_module_ ? nack_module_->OnReceivedPacket(packet) : -1; | 251 nack_module_ ? nack_module_->OnReceivedPacket(packet) : -1; |
| 252 | 252 |
| 253 // In the case of a video stream without picture ids and no rtx the |
| 254 // RtpFrameReferenceFinder will need to know about padding to |
| 255 // correctly calculate frame references. |
| 256 if (packet.sizeBytes == 0) { |
| 257 reference_finder_->PaddingReceived(packet.seqNum); |
| 258 return 0; |
| 259 } |
| 260 |
| 253 if (packet.codec == kVideoCodecH264) { | 261 if (packet.codec == kVideoCodecH264) { |
| 254 // Only when we start to receive packets will we know what payload type | 262 // Only when we start to receive packets will we know what payload type |
| 255 // that will be used. When we know the payload type insert the correct | 263 // that will be used. When we know the payload type insert the correct |
| 256 // sps/pps into the tracker. | 264 // sps/pps into the tracker. |
| 257 if (packet.payloadType != last_payload_type_) { | 265 if (packet.payloadType != last_payload_type_) { |
| 258 last_payload_type_ = packet.payloadType; | 266 last_payload_type_ = packet.payloadType; |
| 259 InsertSpsPpsIntoTracker(packet.payloadType); | 267 InsertSpsPpsIntoTracker(packet.payloadType); |
| 260 } | 268 } |
| 261 | 269 |
| 262 switch (tracker_.CopyAndFixBitstream(&packet)) { | 270 switch (tracker_.CopyAndFixBitstream(&packet)) { |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 return; | 657 return; |
| 650 | 658 |
| 651 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str())) | 659 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str())) |
| 652 return; | 660 return; |
| 653 | 661 |
| 654 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(), | 662 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(), |
| 655 sprop_decoder.pps_nalu()); | 663 sprop_decoder.pps_nalu()); |
| 656 } | 664 } |
| 657 | 665 |
| 658 } // namespace webrtc | 666 } // namespace webrtc |
| OLD | NEW |