OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 } | 363 } |
364 } | 364 } |
365 | 365 |
366 void Call::UpdateReceiveHistograms() { | 366 void Call::UpdateReceiveHistograms() { |
367 const int kMinRequiredPeriodicSamples = 5; | 367 const int kMinRequiredPeriodicSamples = 5; |
368 AggregatedStats video_bytes_per_sec = | 368 AggregatedStats video_bytes_per_sec = |
369 received_video_bytes_per_second_counter_.GetStats(); | 369 received_video_bytes_per_second_counter_.GetStats(); |
370 if (video_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { | 370 if (video_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { |
371 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.VideoBitrateReceivedInKbps", | 371 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.VideoBitrateReceivedInKbps", |
372 video_bytes_per_sec.average * 8 / 1000); | 372 video_bytes_per_sec.average * 8 / 1000); |
373 LOG(LS_INFO) << "WebRTC.Call.VideoBitrateReceivedInBytesPerSec, " | 373 LOG(LS_INFO) << "WebRTC.Call.VideoBitrateReceivedInBps, " |
374 << video_bytes_per_sec.ToString(); | 374 << video_bytes_per_sec.ToStringWithMultiplier(8); |
375 } | 375 } |
376 AggregatedStats audio_bytes_per_sec = | 376 AggregatedStats audio_bytes_per_sec = |
377 received_audio_bytes_per_second_counter_.GetStats(); | 377 received_audio_bytes_per_second_counter_.GetStats(); |
378 if (audio_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { | 378 if (audio_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { |
379 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.AudioBitrateReceivedInKbps", | 379 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.AudioBitrateReceivedInKbps", |
380 audio_bytes_per_sec.average * 8 / 1000); | 380 audio_bytes_per_sec.average * 8 / 1000); |
381 LOG(LS_INFO) << "WebRTC.Call.AudioBitrateReceivedInBytesPerSec, " | 381 LOG(LS_INFO) << "WebRTC.Call.AudioBitrateReceivedInBps, " |
382 << audio_bytes_per_sec.ToString(); | 382 << audio_bytes_per_sec.ToStringWithMultiplier(8); |
383 } | 383 } |
384 AggregatedStats rtcp_bytes_per_sec = | 384 AggregatedStats rtcp_bytes_per_sec = |
385 received_rtcp_bytes_per_second_counter_.GetStats(); | 385 received_rtcp_bytes_per_second_counter_.GetStats(); |
386 if (rtcp_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { | 386 if (rtcp_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { |
387 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.RtcpBitrateReceivedInBps", | 387 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.RtcpBitrateReceivedInBps", |
388 rtcp_bytes_per_sec.average * 8); | 388 rtcp_bytes_per_sec.average * 8); |
389 LOG(LS_INFO) << "WebRTC.Call.RtcpBitrateReceivedInBytesPerSec, " | 389 LOG(LS_INFO) << "WebRTC.Call.RtcpBitrateReceivedInBps, " |
390 << rtcp_bytes_per_sec.ToString(); | 390 << rtcp_bytes_per_sec.ToStringWithMultiplier(8); |
391 } | 391 } |
392 AggregatedStats recv_bytes_per_sec = | 392 AggregatedStats recv_bytes_per_sec = |
393 received_bytes_per_second_counter_.GetStats(); | 393 received_bytes_per_second_counter_.GetStats(); |
394 if (recv_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { | 394 if (recv_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { |
395 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.BitrateReceivedInKbps", | 395 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.BitrateReceivedInKbps", |
396 recv_bytes_per_sec.average * 8 / 1000); | 396 recv_bytes_per_sec.average * 8 / 1000); |
397 LOG(LS_INFO) << "WebRTC.Call.BitrateReceivedInBytesPerSec, " | 397 LOG(LS_INFO) << "WebRTC.Call.BitrateReceivedInBps, " |
398 << recv_bytes_per_sec.ToString(); | 398 << recv_bytes_per_sec.ToStringWithMultiplier(8); |
399 } | 399 } |
400 } | 400 } |
401 | 401 |
402 PacketReceiver* Call::Receiver() { | 402 PacketReceiver* Call::Receiver() { |
403 // TODO(solenberg): Some test cases in EndToEndTest use this from a different | 403 // TODO(solenberg): Some test cases in EndToEndTest use this from a different |
404 // thread. Re-enable once that is fixed. | 404 // thread. Re-enable once that is fixed. |
405 // RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 405 // RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
406 return this; | 406 return this; |
407 } | 407 } |
408 | 408 |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]); | 1100 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]); |
1101 ReadLockScoped read_lock(*receive_crit_); | 1101 ReadLockScoped read_lock(*receive_crit_); |
1102 auto it = video_receive_ssrcs_.find(ssrc); | 1102 auto it = video_receive_ssrcs_.find(ssrc); |
1103 if (it == video_receive_ssrcs_.end()) | 1103 if (it == video_receive_ssrcs_.end()) |
1104 return false; | 1104 return false; |
1105 return it->second->OnRecoveredPacket(packet, length); | 1105 return it->second->OnRecoveredPacket(packet, length); |
1106 } | 1106 } |
1107 | 1107 |
1108 } // namespace internal | 1108 } // namespace internal |
1109 } // namespace webrtc | 1109 } // namespace webrtc |
OLD | NEW |