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 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1185 kEnumCounterAddressFamily, kPeerConnection_IPv6, | 1187 kEnumCounterAddressFamily, kPeerConnection_IPv6, |
1186 kPeerConnectionAddressFamilyCounter_Max); | 1188 kPeerConnectionAddressFamilyCounter_Max); |
1187 } else { | 1189 } else { |
1188 uma_observer_->IncrementEnumCounter( | 1190 uma_observer_->IncrementEnumCounter( |
1189 kEnumCounterAddressFamily, kPeerConnection_IPv4, | 1191 kEnumCounterAddressFamily, kPeerConnection_IPv4, |
1190 kPeerConnectionAddressFamilyCounter_Max); | 1192 kPeerConnectionAddressFamilyCounter_Max); |
1191 } | 1193 } |
1192 } | 1194 } |
1193 } | 1195 } |
1194 | 1196 |
| 1197 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, |
| 1198 int64_t max_size_bytes) { |
| 1199 return factory_->worker_thread()->Invoke<bool>(rtc::Bind( |
| 1200 &PeerConnection::StartRtcEventLog_w, this, file, max_size_bytes)); |
| 1201 } |
| 1202 |
| 1203 void PeerConnection::StopRtcEventLog() { |
| 1204 factory_->worker_thread()->Invoke<void>( |
| 1205 rtc::Bind(&PeerConnection::StopRtcEventLog_w, this)); |
| 1206 } |
| 1207 |
1195 const SessionDescriptionInterface* PeerConnection::local_description() const { | 1208 const SessionDescriptionInterface* PeerConnection::local_description() const { |
1196 return session_->local_description(); | 1209 return session_->local_description(); |
1197 } | 1210 } |
1198 | 1211 |
1199 const SessionDescriptionInterface* PeerConnection::remote_description() const { | 1212 const SessionDescriptionInterface* PeerConnection::remote_description() const { |
1200 return session_->remote_description(); | 1213 return session_->remote_description(); |
1201 } | 1214 } |
1202 | 1215 |
1203 void PeerConnection::Close() { | 1216 void PeerConnection::Close() { |
1204 TRACE_EVENT0("webrtc", "PeerConnection::Close"); | 1217 TRACE_EVENT0("webrtc", "PeerConnection::Close"); |
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2057 | 2070 |
2058 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { | 2071 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { |
2059 for (const auto& channel : sctp_data_channels_) { | 2072 for (const auto& channel : sctp_data_channels_) { |
2060 if (channel->id() == sid) { | 2073 if (channel->id() == sid) { |
2061 return channel; | 2074 return channel; |
2062 } | 2075 } |
2063 } | 2076 } |
2064 return nullptr; | 2077 return nullptr; |
2065 } | 2078 } |
2066 | 2079 |
| 2080 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, |
| 2081 int64_t max_size_bytes) { |
| 2082 RTC_DCHECK(factory_->worker_thread()->IsCurrent()); |
| 2083 return media_controller_->call_w()->StartEventLog(file, max_size_bytes); |
| 2084 } |
| 2085 |
| 2086 void PeerConnection::StopRtcEventLog_w() { |
| 2087 RTC_DCHECK(factory_->worker_thread()->IsCurrent()); |
| 2088 media_controller_->call_w()->StopEventLog(); |
| 2089 } |
2067 } // namespace webrtc | 2090 } // namespace webrtc |
OLD | NEW |