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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 } else { | 54 } else { |
55 // No clock implementation provided, use default clock. | 55 // No clock implementation provided, use default clock. |
56 RtpRtcp::Configuration configuration_copy; | 56 RtpRtcp::Configuration configuration_copy; |
57 memcpy(&configuration_copy, &configuration, | 57 memcpy(&configuration_copy, &configuration, |
58 sizeof(RtpRtcp::Configuration)); | 58 sizeof(RtpRtcp::Configuration)); |
59 configuration_copy.clock = Clock::GetRealTimeClock(); | 59 configuration_copy.clock = Clock::GetRealTimeClock(); |
60 return new ModuleRtpRtcpImpl(configuration_copy); | 60 return new ModuleRtpRtcpImpl(configuration_copy); |
61 } | 61 } |
62 } | 62 } |
63 | 63 |
| 64 // Deprecated. |
| 65 int32_t RtpRtcp::SetFecParameters(const FecProtectionParams* delta_params, |
| 66 const FecProtectionParams* key_params) { |
| 67 RTC_DCHECK(delta_params); |
| 68 RTC_DCHECK(key_params); |
| 69 return SetFecParameters(*delta_params, *key_params) ? 0 : -1; |
| 70 } |
| 71 |
64 ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration) | 72 ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration) |
65 : rtp_sender_(configuration.audio, | 73 : rtp_sender_(configuration.audio, |
66 configuration.clock, | 74 configuration.clock, |
67 configuration.outgoing_transport, | 75 configuration.outgoing_transport, |
68 configuration.paced_sender, | 76 configuration.paced_sender, |
69 configuration.transport_sequence_number_allocator, | 77 configuration.transport_sequence_number_allocator, |
70 configuration.transport_feedback_callback, | 78 configuration.transport_feedback_callback, |
71 configuration.send_bitrate_observer, | 79 configuration.send_bitrate_observer, |
72 configuration.send_frame_count_observer, | 80 configuration.send_frame_count_observer, |
73 configuration.send_side_delay_observer, | 81 configuration.send_side_delay_observer, |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 const uint8_t picture_id) { | 795 const uint8_t picture_id) { |
788 return rtcp_sender_.SendRTCP( | 796 return rtcp_sender_.SendRTCP( |
789 GetFeedbackState(), kRtcpSli, 0, 0, false, picture_id); | 797 GetFeedbackState(), kRtcpSli, 0, 0, false, picture_id); |
790 } | 798 } |
791 | 799 |
792 void ModuleRtpRtcpImpl::SetUlpfecConfig(int red_payload_type, | 800 void ModuleRtpRtcpImpl::SetUlpfecConfig(int red_payload_type, |
793 int ulpfec_payload_type) { | 801 int ulpfec_payload_type) { |
794 rtp_sender_.SetUlpfecConfig(red_payload_type, ulpfec_payload_type); | 802 rtp_sender_.SetUlpfecConfig(red_payload_type, ulpfec_payload_type); |
795 } | 803 } |
796 | 804 |
797 int32_t ModuleRtpRtcpImpl::SetFecParameters( | 805 bool ModuleRtpRtcpImpl::SetFecParameters( |
798 const FecProtectionParams* delta_params, | 806 const FecProtectionParams& delta_params, |
799 const FecProtectionParams* key_params) { | 807 const FecProtectionParams& key_params) { |
800 return rtp_sender_.SetFecParameters(delta_params, key_params); | 808 return rtp_sender_.SetFecParameters(delta_params, key_params); |
801 } | 809 } |
802 | 810 |
803 void ModuleRtpRtcpImpl::SetRemoteSSRC(const uint32_t ssrc) { | 811 void ModuleRtpRtcpImpl::SetRemoteSSRC(const uint32_t ssrc) { |
804 // Inform about the incoming SSRC. | 812 // Inform about the incoming SSRC. |
805 rtcp_sender_.SetRemoteSSRC(ssrc); | 813 rtcp_sender_.SetRemoteSSRC(ssrc); |
806 rtcp_receiver_.SetRemoteSSRC(ssrc); | 814 rtcp_receiver_.SetRemoteSSRC(ssrc); |
807 | 815 |
808 // Check for a SSRC collision. | 816 // Check for a SSRC collision. |
809 if (rtp_sender_.SSRC() == ssrc && !collision_detected_) { | 817 if (rtp_sender_.SSRC() == ssrc && !collision_detected_) { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( | 933 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( |
926 StreamDataCountersCallback* callback) { | 934 StreamDataCountersCallback* callback) { |
927 rtp_sender_.RegisterRtpStatisticsCallback(callback); | 935 rtp_sender_.RegisterRtpStatisticsCallback(callback); |
928 } | 936 } |
929 | 937 |
930 StreamDataCountersCallback* | 938 StreamDataCountersCallback* |
931 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { | 939 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { |
932 return rtp_sender_.GetRtpStatisticsCallback(); | 940 return rtp_sender_.GetRtpStatisticsCallback(); |
933 } | 941 } |
934 } // namespace webrtc | 942 } // namespace webrtc |
OLD | NEW |