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 14 matching lines...) Expand all Loading... | |
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/remotevideocapturer.h" | 28 #include "webrtc/api/remotevideocapturer.h" |
29 #include "webrtc/api/rtpreceiver.h" | 29 #include "webrtc/api/rtpreceiver.h" |
30 #include "webrtc/api/rtpsender.h" | 30 #include "webrtc/api/rtpsender.h" |
31 #include "webrtc/api/streamcollection.h" | 31 #include "webrtc/api/streamcollection.h" |
32 #include "webrtc/api/videosource.h" | 32 #include "webrtc/api/videosource.h" |
33 #include "webrtc/api/videotrack.h" | 33 #include "webrtc/api/videotrack.h" |
34 #include "webrtc/base/arraysize.h" | 34 #include "webrtc/base/arraysize.h" |
35 #include "webrtc/base/bind.h" | |
35 #include "webrtc/base/logging.h" | 36 #include "webrtc/base/logging.h" |
36 #include "webrtc/base/stringencode.h" | 37 #include "webrtc/base/stringencode.h" |
37 #include "webrtc/base/stringutils.h" | 38 #include "webrtc/base/stringutils.h" |
38 #include "webrtc/base/trace_event.h" | 39 #include "webrtc/base/trace_event.h" |
40 #include "webrtc/call.h" | |
41 #include "webrtc/call/rtc_event_log.h" | |
39 #include "webrtc/media/sctp/sctpdataengine.h" | 42 #include "webrtc/media/sctp/sctpdataengine.h" |
40 #include "webrtc/p2p/client/basicportallocator.h" | 43 #include "webrtc/p2p/client/basicportallocator.h" |
41 #include "webrtc/pc/channelmanager.h" | 44 #include "webrtc/pc/channelmanager.h" |
42 #include "webrtc/system_wrappers/include/field_trial.h" | 45 #include "webrtc/system_wrappers/include/field_trial.h" |
43 | 46 |
44 namespace { | 47 namespace { |
45 | 48 |
46 using webrtc::DataChannel; | 49 using webrtc::DataChannel; |
47 using webrtc::MediaConstraintsInterface; | 50 using webrtc::MediaConstraintsInterface; |
48 using webrtc::MediaStreamInterface; | 51 using webrtc::MediaStreamInterface; |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1219 kEnumCounterAddressFamily, kPeerConnection_IPv6, | 1222 kEnumCounterAddressFamily, kPeerConnection_IPv6, |
1220 kPeerConnectionAddressFamilyCounter_Max); | 1223 kPeerConnectionAddressFamilyCounter_Max); |
1221 } else { | 1224 } else { |
1222 uma_observer_->IncrementEnumCounter( | 1225 uma_observer_->IncrementEnumCounter( |
1223 kEnumCounterAddressFamily, kPeerConnection_IPv4, | 1226 kEnumCounterAddressFamily, kPeerConnection_IPv4, |
1224 kPeerConnectionAddressFamilyCounter_Max); | 1227 kPeerConnectionAddressFamilyCounter_Max); |
1225 } | 1228 } |
1226 } | 1229 } |
1227 } | 1230 } |
1228 | 1231 |
1232 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, | |
1233 int64_t max_size_bytes) { | |
1234 return factory_->worker_thread()->Invoke<bool>(rtc::Bind( | |
1235 &PeerConnection::StartRtcEventLog_w, this, file, max_size_bytes)); | |
1236 } | |
1237 | |
1238 void PeerConnection::StopRtcEventLog() { | |
1239 factory_->worker_thread()->Invoke<void>( | |
1240 rtc::Bind(&PeerConnection::StopRtcEventLog_w, this)); | |
1241 } | |
1242 | |
1229 const SessionDescriptionInterface* PeerConnection::local_description() const { | 1243 const SessionDescriptionInterface* PeerConnection::local_description() const { |
1230 return session_->local_description(); | 1244 return session_->local_description(); |
1231 } | 1245 } |
1232 | 1246 |
1233 const SessionDescriptionInterface* PeerConnection::remote_description() const { | 1247 const SessionDescriptionInterface* PeerConnection::remote_description() const { |
1234 return session_->remote_description(); | 1248 return session_->remote_description(); |
1235 } | 1249 } |
1236 | 1250 |
1237 void PeerConnection::Close() { | 1251 void PeerConnection::Close() { |
1238 TRACE_EVENT0("webrtc", "PeerConnection::Close"); | 1252 TRACE_EVENT0("webrtc", "PeerConnection::Close"); |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2092 | 2106 |
2093 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { | 2107 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { |
2094 for (const auto& channel : sctp_data_channels_) { | 2108 for (const auto& channel : sctp_data_channels_) { |
2095 if (channel->id() == sid) { | 2109 if (channel->id() == sid) { |
2096 return channel; | 2110 return channel; |
2097 } | 2111 } |
2098 } | 2112 } |
2099 return nullptr; | 2113 return nullptr; |
2100 } | 2114 } |
2101 | 2115 |
2116 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, | |
2117 int64_t max_size_bytes) { | |
2118 RTC_DCHECK(factory_->worker_thread()->IsCurrent()); | |
2119 return media_controller_->call_w()->RtcEventLog()->StartLogging( | |
the sun
2016/03/21 13:03:08
Is Call::RtcEventLog used anywhere but here?
If n
terelius
2016/03/21 20:47:46
+1
ivoc
2016/03/22 13:44:54
Good point, I changed it to a start/stop pair.
| |
2120 file, max_size_bytes); | |
2121 } | |
2122 | |
2123 void PeerConnection::StopRtcEventLog_w() { | |
2124 RTC_DCHECK(factory_->worker_thread()->IsCurrent()); | |
2125 media_controller_->call_w()->RtcEventLog()->StopLogging(); | |
2126 } | |
2102 } // namespace webrtc | 2127 } // namespace webrtc |
OLD | NEW |