Index: webrtc/audio/audio_receive_stream.cc |
diff --git a/webrtc/audio/audio_receive_stream.cc b/webrtc/audio/audio_receive_stream.cc |
index 0fd96d01cc9fd4a9730d81d7c65fa7782070d479..dfacf9389dd9e30f3bb8ae1098303b0db9713fd1 100644 |
--- a/webrtc/audio/audio_receive_stream.cc |
+++ b/webrtc/audio/audio_receive_stream.cc |
@@ -28,6 +28,7 @@ namespace webrtc { |
std::string AudioReceiveStream::Config::Rtp::ToString() const { |
std::stringstream ss; |
ss << "{remote_ssrc: " << remote_ssrc; |
+ ss << ", local_ssrc: " << local_ssrc; |
ss << ", extensions: ["; |
for (size_t i = 0; i < extensions.size(); ++i) { |
ss << extensions[i].ToString(); |
@@ -43,10 +44,16 @@ std::string AudioReceiveStream::Config::Rtp::ToString() const { |
std::string AudioReceiveStream::Config::ToString() const { |
std::stringstream ss; |
ss << "{rtp: " << rtp.ToString(); |
+ ss << ", receive_transport: " |
+ << (receive_transport ? "(Transport)" : "nullptr"); |
+ ss << ", rtcp_send_transport: " |
+ << (rtcp_send_transport ? "(Transport)" : "nullptr"); |
ss << ", voe_channel_id: " << voe_channel_id; |
if (!sync_group.empty()) { |
ss << ", sync_group: " << sync_group; |
} |
+ ss << ", combined_audio_video_bwe: " |
+ << (combined_audio_video_bwe ? "true" : "false"); |
ss << '}'; |
return ss.str(); |
} |
@@ -101,26 +108,25 @@ webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const { |
ScopedVoEInterface<VoEVideoSync> sync(voice_engine_); |
ScopedVoEInterface<VoEVolumeControl> volume(voice_engine_); |
unsigned int ssrc = 0; |
- webrtc::CallStatistics cs = {0}; |
- webrtc::CodecInst ci = {0}; |
+ webrtc::CallStatistics call_stats = {0}; |
tommi
2015/10/23 12:50:37
nice :)
the sun
2015/10/23 15:14:17
Acknowledged.
|
+ webrtc::CodecInst codec_inst = {0}; |
// Only collect stats if we have seen some traffic with the SSRC. |
if (rtp->GetRemoteSSRC(config_.voe_channel_id, ssrc) == -1 || |
- rtp->GetRTCPStatistics(config_.voe_channel_id, cs) == -1 || |
- codec->GetRecCodec(config_.voe_channel_id, ci) == -1) { |
+ rtp->GetRTCPStatistics(config_.voe_channel_id, call_stats) == -1 || |
+ codec->GetRecCodec(config_.voe_channel_id, codec_inst) == -1) { |
return stats; |
} |
- stats.bytes_rcvd = cs.bytesReceived; |
- stats.packets_rcvd = cs.packetsReceived; |
- stats.packets_lost = cs.cumulativeLost; |
- stats.fraction_lost = static_cast<float>(cs.fractionLost) / (1 << 8); |
- if (ci.pltype != -1) { |
- stats.codec_name = ci.plname; |
+ stats.bytes_rcvd = call_stats.bytesReceived; |
+ stats.packets_rcvd = call_stats.packetsReceived; |
+ stats.packets_lost = call_stats.cumulativeLost; |
+ stats.fraction_lost = Q8ToFloat(call_stats.fractionLost); |
+ if (codec_inst.pltype != -1) { |
+ stats.codec_name = codec_inst.plname; |
} |
- |
- stats.ext_seqnum = cs.extendedMax; |
- if (ci.plfreq / 1000 > 0) { |
- stats.jitter_ms = cs.jitterSamples / (ci.plfreq / 1000); |
+ stats.ext_seqnum = call_stats.extendedMax; |
+ if (codec_inst.plfreq / 1000 > 0) { |
+ stats.jitter_ms = call_stats.jitterSamples / (codec_inst.plfreq / 1000); |
} |
{ |
int jitter_buffer_delay_ms = 0; |
@@ -161,7 +167,7 @@ webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const { |
stats.decoding_plc_cng = ds.decoded_plc_cng; |
} |
- stats.capture_start_ntp_time_ms = cs.capture_start_ntp_time_ms_; |
+ stats.capture_start_ntp_time_ms = call_stats.capture_start_ntp_time_ms_; |
return stats; |
} |