Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: webrtc/api/peerconnection.cc

Issue 2110113003: Reland of "Move RtcEventLog object from inside VoiceEngine to Call.", "Fix to make the start/stop f… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/api/peerconnection.h ('k') | webrtc/api/peerconnectionfactory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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/pc/channelmanager.h" 41 #include "webrtc/pc/channelmanager.h"
40 #include "webrtc/system_wrappers/include/field_trial.h" 42 #include "webrtc/system_wrappers/include/field_trial.h"
41 43
42 namespace { 44 namespace {
43 45
44 using webrtc::DataChannel; 46 using webrtc::DataChannel;
45 using webrtc::MediaConstraintsInterface; 47 using webrtc::MediaConstraintsInterface;
46 using webrtc::MediaStreamInterface; 48 using webrtc::MediaStreamInterface;
47 using webrtc::PeerConnectionInterface; 49 using webrtc::PeerConnectionInterface;
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 kEnumCounterAddressFamily, kPeerConnection_IPv6, 1258 kEnumCounterAddressFamily, kPeerConnection_IPv6,
1257 kPeerConnectionAddressFamilyCounter_Max); 1259 kPeerConnectionAddressFamilyCounter_Max);
1258 } else { 1260 } else {
1259 uma_observer_->IncrementEnumCounter( 1261 uma_observer_->IncrementEnumCounter(
1260 kEnumCounterAddressFamily, kPeerConnection_IPv4, 1262 kEnumCounterAddressFamily, kPeerConnection_IPv4,
1261 kPeerConnectionAddressFamilyCounter_Max); 1263 kPeerConnectionAddressFamilyCounter_Max);
1262 } 1264 }
1263 } 1265 }
1264 } 1266 }
1265 1267
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
1266 const SessionDescriptionInterface* PeerConnection::local_description() const { 1280 const SessionDescriptionInterface* PeerConnection::local_description() const {
1267 return session_->local_description(); 1281 return session_->local_description();
1268 } 1282 }
1269 1283
1270 const SessionDescriptionInterface* PeerConnection::remote_description() const { 1284 const SessionDescriptionInterface* PeerConnection::remote_description() const {
1271 return session_->remote_description(); 1285 return session_->remote_description();
1272 } 1286 }
1273 1287
1274 void PeerConnection::Close() { 1288 void PeerConnection::Close() {
1275 TRACE_EVENT0("webrtc", "PeerConnection::Close"); 1289 TRACE_EVENT0("webrtc", "PeerConnection::Close");
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 port_allocator_->set_candidate_filter( 2241 port_allocator_->set_candidate_filter(
2228 ConvertIceTransportTypeToCandidateFilter(configuration.type)); 2242 ConvertIceTransportTypeToCandidateFilter(configuration.type));
2229 // Call this last since it may create pooled allocator sessions using the 2243 // Call this last since it may create pooled allocator sessions using the
2230 // candidate filter set above. 2244 // candidate filter set above.
2231 port_allocator_->SetConfiguration(stun_servers, turn_servers, 2245 port_allocator_->SetConfiguration(stun_servers, turn_servers,
2232 configuration.ice_candidate_pool_size, 2246 configuration.ice_candidate_pool_size,
2233 configuration.prune_turn_ports); 2247 configuration.prune_turn_ports);
2234 return true; 2248 return true;
2235 } 2249 }
2236 2250
2251 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file,
2252 int64_t max_size_bytes) {
2253 return media_controller_->call_w()->StartEventLog(file, max_size_bytes);
2254 }
2255
2256 void PeerConnection::StopRtcEventLog_w() {
2257 media_controller_->call_w()->StopEventLog();
2258 }
2237 } // namespace webrtc 2259 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/peerconnection.h ('k') | webrtc/api/peerconnectionfactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698