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

Side by Side Diff: webrtc/api/jsep.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/java/src/org/webrtc/PeerConnection.java ('k') | webrtc/api/jsepicecandidate.h » ('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 // Interfaces matching the draft-ietf-rtcweb-jsep-01. 11 // Interfaces matching the draft-ietf-rtcweb-jsep-01.
12 12
13 #ifndef WEBRTC_API_JSEP_H_ 13 #ifndef WEBRTC_API_JSEP_H_
14 #define WEBRTC_API_JSEP_H_ 14 #define WEBRTC_API_JSEP_H_
15 15
16 #include <string> 16 #include <string>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/base/basictypes.h" 19 #include "webrtc/base/basictypes.h"
20 #include "webrtc/base/refcount.h" 20 #include "webrtc/base/refcount.h"
21 21
22 namespace cricket { 22 namespace cricket {
23 class Candidate;
23 class SessionDescription; 24 class SessionDescription;
24 class Candidate;
25 } // namespace cricket 25 } // namespace cricket
26 26
27 namespace webrtc { 27 namespace webrtc {
28 28
29 struct SdpParseError { 29 struct SdpParseError {
30 public: 30 public:
31 // The sdp line that causes the error. 31 // The sdp line that causes the error.
32 std::string line; 32 std::string line;
33 // Explains the error. 33 // Explains the error.
34 std::string description; 34 std::string description;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // Get the session id and session version, which are defined based on 88 // Get the session id and session version, which are defined based on
89 // RFC 4566 for the SDP o= line. 89 // RFC 4566 for the SDP o= line.
90 virtual std::string session_id() const = 0; 90 virtual std::string session_id() const = 0;
91 virtual std::string session_version() const = 0; 91 virtual std::string session_version() const = 0;
92 virtual std::string type() const = 0; 92 virtual std::string type() const = 0;
93 // Adds the specified candidate to the description. 93 // Adds the specified candidate to the description.
94 // Ownership is not transferred. 94 // Ownership is not transferred.
95 // Returns false if the session description does not have a media section that 95 // Returns false if the session description does not have a media section that
96 // corresponds to the |candidate| label. 96 // corresponds to the |candidate| label.
97 virtual bool AddCandidate(const IceCandidateInterface* candidate) = 0; 97 virtual bool AddCandidate(const IceCandidateInterface* candidate) = 0;
98 // Removes the candidates from the description.
99 // Returns the number of candidates removed.
100 virtual size_t RemoveCandidates(
101 const std::vector<cricket::Candidate>& candidates) { return 0; }
102
98 // Returns the number of m- lines in the session description. 103 // Returns the number of m- lines in the session description.
99 virtual size_t number_of_mediasections() const = 0; 104 virtual size_t number_of_mediasections() const = 0;
100 // Returns a collection of all candidates that belong to a certain m-line 105 // Returns a collection of all candidates that belong to a certain m-line
101 virtual const IceCandidateCollection* candidates( 106 virtual const IceCandidateCollection* candidates(
102 size_t mediasection_index) const = 0; 107 size_t mediasection_index) const = 0;
103 // Serializes the description to SDP. 108 // Serializes the description to SDP.
104 virtual bool ToString(std::string* out) const = 0; 109 virtual bool ToString(std::string* out) const = 0;
105 }; 110 };
106 111
107 // Creates a SessionDescriptionInterface based on SDP string and the type. 112 // Creates a SessionDescriptionInterface based on SDP string and the type.
(...skipping 21 matching lines...) Expand all
129 virtual void OnSuccess() = 0; 134 virtual void OnSuccess() = 0;
130 virtual void OnFailure(const std::string& error) = 0; 135 virtual void OnFailure(const std::string& error) = 0;
131 136
132 protected: 137 protected:
133 ~SetSessionDescriptionObserver() {} 138 ~SetSessionDescriptionObserver() {}
134 }; 139 };
135 140
136 } // namespace webrtc 141 } // namespace webrtc
137 142
138 #endif // WEBRTC_API_JSEP_H_ 143 #endif // WEBRTC_API_JSEP_H_
OLDNEW
« no previous file with comments | « webrtc/api/java/src/org/webrtc/PeerConnection.java ('k') | webrtc/api/jsepicecandidate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698