| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // test RtpSenders/RtpReceivers. | 55 // test RtpSenders/RtpReceivers. |
| 56 media_engine_(new cricket::FakeMediaEngine()), | 56 media_engine_(new cricket::FakeMediaEngine()), |
| 57 channel_manager_(media_engine_, | 57 channel_manager_(media_engine_, |
| 58 rtc::Thread::Current(), | 58 rtc::Thread::Current(), |
| 59 rtc::Thread::Current()), | 59 rtc::Thread::Current()), |
| 60 fake_call_(Call::Config(&event_log_)), | 60 fake_call_(Call::Config(&event_log_)), |
| 61 fake_media_controller_(&channel_manager_, &fake_call_), | 61 fake_media_controller_(&channel_manager_, &fake_call_), |
| 62 stream_(MediaStream::Create(kStreamLabel1)) { | 62 stream_(MediaStream::Create(kStreamLabel1)) { |
| 63 // Create channels to be used by the RtpSenders and RtpReceivers. | 63 // Create channels to be used by the RtpSenders and RtpReceivers. |
| 64 channel_manager_.Init(); | 64 channel_manager_.Init(); |
| 65 bool rtcp_enabled = false; |
| 66 bool srtp_required = true; |
| 65 voice_channel_ = channel_manager_.CreateVoiceChannel( | 67 voice_channel_ = channel_manager_.CreateVoiceChannel( |
| 66 &fake_media_controller_, &fake_transport_controller_, cricket::CN_AUDIO, | 68 &fake_media_controller_, &fake_transport_controller_, cricket::CN_AUDIO, |
| 67 nullptr, false, cricket::AudioOptions()); | 69 nullptr, rtcp_enabled, srtp_required, cricket::AudioOptions()); |
| 68 video_channel_ = channel_manager_.CreateVideoChannel( | 70 video_channel_ = channel_manager_.CreateVideoChannel( |
| 69 &fake_media_controller_, &fake_transport_controller_, cricket::CN_VIDEO, | 71 &fake_media_controller_, &fake_transport_controller_, cricket::CN_VIDEO, |
| 70 nullptr, false, cricket::VideoOptions()); | 72 nullptr, rtcp_enabled, srtp_required, cricket::VideoOptions()); |
| 71 voice_media_channel_ = media_engine_->GetVoiceChannel(0); | 73 voice_media_channel_ = media_engine_->GetVoiceChannel(0); |
| 72 video_media_channel_ = media_engine_->GetVideoChannel(0); | 74 video_media_channel_ = media_engine_->GetVideoChannel(0); |
| 73 RTC_CHECK(voice_channel_); | 75 RTC_CHECK(voice_channel_); |
| 74 RTC_CHECK(video_channel_); | 76 RTC_CHECK(video_channel_); |
| 75 RTC_CHECK(voice_media_channel_); | 77 RTC_CHECK(voice_media_channel_); |
| 76 RTC_CHECK(video_media_channel_); | 78 RTC_CHECK(video_media_channel_); |
| 77 | 79 |
| 78 // Create streams for predefined SSRCs. Streams need to exist in order | 80 // Create streams for predefined SSRCs. Streams need to exist in order |
| 79 // for the senders and receievers to apply parameters to them. | 81 // for the senders and receievers to apply parameters to them. |
| 80 // Normally these would be created by SetLocalDescription and | 82 // Normally these would be created by SetLocalDescription and |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 CreateVideoRtpReceiver(); | 615 CreateVideoRtpReceiver(); |
| 614 | 616 |
| 615 RtpParameters params = video_rtp_receiver_->GetParameters(); | 617 RtpParameters params = video_rtp_receiver_->GetParameters(); |
| 616 EXPECT_EQ(1u, params.encodings.size()); | 618 EXPECT_EQ(1u, params.encodings.size()); |
| 617 EXPECT_TRUE(video_rtp_receiver_->SetParameters(params)); | 619 EXPECT_TRUE(video_rtp_receiver_->SetParameters(params)); |
| 618 | 620 |
| 619 DestroyVideoRtpReceiver(); | 621 DestroyVideoRtpReceiver(); |
| 620 } | 622 } |
| 621 | 623 |
| 622 } // namespace webrtc | 624 } // namespace webrtc |
| OLD | NEW |