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

Side by Side Diff: webrtc/video/rtp_stream_receiver.cc

Issue 2853503002: Dont request keyframes if the stream is inactive or if we are currently receiving a keyframe. (Closed)
Patch Set: Rebase Created 3 years, 7 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 | « webrtc/video/rtp_stream_receiver.h ('k') | webrtc/video/video_receive_stream.cc » ('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) 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 last_seq_num_for_pic_id_[rtp_frame->picture_id] = rtp_frame->last_seq_num(); 413 last_seq_num_for_pic_id_[rtp_frame->picture_id] = rtp_frame->last_seq_num();
414 } 414 }
415 complete_frame_callback_->OnCompleteFrame(std::move(frame)); 415 complete_frame_callback_->OnCompleteFrame(std::move(frame));
416 } 416 }
417 417
418 void RtpStreamReceiver::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { 418 void RtpStreamReceiver::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) {
419 if (nack_module_) 419 if (nack_module_)
420 nack_module_->UpdateRtt(max_rtt_ms); 420 nack_module_->UpdateRtt(max_rtt_ms);
421 } 421 }
422 422
423 rtc::Optional<int64_t> RtpStreamReceiver::LastReceivedPacketMs() const {
424 return packet_buffer_->LastReceivedPacketMs();
425 }
426
427 rtc::Optional<int64_t> RtpStreamReceiver::LastReceivedKeyframePacketMs() const {
428 return packet_buffer_->LastReceivedKeyframePacketMs();
429 }
430
423 // TODO(nisse): Drop return value. 431 // TODO(nisse): Drop return value.
424 bool RtpStreamReceiver::ReceivePacket(const uint8_t* packet, 432 bool RtpStreamReceiver::ReceivePacket(const uint8_t* packet,
425 size_t packet_length, 433 size_t packet_length,
426 const RTPHeader& header, 434 const RTPHeader& header,
427 bool in_order) { 435 bool in_order) {
428 if (rtp_payload_registry_.IsEncapsulated(header)) { 436 if (rtp_payload_registry_.IsEncapsulated(header)) {
429 return ParseAndHandleEncapsulatingHeader(packet, packet_length, header); 437 return ParseAndHandleEncapsulatingHeader(packet, packet_length, header);
430 } 438 }
431 const uint8_t* payload = packet + header.headerLength; 439 const uint8_t* payload = packet + header.headerLength;
432 assert(packet_length >= header.headerLength); 440 assert(packet_length >= header.headerLength);
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 return; 676 return;
669 677
670 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str())) 678 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str()))
671 return; 679 return;
672 680
673 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(), 681 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(),
674 sprop_decoder.pps_nalu()); 682 sprop_decoder.pps_nalu());
675 } 683 }
676 684
677 } // namespace webrtc 685 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/rtp_stream_receiver.h ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698