Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_sender.cc

Issue 1452733002: rtcp::VoipMetric block moved into own file and got Parse function (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 return BuildResult::kSuccess; 879 return BuildResult::kSuccess;
880 } 880 }
881 881
882 // TODO(sprang): Add a unit test for this, or remove if the code isn't used. 882 // TODO(sprang): Add a unit test for this, or remove if the code isn't used.
883 RTCPSender::BuildResult RTCPSender::BuildVoIPMetric(RtcpContext* ctx) { 883 RTCPSender::BuildResult RTCPSender::BuildVoIPMetric(RtcpContext* ctx) {
884 rtcp::Xr xr; 884 rtcp::Xr xr;
885 xr.From(ssrc_); 885 xr.From(ssrc_);
886 886
887 rtcp::VoipMetric voip; 887 rtcp::VoipMetric voip;
888 voip.To(remote_ssrc_); 888 voip.To(remote_ssrc_);
889 voip.LossRate(xr_voip_metric_.lossRate); 889 voip.WithVoipMetric(xr_voip_metric_);
890 voip.DiscardRate(xr_voip_metric_.discardRate);
891 voip.BurstDensity(xr_voip_metric_.burstDensity);
892 voip.GapDensity(xr_voip_metric_.gapDensity);
893 voip.BurstDuration(xr_voip_metric_.burstDuration);
894 voip.GapDuration(xr_voip_metric_.gapDuration);
895 voip.RoundTripDelay(xr_voip_metric_.roundTripDelay);
896 voip.EndSystemDelay(xr_voip_metric_.endSystemDelay);
897 voip.SignalLevel(xr_voip_metric_.signalLevel);
898 voip.NoiseLevel(xr_voip_metric_.noiseLevel);
899 voip.Rerl(xr_voip_metric_.RERL);
900 voip.Gmin(xr_voip_metric_.Gmin);
901 voip.Rfactor(xr_voip_metric_.Rfactor);
902 voip.ExtRfactor(xr_voip_metric_.extRfactor);
903 voip.MosLq(xr_voip_metric_.MOSLQ);
904 voip.MosCq(xr_voip_metric_.MOSCQ);
905 voip.RxConfig(xr_voip_metric_.RXconfig);
906 voip.JbNominal(xr_voip_metric_.JBnominal);
907 voip.JbMax(xr_voip_metric_.JBmax);
908 voip.JbAbsMax(xr_voip_metric_.JBabsMax);
909 890
910 xr.WithVoipMetric(&voip); 891 xr.WithVoipMetric(&voip);
911 892
912 PacketBuiltCallback callback(ctx); 893 PacketBuiltCallback callback(ctx);
913 if (!callback.BuildPacket(xr)) 894 if (!callback.BuildPacket(xr))
914 return BuildResult::kTruncated; 895 return BuildResult::kTruncated;
915 896
916 return BuildResult::kSuccess; 897 return BuildResult::kSuccess;
917 } 898 }
918 899
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 Transport* const transport_; 1200 Transport* const transport_;
1220 bool send_failure_; 1201 bool send_failure_;
1221 } sender(transport_); 1202 } sender(transport_);
1222 1203
1223 uint8_t buffer[IP_PACKET_SIZE]; 1204 uint8_t buffer[IP_PACKET_SIZE];
1224 return packet.BuildExternalBuffer(buffer, IP_PACKET_SIZE, &sender) && 1205 return packet.BuildExternalBuffer(buffer, IP_PACKET_SIZE, &sender) &&
1225 !sender.send_failure_; 1206 !sender.send_failure_;
1226 } 1207 }
1227 1208
1228 } // namespace webrtc 1209 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698