| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 configuration.outgoing_transport, | 75 configuration.outgoing_transport, |
| 76 configuration.paced_sender, | 76 configuration.paced_sender, |
| 77 nullptr, // TODO(brandtr): Wire up FlexfecSender here. | 77 nullptr, // TODO(brandtr): Wire up FlexfecSender here. |
| 78 configuration.transport_sequence_number_allocator, | 78 configuration.transport_sequence_number_allocator, |
| 79 configuration.transport_feedback_callback, | 79 configuration.transport_feedback_callback, |
| 80 configuration.send_bitrate_observer, | 80 configuration.send_bitrate_observer, |
| 81 configuration.send_frame_count_observer, | 81 configuration.send_frame_count_observer, |
| 82 configuration.send_side_delay_observer, | 82 configuration.send_side_delay_observer, |
| 83 configuration.event_log, | 83 configuration.event_log, |
| 84 configuration.send_packet_observer, | 84 configuration.send_packet_observer, |
| 85 configuration.retransmission_rate_limiter), | 85 configuration.retransmission_rate_limiter, |
| 86 configuration.overhead_size_observer), |
| 86 rtcp_sender_(configuration.audio, | 87 rtcp_sender_(configuration.audio, |
| 87 configuration.clock, | 88 configuration.clock, |
| 88 configuration.receive_statistics, | 89 configuration.receive_statistics, |
| 89 configuration.rtcp_packet_type_counter_observer, | 90 configuration.rtcp_packet_type_counter_observer, |
| 90 configuration.event_log, | 91 configuration.event_log, |
| 91 configuration.outgoing_transport), | 92 configuration.outgoing_transport), |
| 92 rtcp_receiver_(configuration.clock, | 93 rtcp_receiver_(configuration.clock, |
| 93 configuration.receiver_only, | 94 configuration.receiver_only, |
| 94 configuration.rtcp_packet_type_counter_observer, | 95 configuration.rtcp_packet_type_counter_observer, |
| 95 configuration.bandwidth_callback, | 96 configuration.bandwidth_callback, |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 return 0; | 454 return 0; |
| 454 } | 455 } |
| 455 | 456 |
| 456 void ModuleRtpRtcpImpl::SetTransportOverhead( | 457 void ModuleRtpRtcpImpl::SetTransportOverhead( |
| 457 int transport_overhead_per_packet) { | 458 int transport_overhead_per_packet) { |
| 458 RTC_DCHECK_GT(transport_overhead_per_packet, 0); | 459 RTC_DCHECK_GT(transport_overhead_per_packet, 0); |
| 459 int mtu = rtp_sender_.MaxPayloadLength() + packet_overhead_; | 460 int mtu = rtp_sender_.MaxPayloadLength() + packet_overhead_; |
| 460 RTC_DCHECK_LT(transport_overhead_per_packet, mtu); | 461 RTC_DCHECK_LT(transport_overhead_per_packet, mtu); |
| 461 size_t max_payload_length = mtu - transport_overhead_per_packet; | 462 size_t max_payload_length = mtu - transport_overhead_per_packet; |
| 462 packet_overhead_ = transport_overhead_per_packet; | 463 packet_overhead_ = transport_overhead_per_packet; |
| 464 rtp_sender_.SetTransportOverhead(packet_overhead_); |
| 463 rtcp_sender_.SetMaxPayloadLength(max_payload_length); | 465 rtcp_sender_.SetMaxPayloadLength(max_payload_length); |
| 464 rtp_sender_.SetMaxPayloadLength(max_payload_length); | 466 rtp_sender_.SetMaxPayloadLength(max_payload_length); |
| 465 } | 467 } |
| 466 | 468 |
| 467 int32_t ModuleRtpRtcpImpl::SetMaxTransferUnit(uint16_t mtu) { | 469 int32_t ModuleRtpRtcpImpl::SetMaxTransferUnit(uint16_t mtu) { |
| 468 RTC_DCHECK_LE(mtu, IP_PACKET_SIZE) << "MTU too large: " << mtu; | 470 RTC_DCHECK_LE(mtu, IP_PACKET_SIZE) << "MTU too large: " << mtu; |
| 469 RTC_DCHECK_GT(mtu, packet_overhead_) << "MTU too small: " << mtu; | 471 RTC_DCHECK_GT(mtu, packet_overhead_) << "MTU too small: " << mtu; |
| 470 size_t max_payload_length = mtu - packet_overhead_; | 472 size_t max_payload_length = mtu - packet_overhead_; |
| 471 rtcp_sender_.SetMaxPayloadLength(max_payload_length); | 473 rtcp_sender_.SetMaxPayloadLength(max_payload_length); |
| 472 rtp_sender_.SetMaxPayloadLength(max_payload_length); | 474 rtp_sender_.SetMaxPayloadLength(max_payload_length); |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( | 947 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( |
| 946 StreamDataCountersCallback* callback) { | 948 StreamDataCountersCallback* callback) { |
| 947 rtp_sender_.RegisterRtpStatisticsCallback(callback); | 949 rtp_sender_.RegisterRtpStatisticsCallback(callback); |
| 948 } | 950 } |
| 949 | 951 |
| 950 StreamDataCountersCallback* | 952 StreamDataCountersCallback* |
| 951 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { | 953 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { |
| 952 return rtp_sender_.GetRtpStatisticsCallback(); | 954 return rtp_sender_.GetRtpStatisticsCallback(); |
| 953 } | 955 } |
| 954 } // namespace webrtc | 956 } // namespace webrtc |
| OLD | NEW |