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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 | 551 |
552 } // namespace | 552 } // namespace |
553 | 553 |
554 // The PeerConnectionMediaConfig tests below verify that configuration | 554 // The PeerConnectionMediaConfig tests below verify that configuration |
555 // and constraints are propagated into the MediaConfig passed to | 555 // and constraints are propagated into the MediaConfig passed to |
556 // CreateMediaController. These settings are intended for MediaChannel | 556 // CreateMediaController. These settings are intended for MediaChannel |
557 // constructors, but that is not exercised by these unittest. | 557 // constructors, but that is not exercised by these unittest. |
558 class PeerConnectionFactoryForTest : public webrtc::PeerConnectionFactory { | 558 class PeerConnectionFactoryForTest : public webrtc::PeerConnectionFactory { |
559 public: | 559 public: |
560 webrtc::MediaControllerInterface* CreateMediaController( | 560 webrtc::MediaControllerInterface* CreateMediaController( |
561 const cricket::MediaConfig& config) const override { | 561 const cricket::MediaConfig& config, |
| 562 webrtc::RtcEventLog* event_log) const override { |
562 create_media_controller_called_ = true; | 563 create_media_controller_called_ = true; |
563 create_media_controller_config_ = config; | 564 create_media_controller_config_ = config; |
564 | 565 |
565 webrtc::MediaControllerInterface* mc = | 566 webrtc::MediaControllerInterface* mc = |
566 PeerConnectionFactory::CreateMediaController(config); | 567 PeerConnectionFactory::CreateMediaController(config, event_log); |
567 EXPECT_TRUE(mc != nullptr); | 568 EXPECT_TRUE(mc != nullptr); |
568 return mc; | 569 return mc; |
569 } | 570 } |
570 | 571 |
571 cricket::TransportController* CreateTransportController( | 572 cricket::TransportController* CreateTransportController( |
572 cricket::PortAllocator* port_allocator, | 573 cricket::PortAllocator* port_allocator, |
573 bool redetermine_role_on_ice_restart) override { | 574 bool redetermine_role_on_ice_restart) override { |
574 transport_controller = new cricket::TransportController( | 575 transport_controller = new cricket::TransportController( |
575 rtc::Thread::Current(), rtc::Thread::Current(), port_allocator, | 576 rtc::Thread::Current(), rtc::Thread::Current(), port_allocator, |
576 redetermine_role_on_ice_restart); | 577 redetermine_role_on_ice_restart); |
(...skipping 2314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2891 FakeConstraints updated_answer_c; | 2892 FakeConstraints updated_answer_c; |
2892 answer_c.SetMandatoryReceiveAudio(false); | 2893 answer_c.SetMandatoryReceiveAudio(false); |
2893 answer_c.SetMandatoryReceiveVideo(false); | 2894 answer_c.SetMandatoryReceiveVideo(false); |
2894 | 2895 |
2895 cricket::MediaSessionOptions updated_answer_options; | 2896 cricket::MediaSessionOptions updated_answer_options; |
2896 EXPECT_TRUE( | 2897 EXPECT_TRUE( |
2897 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); | 2898 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); |
2898 EXPECT_TRUE(updated_answer_options.has_audio()); | 2899 EXPECT_TRUE(updated_answer_options.has_audio()); |
2899 EXPECT_TRUE(updated_answer_options.has_video()); | 2900 EXPECT_TRUE(updated_answer_options.has_video()); |
2900 } | 2901 } |
OLD | NEW |