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

Side by Side Diff: webrtc/audio/audio_send_stream.cc

Issue 2503383002: Expose RtpCodecParameters to VoiceMediaInfo stats. (Closed)
Patch Set: Addressed comments, using int Created 4 years, 1 month 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
« no previous file with comments | « webrtc/audio/audio_receive_stream.cc ('k') | webrtc/media/base/mediachannel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 stats.rtt_ms = call_stats.rttMs; 164 stats.rtt_ms = call_stats.rttMs;
165 } 165 }
166 // TODO(solenberg): [was ajm]: Re-enable this metric once we have a reliable 166 // TODO(solenberg): [was ajm]: Re-enable this metric once we have a reliable
167 // implementation. 167 // implementation.
168 stats.aec_quality_min = -1; 168 stats.aec_quality_min = -1;
169 169
170 webrtc::CodecInst codec_inst = {0}; 170 webrtc::CodecInst codec_inst = {0};
171 if (codec->GetSendCodec(config_.voe_channel_id, codec_inst) != -1) { 171 if (codec->GetSendCodec(config_.voe_channel_id, codec_inst) != -1) {
172 RTC_DCHECK_NE(codec_inst.pltype, -1); 172 RTC_DCHECK_NE(codec_inst.pltype, -1);
173 stats.codec_name = codec_inst.plname; 173 stats.codec_name = codec_inst.plname;
174 stats.codec_payload_type = rtc::Optional<int>(codec_inst.pltype);
174 175
175 // Get data from the last remote RTCP report. 176 // Get data from the last remote RTCP report.
176 for (const auto& block : channel_proxy_->GetRemoteRTCPReportBlocks()) { 177 for (const auto& block : channel_proxy_->GetRemoteRTCPReportBlocks()) {
177 // Lookup report for send ssrc only. 178 // Lookup report for send ssrc only.
178 if (block.source_SSRC == stats.local_ssrc) { 179 if (block.source_SSRC == stats.local_ssrc) {
179 stats.packets_lost = block.cumulative_num_packets_lost; 180 stats.packets_lost = block.cumulative_num_packets_lost;
180 stats.fraction_lost = Q8ToFloat(block.fraction_lost); 181 stats.fraction_lost = Q8ToFloat(block.fraction_lost);
181 stats.ext_seqnum = block.extended_highest_sequence_number; 182 stats.ext_seqnum = block.extended_highest_sequence_number;
182 // Convert samples to milliseconds. 183 // Convert samples to milliseconds.
183 if (codec_inst.plfreq / 1000 > 0) { 184 if (codec_inst.plfreq / 1000 > 0) {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 LOG(LS_WARNING) << "SetVADStatus() failed: " << base->LastError(); 378 LOG(LS_WARNING) << "SetVADStatus() failed: " << base->LastError();
378 return false; 379 return false;
379 } 380 }
380 } 381 }
381 } 382 }
382 return true; 383 return true;
383 } 384 }
384 385
385 } // namespace internal 386 } // namespace internal
386 } // namespace webrtc 387 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/audio/audio_receive_stream.cc ('k') | webrtc/media/base/mediachannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698