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" |
34 #include "webrtc/base/logging.h" | 35 #include "webrtc/base/logging.h" |
35 #include "webrtc/base/stringencode.h" | 36 #include "webrtc/base/stringencode.h" |
36 #include "webrtc/base/stringutils.h" | 37 #include "webrtc/base/stringutils.h" |
37 #include "webrtc/base/trace_event.h" | 38 #include "webrtc/base/trace_event.h" |
| 39 #include "webrtc/call.h" |
38 #include "webrtc/media/sctp/sctpdataengine.h" | 40 #include "webrtc/media/sctp/sctpdataengine.h" |
39 #include "webrtc/p2p/client/basicportallocator.h" | 41 #include "webrtc/p2p/client/basicportallocator.h" |
40 #include "webrtc/pc/channelmanager.h" | 42 #include "webrtc/pc/channelmanager.h" |
41 #include "webrtc/system_wrappers/include/field_trial.h" | 43 #include "webrtc/system_wrappers/include/field_trial.h" |
42 | 44 |
43 namespace { | 45 namespace { |
44 | 46 |
45 using webrtc::DataChannel; | 47 using webrtc::DataChannel; |
46 using webrtc::MediaConstraintsInterface; | 48 using webrtc::MediaConstraintsInterface; |
47 using webrtc::MediaStreamInterface; | 49 using webrtc::MediaStreamInterface; |
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1225 kEnumCounterAddressFamily, kPeerConnection_IPv6, | 1227 kEnumCounterAddressFamily, kPeerConnection_IPv6, |
1226 kPeerConnectionAddressFamilyCounter_Max); | 1228 kPeerConnectionAddressFamilyCounter_Max); |
1227 } else { | 1229 } else { |
1228 uma_observer_->IncrementEnumCounter( | 1230 uma_observer_->IncrementEnumCounter( |
1229 kEnumCounterAddressFamily, kPeerConnection_IPv4, | 1231 kEnumCounterAddressFamily, kPeerConnection_IPv4, |
1230 kPeerConnectionAddressFamilyCounter_Max); | 1232 kPeerConnectionAddressFamilyCounter_Max); |
1231 } | 1233 } |
1232 } | 1234 } |
1233 } | 1235 } |
1234 | 1236 |
| 1237 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, |
| 1238 int64_t max_size_bytes) { |
| 1239 return factory_->worker_thread()->Invoke<bool>(rtc::Bind( |
| 1240 &PeerConnection::StartRtcEventLog_w, this, file, max_size_bytes)); |
| 1241 } |
| 1242 |
| 1243 void PeerConnection::StopRtcEventLog() { |
| 1244 factory_->worker_thread()->Invoke<void>( |
| 1245 rtc::Bind(&PeerConnection::StopRtcEventLog_w, this)); |
| 1246 } |
| 1247 |
1235 const SessionDescriptionInterface* PeerConnection::local_description() const { | 1248 const SessionDescriptionInterface* PeerConnection::local_description() const { |
1236 return session_->local_description(); | 1249 return session_->local_description(); |
1237 } | 1250 } |
1238 | 1251 |
1239 const SessionDescriptionInterface* PeerConnection::remote_description() const { | 1252 const SessionDescriptionInterface* PeerConnection::remote_description() const { |
1240 return session_->remote_description(); | 1253 return session_->remote_description(); |
1241 } | 1254 } |
1242 | 1255 |
1243 void PeerConnection::Close() { | 1256 void PeerConnection::Close() { |
1244 TRACE_EVENT0("webrtc", "PeerConnection::Close"); | 1257 TRACE_EVENT0("webrtc", "PeerConnection::Close"); |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2120 | 2133 |
2121 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { | 2134 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { |
2122 for (const auto& channel : sctp_data_channels_) { | 2135 for (const auto& channel : sctp_data_channels_) { |
2123 if (channel->id() == sid) { | 2136 if (channel->id() == sid) { |
2124 return channel; | 2137 return channel; |
2125 } | 2138 } |
2126 } | 2139 } |
2127 return nullptr; | 2140 return nullptr; |
2128 } | 2141 } |
2129 | 2142 |
| 2143 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, |
| 2144 int64_t max_size_bytes) { |
| 2145 RTC_DCHECK(factory_->worker_thread()->IsCurrent()); |
| 2146 return media_controller_->call_w()->StartEventLog(file, max_size_bytes); |
| 2147 } |
| 2148 |
| 2149 void PeerConnection::StopRtcEventLog_w() { |
| 2150 RTC_DCHECK(factory_->worker_thread()->IsCurrent()); |
| 2151 media_controller_->call_w()->StopEventLog(); |
| 2152 } |
2130 } // namespace webrtc | 2153 } // namespace webrtc |
OLD | NEW |