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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 } | 785 } |
786 | 786 |
787 // TODO(sprang): Add a unit test for this, or remove if the code isn't used. | 787 // TODO(sprang): Add a unit test for this, or remove if the code isn't used. |
788 rtc::scoped_ptr<rtcp::RtcpPacket> RTCPSender::BuildVoIPMetric( | 788 rtc::scoped_ptr<rtcp::RtcpPacket> RTCPSender::BuildVoIPMetric( |
789 const RtcpContext& context) { | 789 const RtcpContext& context) { |
790 rtcp::Xr* xr = new rtcp::Xr(); | 790 rtcp::Xr* xr = new rtcp::Xr(); |
791 xr->From(ssrc_); | 791 xr->From(ssrc_); |
792 | 792 |
793 rtcp::VoipMetric voip; | 793 rtcp::VoipMetric voip; |
794 voip.To(remote_ssrc_); | 794 voip.To(remote_ssrc_); |
795 voip.LossRate(xr_voip_metric_.lossRate); | 795 voip.WithVoipMetric(xr_voip_metric_); |
796 voip.DiscardRate(xr_voip_metric_.discardRate); | |
797 voip.BurstDensity(xr_voip_metric_.burstDensity); | |
798 voip.GapDensity(xr_voip_metric_.gapDensity); | |
799 voip.BurstDuration(xr_voip_metric_.burstDuration); | |
800 voip.GapDuration(xr_voip_metric_.gapDuration); | |
801 voip.RoundTripDelay(xr_voip_metric_.roundTripDelay); | |
802 voip.EndSystemDelay(xr_voip_metric_.endSystemDelay); | |
803 voip.SignalLevel(xr_voip_metric_.signalLevel); | |
804 voip.NoiseLevel(xr_voip_metric_.noiseLevel); | |
805 voip.Rerl(xr_voip_metric_.RERL); | |
806 voip.Gmin(xr_voip_metric_.Gmin); | |
807 voip.Rfactor(xr_voip_metric_.Rfactor); | |
808 voip.ExtRfactor(xr_voip_metric_.extRfactor); | |
809 voip.MosLq(xr_voip_metric_.MOSLQ); | |
810 voip.MosCq(xr_voip_metric_.MOSCQ); | |
811 voip.RxConfig(xr_voip_metric_.RXconfig); | |
812 voip.JbNominal(xr_voip_metric_.JBnominal); | |
813 voip.JbMax(xr_voip_metric_.JBmax); | |
814 voip.JbAbsMax(xr_voip_metric_.JBabsMax); | |
815 | 796 |
816 xr->WithVoipMetric(&voip); | 797 xr->WithVoipMetric(&voip); |
817 | 798 |
818 return rtc::scoped_ptr<rtcp::Xr>(xr); | 799 return rtc::scoped_ptr<rtcp::Xr>(xr); |
819 } | 800 } |
820 | 801 |
821 int32_t RTCPSender::SendRTCP(const FeedbackState& feedback_state, | 802 int32_t RTCPSender::SendRTCP(const FeedbackState& feedback_state, |
822 RTCPPacketType packetType, | 803 RTCPPacketType packetType, |
823 int32_t nack_size, | 804 int32_t nack_size, |
824 const uint16_t* nack_list, | 805 const uint16_t* nack_list, |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 Transport* const transport_; | 1069 Transport* const transport_; |
1089 bool send_failure_; | 1070 bool send_failure_; |
1090 } sender(transport_); | 1071 } sender(transport_); |
1091 | 1072 |
1092 uint8_t buffer[IP_PACKET_SIZE]; | 1073 uint8_t buffer[IP_PACKET_SIZE]; |
1093 return packet.BuildExternalBuffer(buffer, IP_PACKET_SIZE, &sender) && | 1074 return packet.BuildExternalBuffer(buffer, IP_PACKET_SIZE, &sender) && |
1094 !sender.send_failure_; | 1075 !sender.send_failure_; |
1095 } | 1076 } |
1096 | 1077 |
1097 } // namespace webrtc | 1078 } // namespace webrtc |
OLD | NEW |