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

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

Issue 1748403002: Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Updated RTP/RTCP module to use setter methods instead of passing the event log pointer in the const… Created 4 years, 9 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
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 14 matching lines...) Expand all
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 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after
2092 2095
2093 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { 2096 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const {
2094 for (const auto& channel : sctp_data_channels_) { 2097 for (const auto& channel : sctp_data_channels_) {
2095 if (channel->id() == sid) { 2098 if (channel->id() == sid) {
2096 return channel; 2099 return channel;
2097 } 2100 }
2098 } 2101 }
2099 return nullptr; 2102 return nullptr;
2100 } 2103 }
2101 2104
2105 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file) {
the sun 2016/03/03 09:25:12 Nit: put methods in the order they are declared in
ivoc 2016/03/10 13:15:36 I moved them to a better place, but it's difficult
2106 return factory_->worker_thread()->Invoke<bool>(
2107 rtc::Bind(&PeerConnection::StartRtcEventLog_w, this, file));
2108 }
2109
2110 void PeerConnection::StopRtcEventLog() {
2111 factory_->worker_thread()->Invoke<void>(
2112 rtc::Bind(&PeerConnection::StopRtcEventLog_w, this));
2113 }
2114
2115 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file) {
2116 RTC_DCHECK(factory_->worker_thread()->IsCurrent());
2117 webrtc::Call* call = media_controller_->call_w();
2118 if (call) {
the sun 2016/03/03 09:25:12 Shouldn't need this condition; add an RTC_DCHECK()
terelius 2016/03/10 10:42:32 I agree. The Call is created indirectly by CreateP
ivoc 2016/03/10 13:15:36 Good idea, done.
2119 return call->RtcEventLog()->StartLogging(file);
2120 }
2121 return false;
2122 }
2123
2124 void PeerConnection::StopRtcEventLog_w() {
2125 RTC_DCHECK(factory_->worker_thread()->IsCurrent());
2126 webrtc::Call* call = media_controller_->call_w();
2127 if (call) {
2128 call->RtcEventLog()->StopLogging();
2129 }
2130 }
2102 } // namespace webrtc 2131 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698