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