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 9c0d66d1af91d3810cb3624014de18f7f0a1d3cb..4d30bb0784742926b929b6ab936f778b14ab950f 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc |
@@ -20,7 +20,6 @@ |
#include "webrtc/base/trace_event.h" |
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" |
#include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" |
-#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h" |
#include "webrtc/modules/rtp_rtcp/source/time_util.h" |
#include "webrtc/modules/rtp_rtcp/source/tmmbr_help.h" |
#include "webrtc/system_wrappers/include/ntp_time.h" |
@@ -46,7 +45,7 @@ RTCPReceiver::RTCPReceiver( |
RtcpBandwidthObserver* rtcp_bandwidth_observer, |
RtcpIntraFrameObserver* rtcp_intra_frame_observer, |
TransportFeedbackObserver* transport_feedback_observer, |
- ModuleRtpRtcpImpl* owner) |
+ ModuleRtpRtcp* owner) |
: _clock(clock), |
receiver_only_(receiver_only), |
_lastReceived(0), |
@@ -97,6 +96,20 @@ RTCPReceiver::~RTCPReceiver() { |
} |
} |
+bool RTCPReceiver::IncomingPacket(const uint8_t* packet, size_t packet_size) { |
+ // Allow receive of non-compound RTCP packets. |
+ RTCPUtility::RTCPParserV2 rtcp_parser(packet, packet_size, true); |
+ |
+ if (!rtcp_parser.IsValid()) { |
+ LOG(LS_WARNING) << "Incoming invalid RTCP packet"; |
+ return false; |
+ } |
+ RTCPHelp::RTCPPacketInformation rtcp_packet_information; |
+ IncomingRTCPPacket(rtcp_packet_information, &rtcp_parser); |
+ TriggerCallbacksFromRTCPPacket(rtcp_packet_information); |
+ return true; |
+} |
+ |
int64_t RTCPReceiver::LastReceived() { |
rtc::CritScope lock(&_criticalSectionRTCPReceiver); |
return _lastReceived; |