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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc

Issue 2274573002: Adjust RtcpReceiver to be testable with callbacks: (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: RtpRtcpSender -> ModuleRtpRtcp Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
index ba7ca7e621c5bbebc97980587691ec1ba1a36cdf..78ad5a0ef251386928f3cd9f077126464f159874 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -223,21 +223,7 @@ void ModuleRtpRtcpImpl::SetRtxSendPayloadType(int payload_type,
int32_t ModuleRtpRtcpImpl::IncomingRtcpPacket(
const uint8_t* rtcp_packet,
const size_t length) {
- // Allow receive of non-compound RTCP packets.
- RTCPUtility::RTCPParserV2 rtcp_parser(rtcp_packet, length, true);
-
- const bool valid_rtcpheader = rtcp_parser.IsValid();
- if (!valid_rtcpheader) {
- LOG(LS_WARNING) << "Incoming invalid RTCP packet";
- return -1;
- }
- RTCPHelp::RTCPPacketInformation rtcp_packet_information;
- int32_t ret_val =
- rtcp_receiver_.IncomingRTCPPacket(rtcp_packet_information, &rtcp_parser);
- if (ret_val == 0) {
- rtcp_receiver_.TriggerCallbacksFromRTCPPacket(rtcp_packet_information);
- }
- return ret_val;
+ return rtcp_receiver_.IncomingPacket(rtcp_packet, length) ? 0 : -1;
}
int32_t ModuleRtpRtcpImpl::RegisterSendPayload(
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698