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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 media_engine_(new cricket::FakeMediaEngine()), | 63 media_engine_(new cricket::FakeMediaEngine()), |
64 channel_manager_( | 64 channel_manager_( |
65 std::unique_ptr<cricket::MediaEngineInterface>(media_engine_), | 65 std::unique_ptr<cricket::MediaEngineInterface>(media_engine_), |
66 rtc::Thread::Current(), | 66 rtc::Thread::Current(), |
67 rtc::Thread::Current()), | 67 rtc::Thread::Current()), |
68 fake_call_(Call::Config(&event_log_)), | 68 fake_call_(Call::Config(&event_log_)), |
69 fake_media_controller_(&channel_manager_, &fake_call_), | 69 fake_media_controller_(&channel_manager_, &fake_call_), |
70 stream_(MediaStream::Create(kStreamLabel1)) { | 70 stream_(MediaStream::Create(kStreamLabel1)) { |
71 // Create channels to be used by the RtpSenders and RtpReceivers. | 71 // Create channels to be used by the RtpSenders and RtpReceivers. |
72 channel_manager_.Init(); | 72 channel_manager_.Init(); |
73 bool rtcp_mux_required = true; | |
74 bool srtp_required = true; | 73 bool srtp_required = true; |
75 cricket::DtlsTransportInternal* rtp_transport = | 74 cricket::DtlsTransportInternal* rtp_transport = |
76 fake_transport_controller_.CreateDtlsTransport( | 75 fake_transport_controller_.CreateDtlsTransport( |
77 cricket::CN_AUDIO, cricket::ICE_CANDIDATE_COMPONENT_RTP); | 76 cricket::CN_AUDIO, cricket::ICE_CANDIDATE_COMPONENT_RTP); |
78 voice_channel_ = channel_manager_.CreateVoiceChannel( | 77 voice_channel_ = channel_manager_.CreateVoiceChannel( |
79 &fake_media_controller_, rtp_transport, nullptr, rtc::Thread::Current(), | 78 &fake_media_controller_, rtp_transport, nullptr, rtc::Thread::Current(), |
80 cricket::CN_AUDIO, nullptr, rtcp_mux_required, srtp_required, | 79 cricket::CN_AUDIO, srtp_required, cricket::AudioOptions()); |
81 cricket::AudioOptions()); | |
82 video_channel_ = channel_manager_.CreateVideoChannel( | 80 video_channel_ = channel_manager_.CreateVideoChannel( |
83 &fake_media_controller_, rtp_transport, nullptr, rtc::Thread::Current(), | 81 &fake_media_controller_, rtp_transport, nullptr, rtc::Thread::Current(), |
84 cricket::CN_VIDEO, nullptr, rtcp_mux_required, srtp_required, | 82 cricket::CN_VIDEO, srtp_required, cricket::VideoOptions()); |
85 cricket::VideoOptions()); | |
86 voice_channel_->Enable(true); | 83 voice_channel_->Enable(true); |
87 video_channel_->Enable(true); | 84 video_channel_->Enable(true); |
88 voice_media_channel_ = media_engine_->GetVoiceChannel(0); | 85 voice_media_channel_ = media_engine_->GetVoiceChannel(0); |
89 video_media_channel_ = media_engine_->GetVideoChannel(0); | 86 video_media_channel_ = media_engine_->GetVideoChannel(0); |
90 RTC_CHECK(voice_channel_); | 87 RTC_CHECK(voice_channel_); |
91 RTC_CHECK(video_channel_); | 88 RTC_CHECK(video_channel_); |
92 RTC_CHECK(voice_media_channel_); | 89 RTC_CHECK(voice_media_channel_); |
93 RTC_CHECK(video_media_channel_); | 90 RTC_CHECK(video_media_channel_); |
94 | 91 |
95 // Create streams for predefined SSRCs. Streams need to exist in order | 92 // Create streams for predefined SSRCs. Streams need to exist in order |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 // Make sure the signal from "GetOnDestroyedSignal()" fires when the sender is | 796 // Make sure the signal from "GetOnDestroyedSignal()" fires when the sender is |
800 // destroyed, which is needed for the DTMF sender. | 797 // destroyed, which is needed for the DTMF sender. |
801 TEST_F(RtpSenderReceiverTest, TestOnDestroyedSignal) { | 798 TEST_F(RtpSenderReceiverTest, TestOnDestroyedSignal) { |
802 CreateAudioRtpSender(); | 799 CreateAudioRtpSender(); |
803 EXPECT_FALSE(audio_sender_destroyed_signal_fired_); | 800 EXPECT_FALSE(audio_sender_destroyed_signal_fired_); |
804 audio_rtp_sender_ = nullptr; | 801 audio_rtp_sender_ = nullptr; |
805 EXPECT_TRUE(audio_sender_destroyed_signal_fired_); | 802 EXPECT_TRUE(audio_sender_destroyed_signal_fired_); |
806 } | 803 } |
807 | 804 |
808 } // namespace webrtc | 805 } // namespace webrtc |
OLD | NEW |