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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
596 } | 596 } |
597 | 597 |
598 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator; | 598 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator; |
599 bool dtls; | 599 bool dtls; |
600 if (FindConstraint(constraints, | 600 if (FindConstraint(constraints, |
601 webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 601 webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
602 &dtls, | 602 &dtls, |
603 nullptr) && dtls) { | 603 nullptr) && dtls) { |
604 cert_generator.reset(new FakeRTCCertificateGenerator()); | 604 cert_generator.reset(new FakeRTCCertificateGenerator()); |
605 } | 605 } |
606 config.rtcp_mux_policy = PeerConnectionInterface::kRtcpMuxPolicyNegotiate; | |
honghaiz3
2016/06/22 16:58:44
Is there any reason to set kRtcpMuxPolicyNegotiate
Zhi Huang
2016/06/22 21:41:28
Some unit tests rely on the assumption that the po
| |
606 pc_ = pc_factory_->CreatePeerConnection( | 607 pc_ = pc_factory_->CreatePeerConnection( |
607 config, constraints, std::move(port_allocator), | 608 config, constraints, std::move(port_allocator), |
608 std::move(cert_generator), &observer_); | 609 std::move(cert_generator), &observer_); |
609 ASSERT_TRUE(pc_.get() != NULL); | 610 ASSERT_TRUE(pc_.get() != NULL); |
610 observer_.SetPeerConnectionInterface(pc_.get()); | 611 observer_.SetPeerConnectionInterface(pc_.get()); |
611 EXPECT_EQ(PeerConnectionInterface::kStable, observer_.state_); | 612 EXPECT_EQ(PeerConnectionInterface::kStable, observer_.state_); |
612 } | 613 } |
613 | 614 |
614 void CreatePeerConnectionExpectFail(const std::string& uri) { | 615 void CreatePeerConnectionExpectFail(const std::string& uri) { |
615 PeerConnectionInterface::RTCConfiguration config; | 616 PeerConnectionInterface::RTCConfiguration config; |
(...skipping 2196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2812 FakeConstraints updated_answer_c; | 2813 FakeConstraints updated_answer_c; |
2813 answer_c.SetMandatoryReceiveAudio(false); | 2814 answer_c.SetMandatoryReceiveAudio(false); |
2814 answer_c.SetMandatoryReceiveVideo(false); | 2815 answer_c.SetMandatoryReceiveVideo(false); |
2815 | 2816 |
2816 cricket::MediaSessionOptions updated_answer_options; | 2817 cricket::MediaSessionOptions updated_answer_options; |
2817 EXPECT_TRUE( | 2818 EXPECT_TRUE( |
2818 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); | 2819 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); |
2819 EXPECT_TRUE(updated_answer_options.has_audio()); | 2820 EXPECT_TRUE(updated_answer_options.has_audio()); |
2820 EXPECT_TRUE(updated_answer_options.has_video()); | 2821 EXPECT_TRUE(updated_answer_options.has_video()); |
2821 } | 2822 } |
OLD | NEW |