OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/media/rtc_peer_connection_handler.h" | 5 #include "content/renderer/media/rtc_peer_connection_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 | 488 |
489 rtc::scoped_refptr<LocalRTCStatsRequest> request_; | 489 rtc::scoped_refptr<LocalRTCStatsRequest> request_; |
490 const scoped_refptr<base::SingleThreadTaskRunner> main_thread_; | 490 const scoped_refptr<base::SingleThreadTaskRunner> main_thread_; |
491 base::ThreadChecker signaling_thread_checker_; | 491 base::ThreadChecker signaling_thread_checker_; |
492 }; | 492 }; |
493 | 493 |
494 void GetStatsOnSignalingThread( | 494 void GetStatsOnSignalingThread( |
495 const scoped_refptr<webrtc::PeerConnectionInterface>& pc, | 495 const scoped_refptr<webrtc::PeerConnectionInterface>& pc, |
496 webrtc::PeerConnectionInterface::StatsOutputLevel level, | 496 webrtc::PeerConnectionInterface::StatsOutputLevel level, |
497 const scoped_refptr<webrtc::StatsObserver>& observer, | 497 const scoped_refptr<webrtc::StatsObserver>& observer, |
498 const std::string track_id, blink::WebMediaStreamSource::Type track_type) { | 498 const std::string& track_id, |
| 499 blink::WebMediaStreamSource::Type track_type) { |
499 TRACE_EVENT0("webrtc", "GetStatsOnSignalingThread"); | 500 TRACE_EVENT0("webrtc", "GetStatsOnSignalingThread"); |
500 | 501 |
501 scoped_refptr<webrtc::MediaStreamTrackInterface> track; | 502 scoped_refptr<webrtc::MediaStreamTrackInterface> track; |
502 if (!track_id.empty()) { | 503 if (!track_id.empty()) { |
503 if (track_type == blink::WebMediaStreamSource::TypeAudio) { | 504 if (track_type == blink::WebMediaStreamSource::TypeAudio) { |
504 track = pc->local_streams()->FindAudioTrack(track_id); | 505 track = pc->local_streams()->FindAudioTrack(track_id); |
505 if (!track.get()) | 506 if (!track.get()) |
506 track = pc->remote_streams()->FindAudioTrack(track_id); | 507 track = pc->remote_streams()->FindAudioTrack(track_id); |
507 } else { | 508 } else { |
508 DCHECK_EQ(blink::WebMediaStreamSource::TypeVideo, track_type); | 509 DCHECK_EQ(blink::WebMediaStreamSource::TypeVideo, track_type); |
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 } | 1628 } |
1628 | 1629 |
1629 void RTCPeerConnectionHandler::ResetUMAStats() { | 1630 void RTCPeerConnectionHandler::ResetUMAStats() { |
1630 DCHECK(thread_checker_.CalledOnValidThread()); | 1631 DCHECK(thread_checker_.CalledOnValidThread()); |
1631 num_local_candidates_ipv6_ = 0; | 1632 num_local_candidates_ipv6_ = 0; |
1632 num_local_candidates_ipv4_ = 0; | 1633 num_local_candidates_ipv4_ = 0; |
1633 ice_connection_checking_start_ = base::TimeTicks(); | 1634 ice_connection_checking_start_ = base::TimeTicks(); |
1634 memset(ice_state_seen_, 0, sizeof(ice_state_seen_)); | 1635 memset(ice_state_seen_, 0, sizeof(ice_state_seen_)); |
1635 } | 1636 } |
1636 } // namespace content | 1637 } // namespace content |
OLD | NEW |