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

Side by Side Diff: webrtc/api/jsepsessiondescription.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/jsepicecandidate.cc ('k') | webrtc/api/jsepsessiondescription.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 // Implements the SessionDescriptionInterface. 11 // Implements the SessionDescriptionInterface.
12 12
13 #ifndef WEBRTC_API_JSEPSESSIONDESCRIPTION_H_ 13 #ifndef WEBRTC_API_JSEPSESSIONDESCRIPTION_H_
14 #define WEBRTC_API_JSEPSESSIONDESCRIPTION_H_ 14 #define WEBRTC_API_JSEPSESSIONDESCRIPTION_H_
15 15
16 #include <string> 16 #include <string>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/api/jsep.h" 19 #include "webrtc/api/jsep.h"
20 #include "webrtc/api/jsepicecandidate.h" 20 #include "webrtc/api/jsepicecandidate.h"
21 #include "webrtc/base/scoped_ptr.h" 21 #include "webrtc/base/scoped_ptr.h"
22 #include "webrtc/p2p/base/candidate.h"
22 23
23 namespace cricket { 24 namespace cricket {
24 class SessionDescription; 25 class SessionDescription;
25 } 26 }
26 27
27 namespace webrtc { 28 namespace webrtc {
28 29
29 class JsepSessionDescription : public SessionDescriptionInterface { 30 class JsepSessionDescription : public SessionDescriptionInterface {
30 public: 31 public:
31 explicit JsepSessionDescription(const std::string& type); 32 explicit JsepSessionDescription(const std::string& type);
(...skipping 18 matching lines...) Expand all
50 } 51 }
51 virtual std::string session_version() const { 52 virtual std::string session_version() const {
52 return session_version_; 53 return session_version_;
53 } 54 }
54 virtual std::string type() const { 55 virtual std::string type() const {
55 return type_; 56 return type_;
56 } 57 }
57 // Allow changing the type. Used for testing. 58 // Allow changing the type. Used for testing.
58 void set_type(const std::string& type) { type_ = type; } 59 void set_type(const std::string& type) { type_ = type; }
59 virtual bool AddCandidate(const IceCandidateInterface* candidate); 60 virtual bool AddCandidate(const IceCandidateInterface* candidate);
61 virtual size_t RemoveCandidates(
62 const std::vector<cricket::Candidate>& candidates);
60 virtual size_t number_of_mediasections() const; 63 virtual size_t number_of_mediasections() const;
61 virtual const IceCandidateCollection* candidates( 64 virtual const IceCandidateCollection* candidates(
62 size_t mediasection_index) const; 65 size_t mediasection_index) const;
63 virtual bool ToString(std::string* out) const; 66 virtual bool ToString(std::string* out) const;
64 67
65 // Default video encoder settings. The resolution is the max resolution. 68 // Default video encoder settings. The resolution is the max resolution.
66 // TODO(perkj): Implement proper negotiation of video resolution. 69 // TODO(perkj): Implement proper negotiation of video resolution.
67 static const int kDefaultVideoCodecId; 70 static const int kDefaultVideoCodecId;
68 static const int kDefaultVideoCodecFramerate; 71 static const int kDefaultVideoCodecFramerate;
69 static const char kDefaultVideoCodecName[]; 72 static const char kDefaultVideoCodecName[];
70 static const int kMaxVideoCodecWidth; 73 static const int kMaxVideoCodecWidth;
71 static const int kMaxVideoCodecHeight; 74 static const int kMaxVideoCodecHeight;
72 static const int kDefaultVideoCodecPreference; 75 static const int kDefaultVideoCodecPreference;
73 76
74 private: 77 private:
75 rtc::scoped_ptr<cricket::SessionDescription> description_; 78 rtc::scoped_ptr<cricket::SessionDescription> description_;
76 std::string session_id_; 79 std::string session_id_;
77 std::string session_version_; 80 std::string session_version_;
78 std::string type_; 81 std::string type_;
79 std::vector<JsepCandidateCollection> candidate_collection_; 82 std::vector<JsepCandidateCollection> candidate_collection_;
80 83
81 bool GetMediasectionIndex(const IceCandidateInterface* candidate, 84 bool GetMediasectionIndex(const IceCandidateInterface* candidate,
82 size_t* index); 85 size_t* index);
86 int GetMediasectionIndex(const cricket::Candidate& candidate);
83 87
84 RTC_DISALLOW_COPY_AND_ASSIGN(JsepSessionDescription); 88 RTC_DISALLOW_COPY_AND_ASSIGN(JsepSessionDescription);
85 }; 89 };
86 90
87 } // namespace webrtc 91 } // namespace webrtc
88 92
89 #endif // WEBRTC_API_JSEPSESSIONDESCRIPTION_H_ 93 #endif // WEBRTC_API_JSEPSESSIONDESCRIPTION_H_
OLDNEW
« no previous file with comments | « webrtc/api/jsepicecandidate.cc ('k') | webrtc/api/jsepsessiondescription.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698