| Index: webrtc/api/jsepsessiondescription.cc
|
| diff --git a/webrtc/api/jsepsessiondescription.cc b/webrtc/api/jsepsessiondescription.cc
|
| index b47114b9bcd052979f13a19bdea35d3faae6efc5..ac9b6afbd829aa1c743c6146196d18cb1e3a6cfe 100644
|
| --- a/webrtc/api/jsepsessiondescription.cc
|
| +++ b/webrtc/api/jsepsessiondescription.cc
|
| @@ -137,6 +137,28 @@ bool JsepSessionDescription::AddCandidate(
|
| return true;
|
| }
|
|
|
| +int JsepSessionDescription::RemoveCandidate(
|
| + const IceCandidateInterface* candidate) {
|
| + if (!candidate || candidate->sdp_mline_index() < 0) {
|
| + return 0;
|
| + }
|
| + size_t mediasection_index = 0;
|
| + if (!GetMediasectionIndex(candidate, &mediasection_index) ||
|
| + mediasection_index >= number_of_mediasections()) {
|
| + return 0;
|
| + }
|
| + return candidate_collection_[mediasection_index].remove(candidate);
|
| +}
|
| +
|
| +int JsepSessionDescription::RemoveCandidates(
|
| + const std::vector<IceCandidateInterfaceRefPtr>& candidates) {
|
| + int num_removed = 0;
|
| + for (auto candidate : candidates) {
|
| + num_removed += RemoveCandidate(candidate.get());
|
| + }
|
| + return num_removed;
|
| +}
|
| +
|
| size_t JsepSessionDescription::number_of_mediasections() const {
|
| if (!description_)
|
| return 0;
|
|
|