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

Unified 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: Undid unneccessary changes to rtp_rtcp module. 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/api/peerconnection.cc
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
index ee359271c2fc2573b2f209d9af2c365ed6a5970c..796a27748faa8b6165d0f2328d418e541b587f30 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -32,10 +32,13 @@
#include "webrtc/api/videosource.h"
#include "webrtc/api/videotrack.h"
#include "webrtc/base/arraysize.h"
+#include "webrtc/base/bind.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/stringencode.h"
#include "webrtc/base/stringutils.h"
#include "webrtc/base/trace_event.h"
+#include "webrtc/call.h"
+#include "webrtc/call/rtc_event_log.h"
#include "webrtc/media/sctp/sctpdataengine.h"
#include "webrtc/p2p/client/basicportallocator.h"
#include "webrtc/pc/channelmanager.h"
@@ -1226,6 +1229,17 @@ void PeerConnection::RegisterUMAObserver(UMAObserver* observer) {
}
}
+bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file,
+ int64_t max_size_bytes) {
+ return factory_->worker_thread()->Invoke<bool>(rtc::Bind(
+ &PeerConnection::StartRtcEventLog_w, this, file, max_size_bytes));
+}
+
+void PeerConnection::StopRtcEventLog() {
+ factory_->worker_thread()->Invoke<void>(
+ rtc::Bind(&PeerConnection::StopRtcEventLog_w, this));
+}
+
const SessionDescriptionInterface* PeerConnection::local_description() const {
return session_->local_description();
}
@@ -2099,4 +2113,15 @@ DataChannel* PeerConnection::FindDataChannelBySid(int sid) const {
return nullptr;
}
+bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file,
+ int64_t max_size_bytes) {
+ RTC_DCHECK(factory_->worker_thread()->IsCurrent());
+ 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.
+ file, max_size_bytes);
+}
+
+void PeerConnection::StopRtcEventLog_w() {
+ RTC_DCHECK(factory_->worker_thread()->IsCurrent());
+ media_controller_->call_w()->RtcEventLog()->StopLogging();
+}
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698