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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 last_seq_num_for_pic_id_[rtp_frame->picture_id] = rtp_frame->last_seq_num(); | 394 last_seq_num_for_pic_id_[rtp_frame->picture_id] = rtp_frame->last_seq_num(); |
395 } | 395 } |
396 complete_frame_callback_->OnCompleteFrame(std::move(frame)); | 396 complete_frame_callback_->OnCompleteFrame(std::move(frame)); |
397 } | 397 } |
398 | 398 |
399 void RtpStreamReceiver::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { | 399 void RtpStreamReceiver::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { |
400 if (nack_module_) | 400 if (nack_module_) |
401 nack_module_->UpdateRtt(max_rtt_ms); | 401 nack_module_->UpdateRtt(max_rtt_ms); |
402 } | 402 } |
403 | 403 |
| 404 rtc::Optional<int64_t> RtpStreamReceiver::LastReceivedPacketMs() const { |
| 405 return packet_buffer_->LastReceivedPacketMs(); |
| 406 } |
| 407 |
| 408 rtc::Optional<int64_t> RtpStreamReceiver::LastReceivedKeyframePacketMs() const { |
| 409 return packet_buffer_->LastReceivedKeyframePacketMs(); |
| 410 } |
| 411 |
404 // TODO(nisse): Drop return value. | 412 // TODO(nisse): Drop return value. |
405 bool RtpStreamReceiver::ReceivePacket(const uint8_t* packet, | 413 bool RtpStreamReceiver::ReceivePacket(const uint8_t* packet, |
406 size_t packet_length, | 414 size_t packet_length, |
407 const RTPHeader& header, | 415 const RTPHeader& header, |
408 bool in_order) { | 416 bool in_order) { |
409 if (rtp_payload_registry_.IsEncapsulated(header)) { | 417 if (rtp_payload_registry_.IsEncapsulated(header)) { |
410 return ParseAndHandleEncapsulatingHeader(packet, packet_length, header); | 418 return ParseAndHandleEncapsulatingHeader(packet, packet_length, header); |
411 } | 419 } |
412 const uint8_t* payload = packet + header.headerLength; | 420 const uint8_t* payload = packet + header.headerLength; |
413 assert(packet_length >= header.headerLength); | 421 assert(packet_length >= header.headerLength); |
(...skipping 235 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 |