| OLD | NEW |
| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 } | 218 } |
| 219 | 219 |
| 220 void ModuleRtpRtcpImpl::SetRtxSendPayloadType(int payload_type, | 220 void ModuleRtpRtcpImpl::SetRtxSendPayloadType(int payload_type, |
| 221 int associated_payload_type) { | 221 int associated_payload_type) { |
| 222 rtp_sender_.SetRtxPayloadType(payload_type, associated_payload_type); | 222 rtp_sender_.SetRtxPayloadType(payload_type, associated_payload_type); |
| 223 } | 223 } |
| 224 | 224 |
| 225 int32_t ModuleRtpRtcpImpl::IncomingRtcpPacket( | 225 int32_t ModuleRtpRtcpImpl::IncomingRtcpPacket( |
| 226 const uint8_t* rtcp_packet, | 226 const uint8_t* rtcp_packet, |
| 227 const size_t length) { | 227 const size_t length) { |
| 228 // Allow receive of non-compound RTCP packets. | 228 return rtcp_receiver_.IncomingPacket(rtcp_packet, length) ? 0 : -1; |
| 229 RTCPUtility::RTCPParserV2 rtcp_parser(rtcp_packet, length, true); | |
| 230 | |
| 231 const bool valid_rtcpheader = rtcp_parser.IsValid(); | |
| 232 if (!valid_rtcpheader) { | |
| 233 LOG(LS_WARNING) << "Incoming invalid RTCP packet"; | |
| 234 return -1; | |
| 235 } | |
| 236 RTCPHelp::RTCPPacketInformation rtcp_packet_information; | |
| 237 int32_t ret_val = rtcp_receiver_.IncomingRTCPPacket( | |
| 238 rtcp_packet_information, &rtcp_parser); | |
| 239 if (ret_val == 0) { | |
| 240 rtcp_receiver_.TriggerCallbacksFromRTCPPacket(rtcp_packet_information); | |
| 241 } | |
| 242 return ret_val; | |
| 243 } | 229 } |
| 244 | 230 |
| 245 int32_t ModuleRtpRtcpImpl::RegisterSendPayload( | 231 int32_t ModuleRtpRtcpImpl::RegisterSendPayload( |
| 246 const CodecInst& voice_codec) { | 232 const CodecInst& voice_codec) { |
| 247 return rtp_sender_.RegisterPayload( | 233 return rtp_sender_.RegisterPayload( |
| 248 voice_codec.plname, | 234 voice_codec.plname, |
| 249 voice_codec.pltype, | 235 voice_codec.pltype, |
| 250 voice_codec.plfreq, | 236 voice_codec.plfreq, |
| 251 voice_codec.channels, | 237 voice_codec.channels, |
| 252 (voice_codec.rate < 0) ? 0 : voice_codec.rate); | 238 (voice_codec.rate < 0) ? 0 : voice_codec.rate); |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( | 964 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( |
| 979 StreamDataCountersCallback* callback) { | 965 StreamDataCountersCallback* callback) { |
| 980 rtp_sender_.RegisterRtpStatisticsCallback(callback); | 966 rtp_sender_.RegisterRtpStatisticsCallback(callback); |
| 981 } | 967 } |
| 982 | 968 |
| 983 StreamDataCountersCallback* | 969 StreamDataCountersCallback* |
| 984 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { | 970 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { |
| 985 return rtp_sender_.GetRtpStatisticsCallback(); | 971 return rtp_sender_.GetRtpStatisticsCallback(); |
| 986 } | 972 } |
| 987 } // namespace webrtc | 973 } // namespace webrtc |
| OLD | NEW |