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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 } | 362 } |
363 } | 363 } |
364 | 364 |
365 void Call::UpdateReceiveHistograms() { | 365 void Call::UpdateReceiveHistograms() { |
366 const int kMinRequiredPeriodicSamples = 5; | 366 const int kMinRequiredPeriodicSamples = 5; |
367 AggregatedStats video_bytes_per_sec = | 367 AggregatedStats video_bytes_per_sec = |
368 received_video_bytes_per_second_counter_.GetStats(); | 368 received_video_bytes_per_second_counter_.GetStats(); |
369 if (video_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { | 369 if (video_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { |
370 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.VideoBitrateReceivedInKbps", | 370 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.VideoBitrateReceivedInKbps", |
371 video_bytes_per_sec.average * 8 / 1000); | 371 video_bytes_per_sec.average * 8 / 1000); |
372 LOG(LS_INFO) << "WebRTC.Call.VideoBitrateReceivedInKbps, " | 372 LOG(LS_INFO) << "WebRTC.Call.VideoBitrateReceivedInBytesPerSec, " |
stefan-webrtc
2016/11/16 08:05:34
Why bytes per sec? I think it makes more sense to
| |
373 << video_bytes_per_sec.ToString(); | 373 << video_bytes_per_sec.ToString(); |
374 } | 374 } |
375 AggregatedStats audio_bytes_per_sec = | 375 AggregatedStats audio_bytes_per_sec = |
376 received_audio_bytes_per_second_counter_.GetStats(); | 376 received_audio_bytes_per_second_counter_.GetStats(); |
377 if (audio_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { | 377 if (audio_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { |
378 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.AudioBitrateReceivedInKbps", | 378 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.AudioBitrateReceivedInKbps", |
379 audio_bytes_per_sec.average * 8 / 1000); | 379 audio_bytes_per_sec.average * 8 / 1000); |
380 LOG(LS_INFO) << "WebRTC.Call.AudioBitrateReceivedInKbps, " | 380 LOG(LS_INFO) << "WebRTC.Call.AudioBitrateReceivedInBytesPerSec, " |
381 << audio_bytes_per_sec.ToString(); | 381 << audio_bytes_per_sec.ToString(); |
382 } | 382 } |
383 AggregatedStats rtcp_bytes_per_sec = | 383 AggregatedStats rtcp_bytes_per_sec = |
384 received_rtcp_bytes_per_second_counter_.GetStats(); | 384 received_rtcp_bytes_per_second_counter_.GetStats(); |
385 if (rtcp_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { | 385 if (rtcp_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { |
386 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.RtcpBitrateReceivedInBps", | 386 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.RtcpBitrateReceivedInBps", |
387 rtcp_bytes_per_sec.average * 8); | 387 rtcp_bytes_per_sec.average * 8); |
388 LOG(LS_INFO) << "WebRTC.Call.RtcpBitrateReceivedInBps, " | 388 LOG(LS_INFO) << "WebRTC.Call.RtcpBitrateReceivedInBytesPerSec, " |
389 << rtcp_bytes_per_sec.ToString(); | 389 << rtcp_bytes_per_sec.ToString(); |
390 } | 390 } |
391 AggregatedStats recv_bytes_per_sec = | 391 AggregatedStats recv_bytes_per_sec = |
392 received_bytes_per_second_counter_.GetStats(); | 392 received_bytes_per_second_counter_.GetStats(); |
393 if (recv_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { | 393 if (recv_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { |
394 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.BitrateReceivedInKbps", | 394 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.BitrateReceivedInKbps", |
395 recv_bytes_per_sec.average * 8 / 1000); | 395 recv_bytes_per_sec.average * 8 / 1000); |
396 LOG(LS_INFO) << "WebRTC.Call.BitrateReceivedInKbps, " | 396 LOG(LS_INFO) << "WebRTC.Call.BitrateReceivedInBytesPerSec, " |
397 << recv_bytes_per_sec.ToString(); | 397 << recv_bytes_per_sec.ToString(); |
398 } | 398 } |
399 } | 399 } |
400 | 400 |
401 PacketReceiver* Call::Receiver() { | 401 PacketReceiver* Call::Receiver() { |
402 // TODO(solenberg): Some test cases in EndToEndTest use this from a different | 402 // TODO(solenberg): Some test cases in EndToEndTest use this from a different |
403 // thread. Re-enable once that is fixed. | 403 // thread. Re-enable once that is fixed. |
404 // RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 404 // RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
405 return this; | 405 return this; |
406 } | 406 } |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1099 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]); | 1099 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]); |
1100 ReadLockScoped read_lock(*receive_crit_); | 1100 ReadLockScoped read_lock(*receive_crit_); |
1101 auto it = video_receive_ssrcs_.find(ssrc); | 1101 auto it = video_receive_ssrcs_.find(ssrc); |
1102 if (it == video_receive_ssrcs_.end()) | 1102 if (it == video_receive_ssrcs_.end()) |
1103 return false; | 1103 return false; |
1104 return it->second->OnRecoveredPacket(packet, length); | 1104 return it->second->OnRecoveredPacket(packet, length); |
1105 } | 1105 } |
1106 | 1106 |
1107 } // namespace internal | 1107 } // namespace internal |
1108 } // namespace webrtc | 1108 } // namespace webrtc |
OLD | NEW |