| 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 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 return session_->pending_remote_description(); | 1548 return session_->pending_remote_description(); |
| 1549 } | 1549 } |
| 1550 | 1550 |
| 1551 void PeerConnection::Close() { | 1551 void PeerConnection::Close() { |
| 1552 TRACE_EVENT0("webrtc", "PeerConnection::Close"); | 1552 TRACE_EVENT0("webrtc", "PeerConnection::Close"); |
| 1553 // Update stats here so that we have the most recent stats for tracks and | 1553 // Update stats here so that we have the most recent stats for tracks and |
| 1554 // streams before the channels are closed. | 1554 // streams before the channels are closed. |
| 1555 stats_->UpdateStats(kStatsOutputLevelStandard); | 1555 stats_->UpdateStats(kStatsOutputLevelStandard); |
| 1556 | 1556 |
| 1557 session_->Close(); | 1557 session_->Close(); |
| 1558 event_log_.reset(); |
| 1558 } | 1559 } |
| 1559 | 1560 |
| 1560 void PeerConnection::OnSessionStateChange(WebRtcSession* /*session*/, | 1561 void PeerConnection::OnSessionStateChange(WebRtcSession* /*session*/, |
| 1561 WebRtcSession::State state) { | 1562 WebRtcSession::State state) { |
| 1562 switch (state) { | 1563 switch (state) { |
| 1563 case WebRtcSession::STATE_INIT: | 1564 case WebRtcSession::STATE_INIT: |
| 1564 ChangeSignalingState(PeerConnectionInterface::kStable); | 1565 ChangeSignalingState(PeerConnectionInterface::kStable); |
| 1565 break; | 1566 break; |
| 1566 case WebRtcSession::STATE_SENTOFFER: | 1567 case WebRtcSession::STATE_SENTOFFER: |
| 1567 ChangeSignalingState(PeerConnectionInterface::kHaveLocalOffer); | 1568 ChangeSignalingState(PeerConnectionInterface::kHaveLocalOffer); |
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2563 port_allocator_->set_candidate_filter( | 2564 port_allocator_->set_candidate_filter( |
| 2564 ConvertIceTransportTypeToCandidateFilter(type)); | 2565 ConvertIceTransportTypeToCandidateFilter(type)); |
| 2565 // Call this last since it may create pooled allocator sessions using the | 2566 // Call this last since it may create pooled allocator sessions using the |
| 2566 // candidate filter set above. | 2567 // candidate filter set above. |
| 2567 return port_allocator_->SetConfiguration( | 2568 return port_allocator_->SetConfiguration( |
| 2568 stun_servers, turn_servers, candidate_pool_size, prune_turn_ports); | 2569 stun_servers, turn_servers, candidate_pool_size, prune_turn_ports); |
| 2569 } | 2570 } |
| 2570 | 2571 |
| 2571 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, | 2572 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, |
| 2572 int64_t max_size_bytes) { | 2573 int64_t max_size_bytes) { |
| 2574 if (!event_log_) { |
| 2575 return false; |
| 2576 } |
| 2573 return event_log_->StartLogging(file, max_size_bytes); | 2577 return event_log_->StartLogging(file, max_size_bytes); |
| 2574 } | 2578 } |
| 2575 | 2579 |
| 2576 void PeerConnection::StopRtcEventLog_w() { | 2580 void PeerConnection::StopRtcEventLog_w() { |
| 2577 event_log_->StopLogging(); | 2581 if (event_log_) { |
| 2582 event_log_->StopLogging(); |
| 2583 } |
| 2578 } | 2584 } |
| 2579 } // namespace webrtc | 2585 } // namespace webrtc |
| OLD | NEW |