| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 void ModuleRtpRtcpImpl::SetRtxSsrc(uint32_t ssrc) { | 223 void ModuleRtpRtcpImpl::SetRtxSsrc(uint32_t ssrc) { |
| 224 rtp_sender_.SetRtxSsrc(ssrc); | 224 rtp_sender_.SetRtxSsrc(ssrc); |
| 225 } | 225 } |
| 226 | 226 |
| 227 void ModuleRtpRtcpImpl::SetRtxSendPayloadType(int payload_type, | 227 void ModuleRtpRtcpImpl::SetRtxSendPayloadType(int payload_type, |
| 228 int associated_payload_type) { | 228 int associated_payload_type) { |
| 229 rtp_sender_.SetRtxPayloadType(payload_type, associated_payload_type); | 229 rtp_sender_.SetRtxPayloadType(payload_type, associated_payload_type); |
| 230 } | 230 } |
| 231 | 231 |
| 232 rtc::Optional<uint32_t> ModuleRtpRtcpImpl::FlexfecSsrc() const { |
| 233 return rtp_sender_.FlexfecSsrc(); |
| 234 } |
| 235 |
| 232 int32_t ModuleRtpRtcpImpl::IncomingRtcpPacket( | 236 int32_t ModuleRtpRtcpImpl::IncomingRtcpPacket( |
| 233 const uint8_t* rtcp_packet, | 237 const uint8_t* rtcp_packet, |
| 234 const size_t length) { | 238 const size_t length) { |
| 235 return rtcp_receiver_.IncomingPacket(rtcp_packet, length) ? 0 : -1; | 239 return rtcp_receiver_.IncomingPacket(rtcp_packet, length) ? 0 : -1; |
| 236 } | 240 } |
| 237 | 241 |
| 238 int32_t ModuleRtpRtcpImpl::RegisterSendPayload( | 242 int32_t ModuleRtpRtcpImpl::RegisterSendPayload( |
| 239 const CodecInst& voice_codec) { | 243 const CodecInst& voice_codec) { |
| 240 return rtp_sender_.RegisterPayload( | 244 return rtp_sender_.RegisterPayload( |
| 241 voice_codec.plname, voice_codec.pltype, voice_codec.plfreq, | 245 voice_codec.plname, voice_codec.pltype, voice_codec.plfreq, |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 return rtp_sender_.SendOutgoingData( | 397 return rtp_sender_.SendOutgoingData( |
| 394 frame_type, payload_type, time_stamp, capture_time_ms, payload_data, | 398 frame_type, payload_type, time_stamp, capture_time_ms, payload_data, |
| 395 payload_size, fragmentation, rtp_video_header, transport_frame_id_out); | 399 payload_size, fragmentation, rtp_video_header, transport_frame_id_out); |
| 396 } | 400 } |
| 397 | 401 |
| 398 bool ModuleRtpRtcpImpl::TimeToSendPacket(uint32_t ssrc, | 402 bool ModuleRtpRtcpImpl::TimeToSendPacket(uint32_t ssrc, |
| 399 uint16_t sequence_number, | 403 uint16_t sequence_number, |
| 400 int64_t capture_time_ms, | 404 int64_t capture_time_ms, |
| 401 bool retransmission, | 405 bool retransmission, |
| 402 int probe_cluster_id) { | 406 int probe_cluster_id) { |
| 403 if (SendingMedia() && ssrc == rtp_sender_.SSRC()) { | 407 if (!SendingMedia()) { |
| 404 return rtp_sender_.TimeToSendPacket(sequence_number, capture_time_ms, | 408 return true; |
| 409 } |
| 410 uint32_t media_ssrc = rtp_sender_.SSRC(); |
| 411 rtc::Optional<uint32_t> flexfec_ssrc = rtp_sender_.FlexfecSsrc(); |
| 412 if (ssrc == media_ssrc || (flexfec_ssrc && ssrc == flexfec_ssrc)) { |
| 413 return rtp_sender_.TimeToSendPacket(ssrc, sequence_number, capture_time_ms, |
| 405 retransmission, probe_cluster_id); | 414 retransmission, probe_cluster_id); |
| 406 } | 415 } |
| 407 // No RTP sender is interested in sending this packet. | 416 // No RTP sender is interested in sending this packet. |
| 408 return true; | 417 return true; |
| 409 } | 418 } |
| 410 | 419 |
| 411 size_t ModuleRtpRtcpImpl::TimeToSendPadding(size_t bytes, | 420 size_t ModuleRtpRtcpImpl::TimeToSendPadding(size_t bytes, |
| 412 int probe_cluster_id) { | 421 int probe_cluster_id) { |
| 413 return rtp_sender_.TimeToSendPadding(bytes, probe_cluster_id); | 422 return rtp_sender_.TimeToSendPadding(bytes, probe_cluster_id); |
| 414 } | 423 } |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( | 954 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( |
| 946 StreamDataCountersCallback* callback) { | 955 StreamDataCountersCallback* callback) { |
| 947 rtp_sender_.RegisterRtpStatisticsCallback(callback); | 956 rtp_sender_.RegisterRtpStatisticsCallback(callback); |
| 948 } | 957 } |
| 949 | 958 |
| 950 StreamDataCountersCallback* | 959 StreamDataCountersCallback* |
| 951 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { | 960 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { |
| 952 return rtp_sender_.GetRtpStatisticsCallback(); | 961 return rtp_sender_.GetRtpStatisticsCallback(); |
| 953 } | 962 } |
| 954 } // namespace webrtc | 963 } // namespace webrtc |
| OLD | NEW |