Refactoring: move ownership of RtcEventLog from Call to PeerConnection
This CL is a pure refactoring which should not result in any functinal
changes. It moves ownership of the RtcEventLog from webrtc::Call to the
webrtc::PeerConnection object.
This is done so that we can add RtcEventLog support for ICE events -
which will require the TransportController to have a pointer to the
RtcEventLog. PeerConnection is the closest common owner of both Call and
TransportController (through WebRtcSession).
BUG=webrtc:6393
Review-Url: https://codereview.webrtc.org/2353033005
Cr-Commit-Position: refs/heads/master@{#14578}
diff --git a/webrtc/api/peerconnection.h b/webrtc/api/peerconnection.h
index 3087160..f5b0af8 100644
--- a/webrtc/api/peerconnection.h
+++ b/webrtc/api/peerconnection.h
@@ -29,6 +29,7 @@
class MediaStreamObserver;
class VideoRtpReceiver;
+class RtcEventLog;
// Populates |session_options| from |rtc_options|, and returns true if options
// are valid.
@@ -392,6 +393,8 @@
IceGatheringState ice_gathering_state_;
std::unique_ptr<cricket::PortAllocator> port_allocator_;
+ // The EventLog needs to outlive the media controller.
+ std::unique_ptr<RtcEventLog> event_log_;
std::unique_ptr<MediaControllerInterface> media_controller_;
// One PeerConnection has only one RTCP CNAME.
@@ -426,7 +429,6 @@
std::vector<
rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>>
receivers_;
-
std::unique_ptr<WebRtcSession> session_;
std::unique_ptr<StatsCollector> stats_;
rtc::scoped_refptr<RTCStatsCollector> stats_collector_;