OLD | NEW |
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 void SetRemoteDescription(SetSessionDescriptionObserver* observer, | 131 void SetRemoteDescription(SetSessionDescriptionObserver* observer, |
132 SessionDescriptionInterface* desc) override; | 132 SessionDescriptionInterface* desc) override; |
133 bool SetConfiguration( | 133 bool SetConfiguration( |
134 const PeerConnectionInterface::RTCConfiguration& config) override; | 134 const PeerConnectionInterface::RTCConfiguration& config) override; |
135 bool AddIceCandidate(const IceCandidateInterface* candidate) override; | 135 bool AddIceCandidate(const IceCandidateInterface* candidate) override; |
136 bool RemoveIceCandidates( | 136 bool RemoveIceCandidates( |
137 const std::vector<cricket::Candidate>& candidates) override; | 137 const std::vector<cricket::Candidate>& candidates) override; |
138 | 138 |
139 void RegisterUMAObserver(UMAObserver* observer) override; | 139 void RegisterUMAObserver(UMAObserver* observer) override; |
140 | 140 |
| 141 bool StartRtcEventLog(rtc::PlatformFile file, |
| 142 int64_t max_size_bytes) override; |
| 143 void StopRtcEventLog() override; |
| 144 |
141 void Close() override; | 145 void Close() override; |
142 | 146 |
143 // Virtual for unit tests. | 147 // Virtual for unit tests. |
144 virtual const std::vector<rtc::scoped_refptr<DataChannel>>& | 148 virtual const std::vector<rtc::scoped_refptr<DataChannel>>& |
145 sctp_data_channels() const { | 149 sctp_data_channels() const { |
146 return sctp_data_channels_; | 150 return sctp_data_channels_; |
147 } | 151 } |
148 | 152 |
149 protected: | 153 protected: |
150 ~PeerConnection() override; | 154 ~PeerConnection() override; |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 TrackInfos* GetRemoteTracks(cricket::MediaType media_type); | 348 TrackInfos* GetRemoteTracks(cricket::MediaType media_type); |
345 TrackInfos* GetLocalTracks(cricket::MediaType media_type); | 349 TrackInfos* GetLocalTracks(cricket::MediaType media_type); |
346 const TrackInfo* FindTrackInfo(const TrackInfos& infos, | 350 const TrackInfo* FindTrackInfo(const TrackInfos& infos, |
347 const std::string& stream_label, | 351 const std::string& stream_label, |
348 const std::string track_id) const; | 352 const std::string track_id) const; |
349 | 353 |
350 // Returns the specified SCTP DataChannel in sctp_data_channels_, | 354 // Returns the specified SCTP DataChannel in sctp_data_channels_, |
351 // or nullptr if not found. | 355 // or nullptr if not found. |
352 DataChannel* FindDataChannelBySid(int sid) const; | 356 DataChannel* FindDataChannelBySid(int sid) const; |
353 | 357 |
| 358 // Starts recording an Rtc EventLog using the supplied platform file. |
| 359 // This function should only be called from the worker thread. |
| 360 bool StartRtcEventLog_w(rtc::PlatformFile file, int64_t max_size_bytes); |
| 361 // Starts recording an Rtc EventLog using the supplied platform file. |
| 362 // This function should only be called from the worker thread. |
| 363 void StopRtcEventLog_w(); |
| 364 |
354 // Storing the factory as a scoped reference pointer ensures that the memory | 365 // Storing the factory as a scoped reference pointer ensures that the memory |
355 // in the PeerConnectionFactoryImpl remains available as long as the | 366 // in the PeerConnectionFactoryImpl remains available as long as the |
356 // PeerConnection is running. It is passed to PeerConnection as a raw pointer. | 367 // PeerConnection is running. It is passed to PeerConnection as a raw pointer. |
357 // However, since the reference counting is done in the | 368 // However, since the reference counting is done in the |
358 // PeerConnectionFactoryInterface all instances created using the raw pointer | 369 // PeerConnectionFactoryInterface all instances created using the raw pointer |
359 // will refer to the same reference count. | 370 // will refer to the same reference count. |
360 rtc::scoped_refptr<PeerConnectionFactory> factory_; | 371 rtc::scoped_refptr<PeerConnectionFactory> factory_; |
361 PeerConnectionObserver* observer_; | 372 PeerConnectionObserver* observer_; |
362 UMAObserver* uma_observer_; | 373 UMAObserver* uma_observer_; |
363 SignalingState signaling_state_; | 374 SignalingState signaling_state_; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 // because its destruction fires signals (such as VoiceChannelDestroyed) | 408 // because its destruction fires signals (such as VoiceChannelDestroyed) |
398 // which will trigger some final actions in PeerConnection... | 409 // which will trigger some final actions in PeerConnection... |
399 rtc::scoped_ptr<WebRtcSession> session_; | 410 rtc::scoped_ptr<WebRtcSession> session_; |
400 // ... But stats_ depends on session_ so it should be destroyed even earlier. | 411 // ... But stats_ depends on session_ so it should be destroyed even earlier. |
401 rtc::scoped_ptr<StatsCollector> stats_; | 412 rtc::scoped_ptr<StatsCollector> stats_; |
402 }; | 413 }; |
403 | 414 |
404 } // namespace webrtc | 415 } // namespace webrtc |
405 | 416 |
406 #endif // WEBRTC_API_PEERCONNECTION_H_ | 417 #endif // WEBRTC_API_PEERCONNECTION_H_ |
OLD | NEW |