| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2011 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 #include <memory> | 11 #include <memory> |
| 12 #include <set> | 12 #include <set> |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "webrtc/api/jsepsessiondescription.h" | 16 #include "webrtc/api/jsepsessiondescription.h" |
| 17 #ifdef WEBRTC_ANDROID | 17 #ifdef WEBRTC_ANDROID |
| 18 #include "webrtc/api/test/androidtestinitializer.h" | 18 #include "webrtc/api/test/androidtestinitializer.h" |
| 19 #endif | 19 #endif |
| 20 #include "webrtc/api/webrtcsdp.h" | 20 #include "webrtc/api/webrtcsdp.h" |
| 21 #include "webrtc/base/checks.h" |
| 21 #include "webrtc/base/gunit.h" | 22 #include "webrtc/base/gunit.h" |
| 22 #include "webrtc/base/logging.h" | 23 #include "webrtc/base/logging.h" |
| 23 #include "webrtc/base/messagedigest.h" | 24 #include "webrtc/base/messagedigest.h" |
| 24 #include "webrtc/base/sslfingerprint.h" | 25 #include "webrtc/base/sslfingerprint.h" |
| 25 #include "webrtc/base/stringencode.h" | 26 #include "webrtc/base/stringencode.h" |
| 26 #include "webrtc/base/stringutils.h" | 27 #include "webrtc/base/stringutils.h" |
| 27 #include "webrtc/media/base/mediaconstants.h" | 28 #include "webrtc/media/base/mediaconstants.h" |
| 28 #include "webrtc/media/engine/webrtcvideoengine2.h" | 29 #include "webrtc/media/engine/webrtcvideoengine2.h" |
| 29 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" | 30 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" |
| 30 #include "webrtc/p2p/base/p2pconstants.h" | 31 #include "webrtc/p2p/base/p2pconstants.h" |
| (...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 | 1354 |
| 1354 // Update the candidates in |jdesc| to use the given |ufrag| and |pwd|. | 1355 // Update the candidates in |jdesc| to use the given |ufrag| and |pwd|. |
| 1355 bool UpdateCandidateUfragPwd(JsepSessionDescription* jdesc, int mline_index, | 1356 bool UpdateCandidateUfragPwd(JsepSessionDescription* jdesc, int mline_index, |
| 1356 const std::string& ufrag, const std::string& pwd) { | 1357 const std::string& ufrag, const std::string& pwd) { |
| 1357 std::string content_name; | 1358 std::string content_name; |
| 1358 if (mline_index == 0) { | 1359 if (mline_index == 0) { |
| 1359 content_name = kAudioContentName; | 1360 content_name = kAudioContentName; |
| 1360 } else if (mline_index == 1) { | 1361 } else if (mline_index == 1) { |
| 1361 content_name = kVideoContentName; | 1362 content_name = kVideoContentName; |
| 1362 } else { | 1363 } else { |
| 1363 ASSERT(false); | 1364 RTC_NOTREACHED(); |
| 1364 } | 1365 } |
| 1365 TransportInfo transport_info( | 1366 TransportInfo transport_info( |
| 1366 content_name, TransportDescription(ufrag, pwd)); | 1367 content_name, TransportDescription(ufrag, pwd)); |
| 1367 SessionDescription* desc = | 1368 SessionDescription* desc = |
| 1368 const_cast<SessionDescription*>(jdesc->description()); | 1369 const_cast<SessionDescription*>(jdesc->description()); |
| 1369 desc->RemoveTransportInfoByName(content_name); | 1370 desc->RemoveTransportInfoByName(content_name); |
| 1370 EXPECT_TRUE(desc->AddTransportInfo(transport_info)); | 1371 EXPECT_TRUE(desc->AddTransportInfo(transport_info)); |
| 1371 for (size_t i = 0; i < jdesc_.number_of_mediasections(); ++i) { | 1372 for (size_t i = 0; i < jdesc_.number_of_mediasections(); ++i) { |
| 1372 const IceCandidateCollection* cc = jdesc_.candidates(i); | 1373 const IceCandidateCollection* cc = jdesc_.candidates(i); |
| 1373 for (size_t j = 0; j < cc->count(); ++j) { | 1374 for (size_t j = 0; j < cc->count(); ++j) { |
| (...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3338 "v=0\r\n" | 3339 "v=0\r\n" |
| 3339 "o=- 18446744069414584320 18446462598732840960 IN IP4 127.0.0.1\r\n" | 3340 "o=- 18446744069414584320 18446462598732840960 IN IP4 127.0.0.1\r\n" |
| 3340 "s=-\r\n" | 3341 "s=-\r\n" |
| 3341 "t=0 0\r\n" | 3342 "t=0 0\r\n" |
| 3342 "m=video 3457 RTP/SAVPF 120\r\n" | 3343 "m=video 3457 RTP/SAVPF 120\r\n" |
| 3343 "b=AS:2147483647\r\n" | 3344 "b=AS:2147483647\r\n" |
| 3344 "foo=fail\r\n"; | 3345 "foo=fail\r\n"; |
| 3345 | 3346 |
| 3346 ExpectParseFailure(std::string(kSdpWithLargeBandwidth), "foo=fail"); | 3347 ExpectParseFailure(std::string(kSdpWithLargeBandwidth), "foo=fail"); |
| 3347 } | 3348 } |
| OLD | NEW |