Chromium Code Reviews| Index: webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc |
| diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc |
| index de319ca4b032df12e289a4e261fe71237d4473bf..e08d470accc052f950866b18ebdf14ab3f080b41 100644 |
| --- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc |
| +++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc |
| @@ -14,6 +14,8 @@ |
| #include <string.h> |
| #include <limits> |
| +#include <memory> |
| +#include <utility> |
| #include "webrtc/base/checks.h" |
| #include "webrtc/base/logging.h" |
| @@ -45,7 +47,6 @@ namespace { |
| using rtcp::CommonHeader; |
| using rtcp::ReportBlock; |
| -using RTCPHelp::RTCPPacketInformation; |
| using RTCPHelp::RTCPReceiveInformation; |
| using RTCPHelp::RTCPReportBlockInformation; |
| using RTCPUtility::RTCPCnameInformation; |
| @@ -59,6 +60,60 @@ const int64_t kMaxWarningLogIntervalMs = 10000; |
| } // namespace |
| +class RTCPReceiver::PacketInformation { |
| + public: |
| + PacketInformation(); |
| + ~PacketInformation(); |
| + |
| + void AddReportInfo(const RTCPReportBlockInformation& report_block_info); |
| + |
| + uint32_t rtcpPacketTypeFlags; // RTCPPacketTypeFlags bit field |
|
philipel
2016/09/23 11:33:01
Change all camelCase to use underscore as separato
danilchap
2016/09/23 12:35:55
Planned to do PacketInformation cleanup in follow-
|
| + uint32_t remoteSSRC; |
| + |
| + std::vector<uint16_t> nackSequenceNumbers; |
| + |
| + ReportBlockList report_blocks; |
| + int64_t rtt; |
| + |
| + uint8_t sliPictureId; |
| + uint64_t rpsiPictureId; |
| + uint32_t receiverEstimatedMaxBitrate; |
| + |
| + uint32_t ntp_secs; |
| + uint32_t ntp_frac; |
| + uint32_t rtp_timestamp; |
| + |
| + uint32_t xr_originator_ssrc; |
| + bool xr_dlrr_item; |
| + |
| + std::unique_ptr<rtcp::TransportFeedback> transport_feedback_; |
| + |
| + private: |
| + RTC_DISALLOW_COPY_AND_ASSIGN(PacketInformation); |
| +}; |
| + |
| +RTCPReceiver::PacketInformation::PacketInformation() |
| + : rtcpPacketTypeFlags(0), |
| + remoteSSRC(0), |
| + nackSequenceNumbers(), |
| + rtt(0), |
| + sliPictureId(0), |
| + rpsiPictureId(0), |
| + receiverEstimatedMaxBitrate(0), |
| + ntp_secs(0), |
| + ntp_frac(0), |
| + rtp_timestamp(0), |
| + xr_originator_ssrc(0), |
| + xr_dlrr_item(false) {} |
| + |
| +RTCPReceiver::PacketInformation::~PacketInformation() {} |
|
philipel
2016/09/23 11:33:01
Remove dtor
danilchap
2016/09/23 12:35:55
Done.
|
| + |
| +void RTCPReceiver::PacketInformation::AddReportInfo( |
| + const RTCPReportBlockInformation& report_block_info) { |
| + this->rtt = report_block_info.RTT; |
| + report_blocks.push_back(report_block_info.remoteReceiveBlock); |
| +} |
| + |
| RTCPReceiver::RTCPReceiver( |
| Clock* clock, |
| bool receiver_only, |
| @@ -122,7 +177,7 @@ bool RTCPReceiver::IncomingPacket(const uint8_t* packet, size_t packet_size) { |
| return false; |
| } |
| - RTCPHelp::RTCPPacketInformation packet_information; |
| + PacketInformation packet_information; |
| if (!ParseCompoundPacket(packet, packet + packet_size, &packet_information)) |
| return false; |
| TriggerCallbacksFromRTCPPacket(packet_information); |
| @@ -296,10 +351,9 @@ int32_t RTCPReceiver::StatisticsReceived( |
| return 0; |
| } |
| -bool RTCPReceiver::ParseCompoundPacket( |
| - const uint8_t* packet_begin, |
| - const uint8_t* packet_end, |
| - RTCPPacketInformation* packet_information) { |
| +bool RTCPReceiver::ParseCompoundPacket(const uint8_t* packet_begin, |
| + const uint8_t* packet_end, |
| + PacketInformation* packet_information) { |
| rtc::CritScope lock(&_criticalSectionRTCPReceiver); |
| CommonHeader rtcp_block; |
| @@ -322,16 +376,16 @@ bool RTCPReceiver::ParseCompoundPacket( |
| switch (rtcp_block.type()) { |
| case rtcp::SenderReport::kPacketType: |
| - HandleSenderReport(rtcp_block, *packet_information); |
| + HandleSenderReport(rtcp_block, packet_information); |
| break; |
| case rtcp::ReceiverReport::kPacketType: |
| - HandleReceiverReport(rtcp_block, *packet_information); |
| + HandleReceiverReport(rtcp_block, packet_information); |
| break; |
| case rtcp::Sdes::kPacketType: |
| - HandleSDES(rtcp_block, *packet_information); |
| + HandleSDES(rtcp_block, packet_information); |
| break; |
| case rtcp::ExtendedReports::kPacketType: |
| - HandleXr(rtcp_block, *packet_information); |
| + HandleXr(rtcp_block, packet_information); |
| break; |
| case rtcp::Bye::kPacketType: |
| HandleBYE(rtcp_block); |
| @@ -339,16 +393,16 @@ bool RTCPReceiver::ParseCompoundPacket( |
| case rtcp::Rtpfb::kPacketType: |
| switch (rtcp_block.fmt()) { |
| case rtcp::Nack::kFeedbackMessageType: |
| - HandleNACK(rtcp_block, *packet_information); |
| + HandleNACK(rtcp_block, packet_information); |
| break; |
| case rtcp::Tmmbr::kFeedbackMessageType: |
| - HandleTMMBR(rtcp_block, *packet_information); |
| + HandleTMMBR(rtcp_block, packet_information); |
| break; |
| case rtcp::Tmmbn::kFeedbackMessageType: |
| - HandleTMMBN(rtcp_block, *packet_information); |
| + HandleTMMBN(rtcp_block, packet_information); |
| break; |
| case rtcp::RapidResyncRequest::kFeedbackMessageType: |
| - HandleSR_REQ(rtcp_block, *packet_information); |
| + HandleSR_REQ(rtcp_block, packet_information); |
| break; |
| case rtcp::TransportFeedback::kFeedbackMessageType: |
| HandleTransportFeedback(rtcp_block, packet_information); |
| @@ -361,19 +415,19 @@ bool RTCPReceiver::ParseCompoundPacket( |
| case rtcp::Psfb::kPacketType: |
| switch (rtcp_block.fmt()) { |
| case rtcp::Pli::kFeedbackMessageType: |
| - HandlePLI(rtcp_block, *packet_information); |
| + HandlePLI(rtcp_block, packet_information); |
| break; |
| case rtcp::Sli::kFeedbackMessageType: |
| - HandleSLI(rtcp_block, *packet_information); |
| + HandleSLI(rtcp_block, packet_information); |
| break; |
| case rtcp::Rpsi::kFeedbackMessageType: |
| - HandleRPSI(rtcp_block, *packet_information); |
| + HandleRPSI(rtcp_block, packet_information); |
| break; |
| case rtcp::Fir::kFeedbackMessageType: |
| - HandleFIR(rtcp_block, *packet_information); |
| + HandleFIR(rtcp_block, packet_information); |
| break; |
| case rtcp::Remb::kFeedbackMessageType: |
| - HandlePsfbApp(rtcp_block, *packet_information); |
| + HandlePsfbApp(rtcp_block, packet_information); |
| break; |
| default: |
| ++num_skipped_packets_; |
| @@ -404,9 +458,8 @@ bool RTCPReceiver::ParseCompoundPacket( |
| return true; |
| } |
| -void RTCPReceiver::HandleSenderReport( |
| - const CommonHeader& rtcp_block, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| +void RTCPReceiver::HandleSenderReport(const CommonHeader& rtcp_block, |
| + PacketInformation* packet_information) { |
| rtcp::SenderReport sender_report; |
| if (!sender_report.Parse(rtcp_block)) { |
| ++num_skipped_packets_; |
| @@ -415,7 +468,7 @@ void RTCPReceiver::HandleSenderReport( |
| const uint32_t remoteSSRC = sender_report.sender_ssrc(); |
| - rtcpPacketInformation.remoteSSRC = remoteSSRC; |
| + packet_information->remoteSSRC = remoteSSRC; |
| RTCPReceiveInformation* ptrReceiveInfo = CreateReceiveInformation(remoteSSRC); |
| if (!ptrReceiveInfo) |
| @@ -427,11 +480,11 @@ void RTCPReceiver::HandleSenderReport( |
| // Have I received RTP packets from this party? |
| if (_remoteSSRC == remoteSSRC) { |
| // Only signal that we have received a SR when we accept one. |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpSr; |
| + packet_information->rtcpPacketTypeFlags |= kRtcpSr; |
| - rtcpPacketInformation.ntp_secs = sender_report.ntp().seconds(); |
| - rtcpPacketInformation.ntp_frac = sender_report.ntp().fractions(); |
| - rtcpPacketInformation.rtp_timestamp = sender_report.rtp_timestamp(); |
| + packet_information->ntp_secs = sender_report.ntp().seconds(); |
| + packet_information->ntp_frac = sender_report.ntp().fractions(); |
| + packet_information->rtp_timestamp = sender_report.rtp_timestamp(); |
| // Save the NTP time of this report. |
| _remoteSenderInfo.NTPseconds = sender_report.ntp().seconds(); |
| @@ -444,18 +497,17 @@ void RTCPReceiver::HandleSenderReport( |
| } else { |
| // We will only store the send report from one source, but |
| // we will store all the receive blocks. |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpRr; |
| + packet_information->rtcpPacketTypeFlags |= kRtcpRr; |
| } |
| // Update that this remote is alive. |
| ptrReceiveInfo->last_time_received_ms = _clock->TimeInMilliseconds(); |
| for (const rtcp::ReportBlock report_block : sender_report.report_blocks()) |
| - HandleReportBlock(report_block, rtcpPacketInformation, remoteSSRC); |
| + HandleReportBlock(report_block, packet_information, remoteSSRC); |
| } |
| -void RTCPReceiver::HandleReceiverReport( |
| - const CommonHeader& rtcp_block, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| +void RTCPReceiver::HandleReceiverReport(const CommonHeader& rtcp_block, |
| + PacketInformation* packet_information) { |
| rtcp::ReceiverReport receiver_report; |
| if (!receiver_report.Parse(rtcp_block)) { |
| ++num_skipped_packets_; |
| @@ -464,7 +516,7 @@ void RTCPReceiver::HandleReceiverReport( |
| const uint32_t remoteSSRC = receiver_report.sender_ssrc(); |
| - rtcpPacketInformation.remoteSSRC = remoteSSRC; |
| + packet_information->remoteSSRC = remoteSSRC; |
| RTCPReceiveInformation* ptrReceiveInfo = CreateReceiveInformation(remoteSSRC); |
| if (!ptrReceiveInfo) |
| @@ -473,19 +525,18 @@ void RTCPReceiver::HandleReceiverReport( |
| TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), "RR", |
| "remote_ssrc", remoteSSRC, "ssrc", main_ssrc_); |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpRr; |
| + packet_information->rtcpPacketTypeFlags |= kRtcpRr; |
| // Update that this remote is alive. |
| ptrReceiveInfo->last_time_received_ms = _clock->TimeInMilliseconds(); |
| for (const ReportBlock& report_block : receiver_report.report_blocks()) |
| - HandleReportBlock(report_block, rtcpPacketInformation, remoteSSRC); |
| + HandleReportBlock(report_block, packet_information, remoteSSRC); |
| } |
| -void RTCPReceiver::HandleReportBlock( |
| - const ReportBlock& report_block, |
| - RTCPPacketInformation& rtcpPacketInformation, |
| - uint32_t remoteSSRC) { |
| +void RTCPReceiver::HandleReportBlock(const ReportBlock& report_block, |
| + PacketInformation* packet_information, |
| + uint32_t remoteSSRC) { |
| // This will be called once per report block in the RTCP packet. |
| // We filter out all report blocks that are not for us. |
| // Each packet has max 31 RR blocks. |
| @@ -574,7 +625,7 @@ void RTCPReceiver::HandleReportBlock( |
| TRACE_COUNTER_ID1(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), "RR_RTT", |
| report_block.source_ssrc(), rtt); |
| - rtcpPacketInformation.AddReportInfo(*reportBlock); |
| + packet_information->AddReportInfo(*reportBlock); |
| } |
| RTCPReportBlockInformation* RTCPReceiver::CreateOrGetReportBlockInformation( |
| @@ -750,7 +801,7 @@ std::vector<rtcp::TmmbItem> RTCPReceiver::BoundingSet(bool* tmmbr_owner) { |
| } |
| void RTCPReceiver::HandleSDES(const CommonHeader& rtcp_block, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| + PacketInformation* packet_information) { |
| rtcp::Sdes sdes; |
| if (!sdes.Parse(rtcp_block)) { |
| ++num_skipped_packets_; |
| @@ -769,11 +820,11 @@ void RTCPReceiver::HandleSDES(const CommonHeader& rtcp_block, |
| stats_callback_->CNameChanged(chunk.cname.c_str(), chunk.ssrc); |
| } |
| } |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpSdes; |
| + packet_information->rtcpPacketTypeFlags |= kRtcpSdes; |
| } |
| void RTCPReceiver::HandleNACK(const CommonHeader& rtcp_block, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| + PacketInformation* packet_information) { |
| rtcp::Nack nack; |
| if (!nack.Parse(rtcp_block)) { |
| ++num_skipped_packets_; |
| @@ -783,12 +834,12 @@ void RTCPReceiver::HandleNACK(const CommonHeader& rtcp_block, |
| if (receiver_only_ || main_ssrc_ != nack.media_ssrc()) // Not to us. |
| return; |
| - rtcpPacketInformation.nackSequenceNumbers = nack.packet_ids(); |
| + packet_information->nackSequenceNumbers = nack.packet_ids(); |
| for (uint16_t packet_id : nack.packet_ids()) |
| nack_stats_.ReportRequest(packet_id); |
| if (!nack.packet_ids().empty()) { |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpNack; |
| + packet_information->rtcpPacketTypeFlags |= kRtcpNack; |
| ++packet_type_counter_.nack_packets; |
| packet_type_counter_.nack_requests = nack_stats_.requests(); |
| packet_type_counter_.unique_nack_requests = nack_stats_.unique_requests(); |
| @@ -831,43 +882,42 @@ void RTCPReceiver::HandleBYE(const CommonHeader& rtcp_block) { |
| } |
| void RTCPReceiver::HandleXr(const CommonHeader& rtcp_block, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| + PacketInformation* packet_information) { |
| rtcp::ExtendedReports xr; |
| if (!xr.Parse(rtcp_block)) { |
| ++num_skipped_packets_; |
| return; |
| } |
| - rtcpPacketInformation.xr_originator_ssrc = xr.sender_ssrc(); |
| + packet_information->xr_originator_ssrc = xr.sender_ssrc(); |
| for (const rtcp::Rrtr& rrtr : xr.rrtrs()) |
| - HandleXrReceiveReferenceTime(rrtr, rtcpPacketInformation); |
| + HandleXrReceiveReferenceTime(rrtr, packet_information); |
| for (const rtcp::Dlrr& dlrr : xr.dlrrs()) { |
| for (const rtcp::ReceiveTimeInfo& time_info : dlrr.sub_blocks()) |
| - HandleXrDlrrReportBlock(time_info, rtcpPacketInformation); |
| + HandleXrDlrrReportBlock(time_info, packet_information); |
| } |
| } |
| void RTCPReceiver::HandleXrReceiveReferenceTime( |
| const rtcp::Rrtr& rrtr, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| - _remoteXRReceiveTimeInfo.sourceSSRC = |
| - rtcpPacketInformation.xr_originator_ssrc; |
| + PacketInformation* packet_information) { |
| + _remoteXRReceiveTimeInfo.sourceSSRC = packet_information->xr_originator_ssrc; |
| _remoteXRReceiveTimeInfo.lastRR = CompactNtp(rrtr.ntp()); |
| _clock->CurrentNtp(_lastReceivedXRNTPsecs, _lastReceivedXRNTPfrac); |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpXrReceiverReferenceTime; |
| + packet_information->rtcpPacketTypeFlags |= kRtcpXrReceiverReferenceTime; |
| } |
| void RTCPReceiver::HandleXrDlrrReportBlock( |
| const rtcp::ReceiveTimeInfo& rti, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| + PacketInformation* packet_information) { |
| if (registered_ssrcs_.count(rti.ssrc) == 0) // Not to us. |
| return; |
| - rtcpPacketInformation.xr_dlrr_item = true; |
| + packet_information->xr_dlrr_item = true; |
| // Caller should explicitly enable rtt calculation using extended reports. |
| if (!xr_rrtr_status_) |
| @@ -886,11 +936,11 @@ void RTCPReceiver::HandleXrDlrrReportBlock( |
| uint32_t rtt_ntp = now - delay_rr - send_time; |
| xr_rr_rtt_ms_ = CompactNtpRttToMs(rtt_ntp); |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpXrDlrrReportBlock; |
| + packet_information->rtcpPacketTypeFlags |= kRtcpXrDlrrReportBlock; |
| } |
| void RTCPReceiver::HandlePLI(const CommonHeader& rtcp_block, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| + PacketInformation* packet_information) { |
| rtcp::Pli pli; |
| if (!pli.Parse(rtcp_block)) { |
| ++num_skipped_packets_; |
| @@ -902,12 +952,12 @@ void RTCPReceiver::HandlePLI(const CommonHeader& rtcp_block, |
| ++packet_type_counter_.pli_packets; |
| // Received a signal that we need to send a new key frame. |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpPli; |
| + packet_information->rtcpPacketTypeFlags |= kRtcpPli; |
| } |
| } |
| void RTCPReceiver::HandleTMMBR(const CommonHeader& rtcp_block, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| + PacketInformation* packet_information) { |
| rtcp::Tmmbr tmmbr; |
| if (!tmmbr.Parse(rtcp_block)) { |
| ++num_skipped_packets_; |
| @@ -929,13 +979,13 @@ void RTCPReceiver::HandleTMMBR(const CommonHeader& rtcp_block, |
| if (main_ssrc_ == request.ssrc() && request.bitrate_bps()) { |
| ptrReceiveInfo->InsertTmmbrItem(senderSSRC, request, |
| _clock->TimeInMilliseconds()); |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpTmmbr; |
| + packet_information->rtcpPacketTypeFlags |= kRtcpTmmbr; |
| } |
| } |
| } |
| void RTCPReceiver::HandleTMMBN(const CommonHeader& rtcp_block, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| + PacketInformation* packet_information) { |
| rtcp::Tmmbn tmmbn; |
| if (!tmmbn.Parse(rtcp_block)) { |
| ++num_skipped_packets_; |
| @@ -947,25 +997,25 @@ void RTCPReceiver::HandleTMMBN(const CommonHeader& rtcp_block, |
| if (!ptrReceiveInfo) // This remote SSRC must be saved before. |
| return; |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpTmmbn; |
| + packet_information->rtcpPacketTypeFlags |= kRtcpTmmbn; |
| for (const auto& item : tmmbn.items()) |
| ptrReceiveInfo->tmmbn.push_back(item); |
| } |
| void RTCPReceiver::HandleSR_REQ(const CommonHeader& rtcp_block, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| + PacketInformation* packet_information) { |
| rtcp::RapidResyncRequest sr_req; |
| if (!sr_req.Parse(rtcp_block)) { |
| ++num_skipped_packets_; |
| return; |
| } |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpSrReq; |
| + packet_information->rtcpPacketTypeFlags |= kRtcpSrReq; |
| } |
| void RTCPReceiver::HandleSLI(const CommonHeader& rtcp_block, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| + PacketInformation* packet_information) { |
| rtcp::Sli sli; |
| if (!sli.Parse(rtcp_block)) { |
| ++num_skipped_packets_; |
| @@ -975,14 +1025,13 @@ void RTCPReceiver::HandleSLI(const CommonHeader& rtcp_block, |
| for (const rtcp::Sli::Macroblocks& item : sli.macroblocks()) { |
| // In theory there could be multiple slices lost. |
| // Received signal that we need to refresh a slice. |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpSli; |
| - rtcpPacketInformation.sliPictureId = item.picture_id(); |
| + packet_information->rtcpPacketTypeFlags |= kRtcpSli; |
| + packet_information->sliPictureId = item.picture_id(); |
| } |
| } |
| -void RTCPReceiver::HandleRPSI( |
| - const CommonHeader& rtcp_block, |
| - RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) { |
| +void RTCPReceiver::HandleRPSI(const CommonHeader& rtcp_block, |
| + PacketInformation* packet_information) { |
| rtcp::Rpsi rpsi; |
| if (!rpsi.Parse(rtcp_block)) { |
| ++num_skipped_packets_; |
| @@ -990,16 +1039,16 @@ void RTCPReceiver::HandleRPSI( |
| } |
| // Received signal that we have a confirmed reference picture. |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpRpsi; |
| - rtcpPacketInformation.rpsiPictureId = rpsi.picture_id(); |
| + packet_information->rtcpPacketTypeFlags |= kRtcpRpsi; |
| + packet_information->rpsiPictureId = rpsi.picture_id(); |
| } |
| void RTCPReceiver::HandlePsfbApp(const CommonHeader& rtcp_block, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| + PacketInformation* packet_information) { |
| rtcp::Remb remb; |
| if (remb.Parse(rtcp_block)) { |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpRemb; |
| - rtcpPacketInformation.receiverEstimatedMaxBitrate = remb.bitrate_bps(); |
| + packet_information->rtcpPacketTypeFlags |= kRtcpRemb; |
| + packet_information->receiverEstimatedMaxBitrate = remb.bitrate_bps(); |
| return; |
| } |
| @@ -1007,7 +1056,7 @@ void RTCPReceiver::HandlePsfbApp(const CommonHeader& rtcp_block, |
| } |
| void RTCPReceiver::HandleFIR(const CommonHeader& rtcp_block, |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| + PacketInformation* packet_information) { |
| rtcp::Fir fir; |
| if (!fir.Parse(rtcp_block)) { |
| ++num_skipped_packets_; |
| @@ -1036,19 +1085,19 @@ void RTCPReceiver::HandleFIR(const CommonHeader& rtcp_block, |
| ptrReceiveInfo->last_fir_request_ms = now; |
| ptrReceiveInfo->last_fir_sequence_number = fir_request.seq_nr; |
| // received signal that we need to send a new key frame |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpFir; |
| + packet_information->rtcpPacketTypeFlags |= kRtcpFir; |
| } |
| } |
| } else { |
| // received signal that we need to send a new key frame |
| - rtcpPacketInformation.rtcpPacketTypeFlags |= kRtcpFir; |
| + packet_information->rtcpPacketTypeFlags |= kRtcpFir; |
| } |
| } |
| } |
| void RTCPReceiver::HandleTransportFeedback( |
| const CommonHeader& rtcp_block, |
| - RTCPHelp::RTCPPacketInformation* rtcp_packet_information) { |
| + PacketInformation* packet_information) { |
| std::unique_ptr<rtcp::TransportFeedback> transport_feedback( |
| new rtcp::TransportFeedback()); |
| if (!transport_feedback->Parse(rtcp_block)) { |
| @@ -1056,8 +1105,8 @@ void RTCPReceiver::HandleTransportFeedback( |
| return; |
| } |
| - rtcp_packet_information->rtcpPacketTypeFlags |= kRtcpTransportFeedback; |
| - rtcp_packet_information->transport_feedback_ = std::move(transport_feedback); |
| + packet_information->rtcpPacketTypeFlags |= kRtcpTransportFeedback; |
| + packet_information->transport_feedback_ = std::move(transport_feedback); |
| } |
| void RTCPReceiver::UpdateTmmbr() { |
| @@ -1089,7 +1138,7 @@ RtcpStatisticsCallback* RTCPReceiver::GetRtcpStatisticsCallback() { |
| // Holding no Critical section |
| void RTCPReceiver::TriggerCallbacksFromRTCPPacket( |
| - RTCPPacketInformation& rtcpPacketInformation) { |
| + const PacketInformation& rtcpPacketInformation) { |
| // Process TMMBR and REMB first to avoid multiple callbacks |
| // to OnNetworkChanged. |
| if (rtcpPacketInformation.rtcpPacketTypeFlags & kRtcpTmmbr) { |