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

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

Issue 3006993002: Delete Rtx-related methods from RTPPayloadRegistry. (Closed)
Patch Set: Update RtpRtcpRtxNackTest. Created 3 years, 3 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/modules/rtp_rtcp/test/testAPI/test_api.cc ('k') | no next file » | 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 LOG(LS_WARNING) << "Removal of unknown sink."; 446 LOG(LS_WARNING) << "Removal of unknown sink.";
447 return; 447 return;
448 } 448 }
449 secondary_sinks_.erase(it); 449 secondary_sinks_.erase(it);
450 } 450 }
451 451
452 void RtpVideoStreamReceiver::ReceivePacket(const uint8_t* packet, 452 void RtpVideoStreamReceiver::ReceivePacket(const uint8_t* packet,
453 size_t packet_length, 453 size_t packet_length,
454 const RTPHeader& header, 454 const RTPHeader& header,
455 bool in_order) { 455 bool in_order) {
456 if (rtp_payload_registry_.IsEncapsulated(header)) { 456 if (rtp_payload_registry_.IsRed(header)) {
457 ParseAndHandleEncapsulatingHeader(packet, packet_length, header); 457 ParseAndHandleEncapsulatingHeader(packet, packet_length, header);
458 return; 458 return;
459 } 459 }
460 const uint8_t* payload = packet + header.headerLength; 460 const uint8_t* payload = packet + header.headerLength;
461 assert(packet_length >= header.headerLength); 461 assert(packet_length >= header.headerLength);
462 size_t payload_length = packet_length - header.headerLength; 462 size_t payload_length = packet_length - header.headerLength;
463 PayloadUnion payload_specific; 463 PayloadUnion payload_specific;
464 if (!rtp_payload_registry_.GetPayloadSpecifics(header.payloadType, 464 if (!rtp_payload_registry_.GetPayloadSpecifics(header.payloadType,
465 &payload_specific)) { 465 &payload_specific)) {
466 return; 466 return;
(...skipping 11 matching lines...) Expand all
478 rtp_receive_statistics_->FecPacketReceived(header, packet_length); 478 rtp_receive_statistics_->FecPacketReceived(header, packet_length);
479 // Notify video_receiver about received FEC packets to avoid NACKing these 479 // Notify video_receiver about received FEC packets to avoid NACKing these
480 // packets. 480 // packets.
481 NotifyReceiverOfFecPacket(header); 481 NotifyReceiverOfFecPacket(header);
482 } 482 }
483 if (ulpfec_receiver_->AddReceivedRedPacket(header, packet, packet_length, 483 if (ulpfec_receiver_->AddReceivedRedPacket(header, packet, packet_length,
484 ulpfec_pt) != 0) { 484 ulpfec_pt) != 0) {
485 return; 485 return;
486 } 486 }
487 ulpfec_receiver_->ProcessReceivedFec(); 487 ulpfec_receiver_->ProcessReceivedFec();
488 } else if (rtp_payload_registry_.IsRtx(header)) {
489 LOG(LS_WARNING) << "Unexpected RTX packet on media ssrc";
490 } 488 }
491 } 489 }
492 490
493 void RtpVideoStreamReceiver::NotifyReceiverOfFecPacket( 491 void RtpVideoStreamReceiver::NotifyReceiverOfFecPacket(
494 const RTPHeader& header) { 492 const RTPHeader& header) {
495 int8_t last_media_payload_type = 493 int8_t last_media_payload_type =
496 rtp_payload_registry_.last_received_media_payload_type(); 494 rtp_payload_registry_.last_received_media_payload_type();
497 if (last_media_payload_type < 0) { 495 if (last_media_payload_type < 0) {
498 LOG(LS_WARNING) << "Failed to get last media payload type."; 496 LOG(LS_WARNING) << "Failed to get last media payload type.";
499 return; 497 return;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 return; 673 return;
676 674
677 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str())) 675 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str()))
678 return; 676 return;
679 677
680 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(), 678 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(),
681 sprop_decoder.pps_nalu()); 679 sprop_decoder.pps_nalu());
682 } 680 }
683 681
684 } // namespace webrtc 682 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698