| 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 13 matching lines...) Expand all Loading... |
| 24 #include "webrtc/api/mediastreamobserver.h" | 24 #include "webrtc/api/mediastreamobserver.h" |
| 25 #include "webrtc/api/mediastreamproxy.h" | 25 #include "webrtc/api/mediastreamproxy.h" |
| 26 #include "webrtc/api/mediastreamtrackproxy.h" | 26 #include "webrtc/api/mediastreamtrackproxy.h" |
| 27 #include "webrtc/api/remoteaudiosource.h" | 27 #include "webrtc/api/remoteaudiosource.h" |
| 28 #include "webrtc/api/rtpreceiver.h" | 28 #include "webrtc/api/rtpreceiver.h" |
| 29 #include "webrtc/api/rtpsender.h" | 29 #include "webrtc/api/rtpsender.h" |
| 30 #include "webrtc/api/streamcollection.h" | 30 #include "webrtc/api/streamcollection.h" |
| 31 #include "webrtc/api/videocapturertracksource.h" | 31 #include "webrtc/api/videocapturertracksource.h" |
| 32 #include "webrtc/api/videotrack.h" | 32 #include "webrtc/api/videotrack.h" |
| 33 #include "webrtc/base/arraysize.h" | 33 #include "webrtc/base/arraysize.h" |
| 34 #include "webrtc/base/bind.h" | |
| 35 #include "webrtc/base/logging.h" | 34 #include "webrtc/base/logging.h" |
| 36 #include "webrtc/base/stringencode.h" | 35 #include "webrtc/base/stringencode.h" |
| 37 #include "webrtc/base/stringutils.h" | 36 #include "webrtc/base/stringutils.h" |
| 38 #include "webrtc/base/trace_event.h" | 37 #include "webrtc/base/trace_event.h" |
| 39 #include "webrtc/call.h" | |
| 40 #include "webrtc/media/sctp/sctpdataengine.h" | 38 #include "webrtc/media/sctp/sctpdataengine.h" |
| 41 #include "webrtc/pc/channelmanager.h" | 39 #include "webrtc/pc/channelmanager.h" |
| 42 #include "webrtc/system_wrappers/include/field_trial.h" | 40 #include "webrtc/system_wrappers/include/field_trial.h" |
| 43 | 41 |
| 44 namespace { | 42 namespace { |
| 45 | 43 |
| 46 using webrtc::DataChannel; | 44 using webrtc::DataChannel; |
| 47 using webrtc::MediaConstraintsInterface; | 45 using webrtc::MediaConstraintsInterface; |
| 48 using webrtc::MediaStreamInterface; | 46 using webrtc::MediaStreamInterface; |
| 49 using webrtc::PeerConnectionInterface; | 47 using webrtc::PeerConnectionInterface; |
| (...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 kEnumCounterAddressFamily, kPeerConnection_IPv6, | 1256 kEnumCounterAddressFamily, kPeerConnection_IPv6, |
| 1259 kPeerConnectionAddressFamilyCounter_Max); | 1257 kPeerConnectionAddressFamilyCounter_Max); |
| 1260 } else { | 1258 } else { |
| 1261 uma_observer_->IncrementEnumCounter( | 1259 uma_observer_->IncrementEnumCounter( |
| 1262 kEnumCounterAddressFamily, kPeerConnection_IPv4, | 1260 kEnumCounterAddressFamily, kPeerConnection_IPv4, |
| 1263 kPeerConnectionAddressFamilyCounter_Max); | 1261 kPeerConnectionAddressFamilyCounter_Max); |
| 1264 } | 1262 } |
| 1265 } | 1263 } |
| 1266 } | 1264 } |
| 1267 | 1265 |
| 1268 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, | |
| 1269 int64_t max_size_bytes) { | |
| 1270 return factory_->worker_thread()->Invoke<bool>( | |
| 1271 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StartRtcEventLog_w, this, file, | |
| 1272 max_size_bytes)); | |
| 1273 } | |
| 1274 | |
| 1275 void PeerConnection::StopRtcEventLog() { | |
| 1276 factory_->worker_thread()->Invoke<void>( | |
| 1277 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StopRtcEventLog_w, this)); | |
| 1278 } | |
| 1279 | |
| 1280 const SessionDescriptionInterface* PeerConnection::local_description() const { | 1266 const SessionDescriptionInterface* PeerConnection::local_description() const { |
| 1281 return session_->local_description(); | 1267 return session_->local_description(); |
| 1282 } | 1268 } |
| 1283 | 1269 |
| 1284 const SessionDescriptionInterface* PeerConnection::remote_description() const { | 1270 const SessionDescriptionInterface* PeerConnection::remote_description() const { |
| 1285 return session_->remote_description(); | 1271 return session_->remote_description(); |
| 1286 } | 1272 } |
| 1287 | 1273 |
| 1288 void PeerConnection::Close() { | 1274 void PeerConnection::Close() { |
| 1289 TRACE_EVENT0("webrtc", "PeerConnection::Close"); | 1275 TRACE_EVENT0("webrtc", "PeerConnection::Close"); |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2239 } | 2225 } |
| 2240 port_allocator_->set_candidate_filter( | 2226 port_allocator_->set_candidate_filter( |
| 2241 ConvertIceTransportTypeToCandidateFilter(configuration.type)); | 2227 ConvertIceTransportTypeToCandidateFilter(configuration.type)); |
| 2242 // Call this last since it may create pooled allocator sessions using the | 2228 // Call this last since it may create pooled allocator sessions using the |
| 2243 // candidate filter set above. | 2229 // candidate filter set above. |
| 2244 port_allocator_->SetConfiguration(stun_servers, turn_servers, | 2230 port_allocator_->SetConfiguration(stun_servers, turn_servers, |
| 2245 configuration.ice_candidate_pool_size); | 2231 configuration.ice_candidate_pool_size); |
| 2246 return true; | 2232 return true; |
| 2247 } | 2233 } |
| 2248 | 2234 |
| 2249 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, | |
| 2250 int64_t max_size_bytes) { | |
| 2251 return media_controller_->call_w()->StartEventLog(file, max_size_bytes); | |
| 2252 } | |
| 2253 | |
| 2254 void PeerConnection::StopRtcEventLog_w() { | |
| 2255 media_controller_->call_w()->StopEventLog(); | |
| 2256 } | |
| 2257 } // namespace webrtc | 2235 } // namespace webrtc |
| OLD | NEW |