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

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

Issue 1748403002: Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Processed review comments and rebased. 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 void SetRemoteDescription(SetSessionDescriptionObserver* observer, 130 void SetRemoteDescription(SetSessionDescriptionObserver* observer,
131 SessionDescriptionInterface* desc) override; 131 SessionDescriptionInterface* desc) override;
132 bool SetConfiguration( 132 bool SetConfiguration(
133 const PeerConnectionInterface::RTCConfiguration& config) override; 133 const PeerConnectionInterface::RTCConfiguration& config) override;
134 bool AddIceCandidate(const IceCandidateInterface* candidate) override; 134 bool AddIceCandidate(const IceCandidateInterface* candidate) override;
135 bool RemoveIceCandidates( 135 bool RemoveIceCandidates(
136 const std::vector<cricket::Candidate>& candidates) override; 136 const std::vector<cricket::Candidate>& candidates) override;
137 137
138 void RegisterUMAObserver(UMAObserver* observer) override; 138 void RegisterUMAObserver(UMAObserver* observer) override;
139 139
140 bool StartRtcEventLog(rtc::PlatformFile file,
141 int64_t max_size_bytes) override;
142 void StopRtcEventLog() override;
143
140 void Close() override; 144 void Close() override;
141 145
142 // Virtual for unit tests. 146 // Virtual for unit tests.
143 virtual const std::vector<rtc::scoped_refptr<DataChannel>>& 147 virtual const std::vector<rtc::scoped_refptr<DataChannel>>&
144 sctp_data_channels() const { 148 sctp_data_channels() const {
145 return sctp_data_channels_; 149 return sctp_data_channels_;
146 }; 150 };
147 151
148 protected: 152 protected:
149 ~PeerConnection() override; 153 ~PeerConnection() override;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 TrackInfos* GetRemoteTracks(cricket::MediaType media_type); 353 TrackInfos* GetRemoteTracks(cricket::MediaType media_type);
350 TrackInfos* GetLocalTracks(cricket::MediaType media_type); 354 TrackInfos* GetLocalTracks(cricket::MediaType media_type);
351 const TrackInfo* FindTrackInfo(const TrackInfos& infos, 355 const TrackInfo* FindTrackInfo(const TrackInfos& infos,
352 const std::string& stream_label, 356 const std::string& stream_label,
353 const std::string track_id) const; 357 const std::string track_id) const;
354 358
355 // Returns the specified SCTP DataChannel in sctp_data_channels_, 359 // Returns the specified SCTP DataChannel in sctp_data_channels_,
356 // or nullptr if not found. 360 // or nullptr if not found.
357 DataChannel* FindDataChannelBySid(int sid) const; 361 DataChannel* FindDataChannelBySid(int sid) const;
358 362
363 // Starts recording an Rtc EventLog using the supplied platform file.
364 // This function should only be called from the worker thread.
365 bool StartRtcEventLog_w(rtc::PlatformFile file, int64_t max_size_bytes);
366 // Starts recording an Rtc EventLog using the supplied platform file.
367 // This function should only be called from the worker thread.
368 void StopRtcEventLog_w();
369
359 // Storing the factory as a scoped reference pointer ensures that the memory 370 // Storing the factory as a scoped reference pointer ensures that the memory
360 // in the PeerConnectionFactoryImpl remains available as long as the 371 // in the PeerConnectionFactoryImpl remains available as long as the
361 // PeerConnection is running. It is passed to PeerConnection as a raw pointer. 372 // PeerConnection is running. It is passed to PeerConnection as a raw pointer.
362 // However, since the reference counting is done in the 373 // However, since the reference counting is done in the
363 // PeerConnectionFactoryInterface all instances created using the raw pointer 374 // PeerConnectionFactoryInterface all instances created using the raw pointer
364 // will refer to the same reference count. 375 // will refer to the same reference count.
365 rtc::scoped_refptr<PeerConnectionFactory> factory_; 376 rtc::scoped_refptr<PeerConnectionFactory> factory_;
366 PeerConnectionObserver* observer_; 377 PeerConnectionObserver* observer_;
367 UMAObserver* uma_observer_; 378 UMAObserver* uma_observer_;
368 SignalingState signaling_state_; 379 SignalingState signaling_state_;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 // because its destruction fires signals (such as VoiceChannelDestroyed) 414 // because its destruction fires signals (such as VoiceChannelDestroyed)
404 // which will trigger some final actions in PeerConnection... 415 // which will trigger some final actions in PeerConnection...
405 rtc::scoped_ptr<WebRtcSession> session_; 416 rtc::scoped_ptr<WebRtcSession> session_;
406 // ... But stats_ depends on session_ so it should be destroyed even earlier. 417 // ... But stats_ depends on session_ so it should be destroyed even earlier.
407 rtc::scoped_ptr<StatsCollector> stats_; 418 rtc::scoped_ptr<StatsCollector> stats_;
408 }; 419 };
409 420
410 } // namespace webrtc 421 } // namespace webrtc
411 422
412 #endif // WEBRTC_API_PEERCONNECTION_H_ 423 #endif // WEBRTC_API_PEERCONNECTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698