| OLD | NEW |
| 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 |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 Init(std::move(dtls_identity_store)); | 448 Init(std::move(dtls_identity_store)); |
| 449 } | 449 } |
| 450 | 450 |
| 451 void InitWithDtmfCodec() { | 451 void InitWithDtmfCodec() { |
| 452 // Add kTelephoneEventCodec for dtmf test. | 452 // Add kTelephoneEventCodec for dtmf test. |
| 453 const cricket::AudioCodec kTelephoneEventCodec(106, "telephone-event", 8000, | 453 const cricket::AudioCodec kTelephoneEventCodec(106, "telephone-event", 8000, |
| 454 0, 1); | 454 0, 1); |
| 455 std::vector<cricket::AudioCodec> codecs; | 455 std::vector<cricket::AudioCodec> codecs; |
| 456 codecs.push_back(kTelephoneEventCodec); | 456 codecs.push_back(kTelephoneEventCodec); |
| 457 media_engine_->SetAudioCodecs(codecs); | 457 media_engine_->SetAudioCodecs(codecs); |
| 458 desc_factory_->set_audio_codecs(codecs); | 458 desc_factory_->set_audio_codecs(codecs, codecs); |
| 459 Init(); | 459 Init(); |
| 460 } | 460 } |
| 461 | 461 |
| 462 void SendAudioVideoStream1() { | 462 void SendAudioVideoStream1() { |
| 463 send_stream_1_ = true; | 463 send_stream_1_ = true; |
| 464 send_stream_2_ = false; | 464 send_stream_2_ = false; |
| 465 send_audio_ = true; | 465 send_audio_ = true; |
| 466 send_video_ = true; | 466 send_video_ = true; |
| 467 } | 467 } |
| 468 | 468 |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1330 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory. | 1330 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory. |
| 1331 void AddCNCodecs() { | 1331 void AddCNCodecs() { |
| 1332 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1); | 1332 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1); |
| 1333 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1); | 1333 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1); |
| 1334 | 1334 |
| 1335 // Add kCNCodec for dtmf test. | 1335 // Add kCNCodec for dtmf test. |
| 1336 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();; | 1336 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();; |
| 1337 codecs.push_back(kCNCodec1); | 1337 codecs.push_back(kCNCodec1); |
| 1338 codecs.push_back(kCNCodec2); | 1338 codecs.push_back(kCNCodec2); |
| 1339 media_engine_->SetAudioCodecs(codecs); | 1339 media_engine_->SetAudioCodecs(codecs); |
| 1340 desc_factory_->set_audio_codecs(codecs); | 1340 desc_factory_->set_audio_codecs(codecs, codecs); |
| 1341 } | 1341 } |
| 1342 | 1342 |
| 1343 bool VerifyNoCNCodecs(const cricket::ContentInfo* content) { | 1343 bool VerifyNoCNCodecs(const cricket::ContentInfo* content) { |
| 1344 const cricket::ContentDescription* description = content->description; | 1344 const cricket::ContentDescription* description = content->description; |
| 1345 ASSERT(description != NULL); | 1345 ASSERT(description != NULL); |
| 1346 const cricket::AudioContentDescription* audio_content_desc = | 1346 const cricket::AudioContentDescription* audio_content_desc = |
| 1347 static_cast<const cricket::AudioContentDescription*>(description); | 1347 static_cast<const cricket::AudioContentDescription*>(description); |
| 1348 ASSERT(audio_content_desc != NULL); | 1348 ASSERT(audio_content_desc != NULL); |
| 1349 for (size_t i = 0; i < audio_content_desc->codecs().size(); ++i) { | 1349 for (size_t i = 0; i < audio_content_desc->codecs().size(); ++i) { |
| 1350 if (audio_content_desc->codecs()[i].name == "CN") | 1350 if (audio_content_desc->codecs()[i].name == "CN") |
| (...skipping 3053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4404 } | 4404 } |
| 4405 | 4405 |
| 4406 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4406 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
| 4407 // currently fails because upon disconnection and reconnection OnIceComplete is | 4407 // currently fails because upon disconnection and reconnection OnIceComplete is |
| 4408 // called more than once without returning to IceGatheringGathering. | 4408 // called more than once without returning to IceGatheringGathering. |
| 4409 | 4409 |
| 4410 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4410 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
| 4411 WebRtcSessionTest, | 4411 WebRtcSessionTest, |
| 4412 testing::Values(ALREADY_GENERATED, | 4412 testing::Values(ALREADY_GENERATED, |
| 4413 DTLS_IDENTITY_STORE)); | 4413 DTLS_IDENTITY_STORE)); |
| OLD | NEW |