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

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

Issue 1648813004: Remove candidates when doing continual gathering (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Fix a Windows compiling error 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // TODO(honghaiz): Change the name to OnIceConnectionStateChange so as to 73 // TODO(honghaiz): Change the name to OnIceConnectionStateChange so as to
74 // conform to the w3c standard. 74 // conform to the w3c standard.
75 virtual void OnIceConnectionChange( 75 virtual void OnIceConnectionChange(
76 PeerConnectionInterface::IceConnectionState new_state) {} 76 PeerConnectionInterface::IceConnectionState new_state) {}
77 // Called any time the IceGatheringState changes 77 // Called any time the IceGatheringState changes
78 virtual void OnIceGatheringChange( 78 virtual void OnIceGatheringChange(
79 PeerConnectionInterface::IceGatheringState new_state) {} 79 PeerConnectionInterface::IceGatheringState new_state) {}
80 // New Ice candidate have been found. 80 // New Ice candidate have been found.
81 virtual void OnIceCandidate(const IceCandidateInterface* candidate) = 0; 81 virtual void OnIceCandidate(const IceCandidateInterface* candidate) = 0;
82 82
83 // Some local ICE candidates have been removed.
84 virtual void OnIceCandidatesRemoved(
85 const std::vector<IceCandidateInterfaceRefPtr>& candidates) = 0;
86
83 // Called whenever the state changes between receiving and not receiving. 87 // Called whenever the state changes between receiving and not receiving.
84 virtual void OnIceConnectionReceivingChange(bool receiving) {} 88 virtual void OnIceConnectionReceivingChange(bool receiving) {}
85 89
86 protected: 90 protected:
87 ~IceObserver() {} 91 ~IceObserver() {}
88 92
89 private: 93 private:
90 RTC_DISALLOW_COPY_AND_ASSIGN(IceObserver); 94 RTC_DISALLOW_COPY_AND_ASSIGN(IceObserver);
91 }; 95 };
92 96
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 const MediaConstraintsInterface* constraints, 201 const MediaConstraintsInterface* constraints,
198 const cricket::MediaSessionOptions& session_options); 202 const cricket::MediaSessionOptions& session_options);
199 // The ownership of |desc| will be transferred after this call. 203 // The ownership of |desc| will be transferred after this call.
200 bool SetLocalDescription(SessionDescriptionInterface* desc, 204 bool SetLocalDescription(SessionDescriptionInterface* desc,
201 std::string* err_desc); 205 std::string* err_desc);
202 // The ownership of |desc| will be transferred after this call. 206 // The ownership of |desc| will be transferred after this call.
203 bool SetRemoteDescription(SessionDescriptionInterface* desc, 207 bool SetRemoteDescription(SessionDescriptionInterface* desc,
204 std::string* err_desc); 208 std::string* err_desc);
205 bool ProcessIceMessage(const IceCandidateInterface* ice_candidate); 209 bool ProcessIceMessage(const IceCandidateInterface* ice_candidate);
206 210
211 bool RemoveRemoteIceCandidates(
212 const std::vector<IceCandidateInterfaceRefPtr>& ice_candidates);
213
207 bool SetIceTransports(PeerConnectionInterface::IceTransportsType type); 214 bool SetIceTransports(PeerConnectionInterface::IceTransportsType type);
208 215
209 cricket::IceConfig ParseIceConfig( 216 cricket::IceConfig ParseIceConfig(
210 const PeerConnectionInterface::RTCConfiguration& config) const; 217 const PeerConnectionInterface::RTCConfiguration& config) const;
211 218
212 void SetIceConfig(const cricket::IceConfig& ice_config); 219 void SetIceConfig(const cricket::IceConfig& ice_config);
213 220
214 // Start gathering candidates for any new transports, or transports doing an 221 // Start gathering candidates for any new transports, or transports doing an
215 // ICE restart. 222 // ICE restart.
216 void MaybeStartGathering(); 223 void MaybeStartGathering();
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // Returns the media index for a local ice candidate given the content name. 381 // Returns the media index for a local ice candidate given the content name.
375 // Returns false if the local session description does not have a media 382 // Returns false if the local session description does not have a media
376 // content called |content_name|. 383 // content called |content_name|.
377 bool GetLocalCandidateMediaIndex(const std::string& content_name, 384 bool GetLocalCandidateMediaIndex(const std::string& content_name,
378 int* sdp_mline_index); 385 int* sdp_mline_index);
379 // Uses all remote candidates in |remote_desc| in this session. 386 // Uses all remote candidates in |remote_desc| in this session.
380 bool UseCandidatesInSessionDescription( 387 bool UseCandidatesInSessionDescription(
381 const SessionDescriptionInterface* remote_desc); 388 const SessionDescriptionInterface* remote_desc);
382 // Uses |candidate| in this session. 389 // Uses |candidate| in this session.
383 bool UseCandidate(const IceCandidateInterface* candidate); 390 bool UseCandidate(const IceCandidateInterface* candidate);
391 // Stops using the group of remote candidates in this session.
392 bool CeaseRemoteCandidates(
393 const std::vector<IceCandidateInterfaceRefPtr>& ice_candidates);
394 const cricket::ContentInfo* GetRemoteMediaContent(
395 const IceCandidateInterface* candidate) const;
384 // Deletes the corresponding channel of contents that don't exist in |desc|. 396 // Deletes the corresponding channel of contents that don't exist in |desc|.
385 // |desc| can be null. This means that all channels are deleted. 397 // |desc| can be null. This means that all channels are deleted.
386 void RemoveUnusedChannels(const cricket::SessionDescription* desc); 398 void RemoveUnusedChannels(const cricket::SessionDescription* desc);
387 399
388 // Allocates media channels based on the |desc|. If |desc| doesn't have 400 // Allocates media channels based on the |desc|. If |desc| doesn't have
389 // the BUNDLE option, this method will disable BUNDLE in PortAllocator. 401 // the BUNDLE option, this method will disable BUNDLE in PortAllocator.
390 // This method will also delete any existing media channels before creating. 402 // This method will also delete any existing media channels before creating.
391 bool CreateChannels(const cricket::SessionDescription* desc); 403 bool CreateChannels(const cricket::SessionDescription* desc);
392 404
393 // Helper methods to create media channels. 405 // Helper methods to create media channels.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 bool ReadyToUseRemoteCandidate(const IceCandidateInterface* candidate, 439 bool ReadyToUseRemoteCandidate(const IceCandidateInterface* candidate,
428 const SessionDescriptionInterface* remote_desc, 440 const SessionDescriptionInterface* remote_desc,
429 bool* valid); 441 bool* valid);
430 442
431 void OnTransportControllerConnectionState(cricket::IceConnectionState state); 443 void OnTransportControllerConnectionState(cricket::IceConnectionState state);
432 void OnTransportControllerReceiving(bool receiving); 444 void OnTransportControllerReceiving(bool receiving);
433 void OnTransportControllerGatheringState(cricket::IceGatheringState state); 445 void OnTransportControllerGatheringState(cricket::IceGatheringState state);
434 void OnTransportControllerCandidatesGathered( 446 void OnTransportControllerCandidatesGathered(
435 const std::string& transport_name, 447 const std::string& transport_name,
436 const cricket::Candidates& candidates); 448 const cricket::Candidates& candidates);
449 void OnTransportControllerCandidatesRemoved(
450 const std::string& transport_name,
451 const cricket::Candidates& candidates);
437 452
438 std::string GetSessionErrorMsg(); 453 std::string GetSessionErrorMsg();
439 454
440 // Invoked when TransportController connection completion is signaled. 455 // Invoked when TransportController connection completion is signaled.
441 // Reports stats for all transports in use. 456 // Reports stats for all transports in use.
442 void ReportTransportStats(); 457 void ReportTransportStats();
443 458
444 // Gather the usage of IPv4/IPv6 as best connection. 459 // Gather the usage of IPv4/IPv6 as best connection.
445 void ReportBestConnectionState(const cricket::TransportStats& stats); 460 void ReportBestConnectionState(const cricket::TransportStats& stats);
446 461
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 PeerConnectionInterface::BundlePolicy bundle_policy_; 511 PeerConnectionInterface::BundlePolicy bundle_policy_;
497 512
498 // Declares the RTCP mux policy for the WebRTCSession. 513 // Declares the RTCP mux policy for the WebRTCSession.
499 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; 514 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_;
500 515
501 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); 516 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession);
502 }; 517 };
503 } // namespace webrtc 518 } // namespace webrtc
504 519
505 #endif // WEBRTC_API_WEBRTCSESSION_H_ 520 #endif // WEBRTC_API_WEBRTCSESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698