OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2009 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 typename T::Channel* CreateChannel( | 183 typename T::Channel* CreateChannel( |
184 rtc::Thread* worker_thread, | 184 rtc::Thread* worker_thread, |
185 rtc::Thread* network_thread, | 185 rtc::Thread* network_thread, |
186 cricket::MediaEngineInterface* engine, | 186 cricket::MediaEngineInterface* engine, |
187 typename T::MediaChannel* ch, | 187 typename T::MediaChannel* ch, |
188 cricket::TransportController* transport_controller, | 188 cricket::TransportController* transport_controller, |
189 bool rtcp) { | 189 bool rtcp) { |
190 typename T::Channel* channel = | 190 typename T::Channel* channel = |
191 new typename T::Channel(worker_thread, network_thread, engine, ch, | 191 new typename T::Channel(worker_thread, network_thread, engine, ch, |
192 transport_controller, cricket::CN_AUDIO, rtcp); | 192 transport_controller, cricket::CN_AUDIO, rtcp); |
193 if (!channel->Init_w()) { | 193 if (!channel->Init_w(nullptr)) { |
194 delete channel; | 194 delete channel; |
195 channel = NULL; | 195 channel = NULL; |
196 } | 196 } |
197 return channel; | 197 return channel; |
198 } | 198 } |
199 | 199 |
200 bool SendInitiate() { | 200 bool SendInitiate() { |
201 bool result = channel1_->SetLocalContent(&local_media_content1_, | 201 bool result = channel1_->SetLocalContent(&local_media_content1_, |
202 CA_OFFER, NULL); | 202 CA_OFFER, NULL); |
203 if (result) { | 203 if (result) { |
(...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2011 cricket::VideoChannel* ChannelTest<VideoTraits>::CreateChannel( | 2011 cricket::VideoChannel* ChannelTest<VideoTraits>::CreateChannel( |
2012 rtc::Thread* worker_thread, | 2012 rtc::Thread* worker_thread, |
2013 rtc::Thread* network_thread, | 2013 rtc::Thread* network_thread, |
2014 cricket::MediaEngineInterface* engine, | 2014 cricket::MediaEngineInterface* engine, |
2015 cricket::FakeVideoMediaChannel* ch, | 2015 cricket::FakeVideoMediaChannel* ch, |
2016 cricket::TransportController* transport_controller, | 2016 cricket::TransportController* transport_controller, |
2017 bool rtcp) { | 2017 bool rtcp) { |
2018 cricket::VideoChannel* channel = | 2018 cricket::VideoChannel* channel = |
2019 new cricket::VideoChannel(worker_thread, network_thread, ch, | 2019 new cricket::VideoChannel(worker_thread, network_thread, ch, |
2020 transport_controller, cricket::CN_VIDEO, rtcp); | 2020 transport_controller, cricket::CN_VIDEO, rtcp); |
2021 if (!channel->Init_w()) { | 2021 if (!channel->Init_w(nullptr)) { |
2022 delete channel; | 2022 delete channel; |
2023 channel = NULL; | 2023 channel = NULL; |
2024 } | 2024 } |
2025 return channel; | 2025 return channel; |
2026 } | 2026 } |
2027 | 2027 |
2028 // override to add 0 parameter | 2028 // override to add 0 parameter |
2029 template<> | 2029 template<> |
2030 bool ChannelTest<VideoTraits>::AddStream1(int id) { | 2030 bool ChannelTest<VideoTraits>::AddStream1(int id) { |
2031 return channel1_->AddRecvStream(cricket::StreamParams::CreateLegacy(id)); | 2031 return channel1_->AddRecvStream(cricket::StreamParams::CreateLegacy(id)); |
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3251 cricket::DataChannel* ChannelTest<DataTraits>::CreateChannel( | 3251 cricket::DataChannel* ChannelTest<DataTraits>::CreateChannel( |
3252 rtc::Thread* worker_thread, | 3252 rtc::Thread* worker_thread, |
3253 rtc::Thread* network_thread, | 3253 rtc::Thread* network_thread, |
3254 cricket::MediaEngineInterface* engine, | 3254 cricket::MediaEngineInterface* engine, |
3255 cricket::FakeDataMediaChannel* ch, | 3255 cricket::FakeDataMediaChannel* ch, |
3256 cricket::TransportController* transport_controller, | 3256 cricket::TransportController* transport_controller, |
3257 bool rtcp) { | 3257 bool rtcp) { |
3258 cricket::DataChannel* channel = | 3258 cricket::DataChannel* channel = |
3259 new cricket::DataChannel(worker_thread, network_thread, ch, | 3259 new cricket::DataChannel(worker_thread, network_thread, ch, |
3260 transport_controller, cricket::CN_DATA, rtcp); | 3260 transport_controller, cricket::CN_DATA, rtcp); |
3261 if (!channel->Init_w()) { | 3261 if (!channel->Init_w(nullptr)) { |
3262 delete channel; | 3262 delete channel; |
3263 channel = NULL; | 3263 channel = NULL; |
3264 } | 3264 } |
3265 return channel; | 3265 return channel; |
3266 } | 3266 } |
3267 | 3267 |
3268 template <> | 3268 template <> |
3269 void ChannelTest<DataTraits>::CreateContent( | 3269 void ChannelTest<DataTraits>::CreateContent( |
3270 int flags, | 3270 int flags, |
3271 const cricket::AudioCodec& audio_codec, | 3271 const cricket::AudioCodec& audio_codec, |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3586 }; | 3586 }; |
3587 rtc::CopyOnWriteBuffer payload(data, 3); | 3587 rtc::CopyOnWriteBuffer payload(data, 3); |
3588 cricket::SendDataResult result; | 3588 cricket::SendDataResult result; |
3589 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 3589 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
3590 EXPECT_EQ(params.ssrc, | 3590 EXPECT_EQ(params.ssrc, |
3591 media_channel1_->last_sent_data_params().ssrc); | 3591 media_channel1_->last_sent_data_params().ssrc); |
3592 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 3592 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
3593 } | 3593 } |
3594 | 3594 |
3595 // TODO(pthatcher): TestSetReceiver? | 3595 // TODO(pthatcher): TestSetReceiver? |
OLD | NEW |