Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 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 Loading... | |
| 879 MediaStreamTrackInterface* track, | 879 MediaStreamTrackInterface* track, |
| 880 StatsOutputLevel level) { | 880 StatsOutputLevel level) { |
| 881 TRACE_EVENT0("webrtc", "PeerConnection::GetStats"); | 881 TRACE_EVENT0("webrtc", "PeerConnection::GetStats"); |
| 882 RTC_DCHECK(signaling_thread()->IsCurrent()); | 882 RTC_DCHECK(signaling_thread()->IsCurrent()); |
| 883 if (!VERIFY(observer != NULL)) { | 883 if (!VERIFY(observer != NULL)) { |
| 884 LOG(LS_ERROR) << "GetStats - observer is NULL."; | 884 LOG(LS_ERROR) << "GetStats - observer is NULL."; |
| 885 return false; | 885 return false; |
| 886 } | 886 } |
| 887 | 887 |
| 888 stats_->UpdateStats(level); | 888 stats_->UpdateStats(level); |
| 889 if (!stats_->IsValidTrack(track)) { | |
|
Taylor Brandstetter
2016/11/03 22:47:01
May be worth logging a warning here.
Also, you co
Zhi Huang
2016/11/03 23:17:27
I realized that the nullptr is not an error. The n
| |
| 890 return false; | |
| 891 } | |
| 889 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_GETSTATS, | 892 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_GETSTATS, |
| 890 new GetStatsMsg(observer, track)); | 893 new GetStatsMsg(observer, track)); |
| 891 return true; | 894 return true; |
| 892 } | 895 } |
| 893 | 896 |
| 894 void PeerConnection::GetStats(RTCStatsCollectorCallback* callback) { | 897 void PeerConnection::GetStats(RTCStatsCollectorCallback* callback) { |
| 895 RTC_DCHECK(stats_collector_); | 898 RTC_DCHECK(stats_collector_); |
| 896 stats_collector_->GetStatsReport(callback); | 899 stats_collector_->GetStatsReport(callback); |
| 897 } | 900 } |
| 898 | 901 |
| (...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2341 | 2344 |
| 2342 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, | 2345 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, |
| 2343 int64_t max_size_bytes) { | 2346 int64_t max_size_bytes) { |
| 2344 return event_log_->StartLogging(file, max_size_bytes); | 2347 return event_log_->StartLogging(file, max_size_bytes); |
| 2345 } | 2348 } |
| 2346 | 2349 |
| 2347 void PeerConnection::StopRtcEventLog_w() { | 2350 void PeerConnection::StopRtcEventLog_w() { |
| 2348 event_log_->StopLogging(); | 2351 event_log_->StopLogging(); |
| 2349 } | 2352 } |
| 2350 } // namespace webrtc | 2353 } // namespace webrtc |
| OLD | NEW |