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

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

Issue 1788703003: Reland the CL to remove candidates when doing continual gathering (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: 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
« no previous file with comments | « webrtc/api/webrtcsdp.cc ('k') | webrtc/api/webrtcsession.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #ifndef WEBRTC_API_WEBRTCSESSION_H_ 11 #ifndef WEBRTC_API_WEBRTCSESSION_H_
12 #define WEBRTC_API_WEBRTCSESSION_H_ 12 #define WEBRTC_API_WEBRTCSESSION_H_
13 13
14 #include <set> 14 #include <set>
15 #include <string> 15 #include <string>
16 #include <vector> 16 #include <vector>
17 17
18 #include "webrtc/api/datachannel.h" 18 #include "webrtc/api/datachannel.h"
19 #include "webrtc/api/dtmfsender.h" 19 #include "webrtc/api/dtmfsender.h"
20 #include "webrtc/api/mediacontroller.h" 20 #include "webrtc/api/mediacontroller.h"
21 #include "webrtc/api/mediastreamprovider.h" 21 #include "webrtc/api/mediastreamprovider.h"
22 #include "webrtc/api/peerconnectioninterface.h" 22 #include "webrtc/api/peerconnectioninterface.h"
23 #include "webrtc/api/statstypes.h" 23 #include "webrtc/api/statstypes.h"
24 #include "webrtc/base/sigslot.h" 24 #include "webrtc/base/sigslot.h"
25 #include "webrtc/base/sslidentity.h" 25 #include "webrtc/base/sslidentity.h"
26 #include "webrtc/base/thread.h" 26 #include "webrtc/base/thread.h"
27 #include "webrtc/media/base/mediachannel.h" 27 #include "webrtc/media/base/mediachannel.h"
28 #include "webrtc/p2p/base/candidate.h"
28 #include "webrtc/p2p/base/transportcontroller.h" 29 #include "webrtc/p2p/base/transportcontroller.h"
29 #include "webrtc/pc/mediasession.h" 30 #include "webrtc/pc/mediasession.h"
30 31
31 namespace cricket { 32 namespace cricket {
32 33
33 class ChannelManager; 34 class ChannelManager;
34 class DataChannel; 35 class DataChannel;
35 class StatsReport; 36 class StatsReport;
36 class VideoCapturer; 37 class VideoCapturer;
37 class VideoChannel; 38 class VideoChannel;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // TODO(honghaiz): Change the name to OnIceConnectionStateChange so as to 75 // TODO(honghaiz): Change the name to OnIceConnectionStateChange so as to
75 // conform to the w3c standard. 76 // conform to the w3c standard.
76 virtual void OnIceConnectionChange( 77 virtual void OnIceConnectionChange(
77 PeerConnectionInterface::IceConnectionState new_state) {} 78 PeerConnectionInterface::IceConnectionState new_state) {}
78 // Called any time the IceGatheringState changes 79 // Called any time the IceGatheringState changes
79 virtual void OnIceGatheringChange( 80 virtual void OnIceGatheringChange(
80 PeerConnectionInterface::IceGatheringState new_state) {} 81 PeerConnectionInterface::IceGatheringState new_state) {}
81 // New Ice candidate have been found. 82 // New Ice candidate have been found.
82 virtual void OnIceCandidate(const IceCandidateInterface* candidate) = 0; 83 virtual void OnIceCandidate(const IceCandidateInterface* candidate) = 0;
83 84
85 // Some local ICE candidates have been removed.
86 virtual void OnIceCandidatesRemoved(
87 const std::vector<cricket::Candidate>& candidates) = 0;
88
84 // Called whenever the state changes between receiving and not receiving. 89 // Called whenever the state changes between receiving and not receiving.
85 virtual void OnIceConnectionReceivingChange(bool receiving) {} 90 virtual void OnIceConnectionReceivingChange(bool receiving) {}
86 91
87 protected: 92 protected:
88 ~IceObserver() {} 93 ~IceObserver() {}
89 94
90 private: 95 private:
91 RTC_DISALLOW_COPY_AND_ASSIGN(IceObserver); 96 RTC_DISALLOW_COPY_AND_ASSIGN(IceObserver);
92 }; 97 };
93 98
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 void CreateAnswer(CreateSessionDescriptionObserver* observer, 203 void CreateAnswer(CreateSessionDescriptionObserver* observer,
199 const cricket::MediaSessionOptions& session_options); 204 const cricket::MediaSessionOptions& session_options);
200 // The ownership of |desc| will be transferred after this call. 205 // The ownership of |desc| will be transferred after this call.
201 bool SetLocalDescription(SessionDescriptionInterface* desc, 206 bool SetLocalDescription(SessionDescriptionInterface* desc,
202 std::string* err_desc); 207 std::string* err_desc);
203 // The ownership of |desc| will be transferred after this call. 208 // The ownership of |desc| will be transferred after this call.
204 bool SetRemoteDescription(SessionDescriptionInterface* desc, 209 bool SetRemoteDescription(SessionDescriptionInterface* desc,
205 std::string* err_desc); 210 std::string* err_desc);
206 bool ProcessIceMessage(const IceCandidateInterface* ice_candidate); 211 bool ProcessIceMessage(const IceCandidateInterface* ice_candidate);
207 212
213 bool RemoveRemoteIceCandidates(
214 const std::vector<cricket::Candidate>& candidates);
215
208 bool SetIceTransports(PeerConnectionInterface::IceTransportsType type); 216 bool SetIceTransports(PeerConnectionInterface::IceTransportsType type);
209 217
210 cricket::IceConfig ParseIceConfig( 218 cricket::IceConfig ParseIceConfig(
211 const PeerConnectionInterface::RTCConfiguration& config) const; 219 const PeerConnectionInterface::RTCConfiguration& config) const;
212 220
213 void SetIceConfig(const cricket::IceConfig& ice_config); 221 void SetIceConfig(const cricket::IceConfig& ice_config);
214 222
215 // Start gathering candidates for any new transports, or transports doing an 223 // Start gathering candidates for any new transports, or transports doing an
216 // ICE restart. 224 // ICE restart.
217 void MaybeStartGathering(); 225 void MaybeStartGathering();
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 // index is valid. 432 // index is valid.
425 bool ReadyToUseRemoteCandidate(const IceCandidateInterface* candidate, 433 bool ReadyToUseRemoteCandidate(const IceCandidateInterface* candidate,
426 const SessionDescriptionInterface* remote_desc, 434 const SessionDescriptionInterface* remote_desc,
427 bool* valid); 435 bool* valid);
428 436
429 void OnTransportControllerConnectionState(cricket::IceConnectionState state); 437 void OnTransportControllerConnectionState(cricket::IceConnectionState state);
430 void OnTransportControllerReceiving(bool receiving); 438 void OnTransportControllerReceiving(bool receiving);
431 void OnTransportControllerGatheringState(cricket::IceGatheringState state); 439 void OnTransportControllerGatheringState(cricket::IceGatheringState state);
432 void OnTransportControllerCandidatesGathered( 440 void OnTransportControllerCandidatesGathered(
433 const std::string& transport_name, 441 const std::string& transport_name,
434 const cricket::Candidates& candidates); 442 const std::vector<cricket::Candidate>& candidates);
443 void OnTransportControllerCandidatesRemoved(
444 const std::vector<cricket::Candidate>& candidates);
435 445
436 std::string GetSessionErrorMsg(); 446 std::string GetSessionErrorMsg();
437 447
438 // Invoked when TransportController connection completion is signaled. 448 // Invoked when TransportController connection completion is signaled.
439 // Reports stats for all transports in use. 449 // Reports stats for all transports in use.
440 void ReportTransportStats(); 450 void ReportTransportStats();
441 451
442 // Gather the usage of IPv4/IPv6 as best connection. 452 // Gather the usage of IPv4/IPv6 as best connection.
443 void ReportBestConnectionState(const cricket::TransportStats& stats); 453 void ReportBestConnectionState(const cricket::TransportStats& stats);
444 454
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 PeerConnectionInterface::BundlePolicy bundle_policy_; 505 PeerConnectionInterface::BundlePolicy bundle_policy_;
496 506
497 // Declares the RTCP mux policy for the WebRTCSession. 507 // Declares the RTCP mux policy for the WebRTCSession.
498 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; 508 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_;
499 509
500 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); 510 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession);
501 }; 511 };
502 } // namespace webrtc 512 } // namespace webrtc
503 513
504 #endif // WEBRTC_API_WEBRTCSESSION_H_ 514 #endif // WEBRTC_API_WEBRTCSESSION_H_
OLDNEW
« no previous file with comments | « webrtc/api/webrtcsdp.cc ('k') | webrtc/api/webrtcsession.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698