| 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 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1998 cricket::VideoChannel* ChannelTest<VideoTraits>::CreateChannel( | 1998 cricket::VideoChannel* ChannelTest<VideoTraits>::CreateChannel( |
| 1999 rtc::Thread* worker_thread, | 1999 rtc::Thread* worker_thread, |
| 2000 rtc::Thread* network_thread, | 2000 rtc::Thread* network_thread, |
| 2001 cricket::MediaEngineInterface* engine, | 2001 cricket::MediaEngineInterface* engine, |
| 2002 cricket::FakeVideoMediaChannel* ch, | 2002 cricket::FakeVideoMediaChannel* ch, |
| 2003 cricket::TransportController* transport_controller, | 2003 cricket::TransportController* transport_controller, |
| 2004 bool rtcp) { | 2004 bool rtcp) { |
| 2005 cricket::VideoChannel* channel = | 2005 cricket::VideoChannel* channel = |
| 2006 new cricket::VideoChannel(worker_thread, network_thread, ch, | 2006 new cricket::VideoChannel(worker_thread, network_thread, ch, |
| 2007 transport_controller, cricket::CN_VIDEO, rtcp); | 2007 transport_controller, cricket::CN_VIDEO, rtcp); |
| 2008 if (!channel->Init_w()) { | 2008 if (!channel->Init_w(nullptr)) { |
| 2009 delete channel; | 2009 delete channel; |
| 2010 channel = NULL; | 2010 channel = NULL; |
| 2011 } | 2011 } |
| 2012 return channel; | 2012 return channel; |
| 2013 } | 2013 } |
| 2014 | 2014 |
| 2015 // override to add 0 parameter | 2015 // override to add 0 parameter |
| 2016 template<> | 2016 template<> |
| 2017 bool ChannelTest<VideoTraits>::AddStream1(int id) { | 2017 bool ChannelTest<VideoTraits>::AddStream1(int id) { |
| 2018 return channel1_->AddRecvStream(cricket::StreamParams::CreateLegacy(id)); | 2018 return channel1_->AddRecvStream(cricket::StreamParams::CreateLegacy(id)); |
| (...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3222 cricket::DataChannel* ChannelTest<DataTraits>::CreateChannel( | 3222 cricket::DataChannel* ChannelTest<DataTraits>::CreateChannel( |
| 3223 rtc::Thread* worker_thread, | 3223 rtc::Thread* worker_thread, |
| 3224 rtc::Thread* network_thread, | 3224 rtc::Thread* network_thread, |
| 3225 cricket::MediaEngineInterface* engine, | 3225 cricket::MediaEngineInterface* engine, |
| 3226 cricket::FakeDataMediaChannel* ch, | 3226 cricket::FakeDataMediaChannel* ch, |
| 3227 cricket::TransportController* transport_controller, | 3227 cricket::TransportController* transport_controller, |
| 3228 bool rtcp) { | 3228 bool rtcp) { |
| 3229 cricket::DataChannel* channel = | 3229 cricket::DataChannel* channel = |
| 3230 new cricket::DataChannel(worker_thread, network_thread, ch, | 3230 new cricket::DataChannel(worker_thread, network_thread, ch, |
| 3231 transport_controller, cricket::CN_DATA, rtcp); | 3231 transport_controller, cricket::CN_DATA, rtcp); |
| 3232 if (!channel->Init_w()) { | 3232 if (!channel->Init_w(nullptr)) { |
| 3233 delete channel; | 3233 delete channel; |
| 3234 channel = NULL; | 3234 channel = NULL; |
| 3235 } | 3235 } |
| 3236 return channel; | 3236 return channel; |
| 3237 } | 3237 } |
| 3238 | 3238 |
| 3239 template <> | 3239 template <> |
| 3240 void ChannelTest<DataTraits>::CreateContent( | 3240 void ChannelTest<DataTraits>::CreateContent( |
| 3241 int flags, | 3241 int flags, |
| 3242 const cricket::AudioCodec& audio_codec, | 3242 const cricket::AudioCodec& audio_codec, |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3549 }; | 3549 }; |
| 3550 rtc::CopyOnWriteBuffer payload(data, 3); | 3550 rtc::CopyOnWriteBuffer payload(data, 3); |
| 3551 cricket::SendDataResult result; | 3551 cricket::SendDataResult result; |
| 3552 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 3552 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
| 3553 EXPECT_EQ(params.ssrc, | 3553 EXPECT_EQ(params.ssrc, |
| 3554 media_channel1_->last_sent_data_params().ssrc); | 3554 media_channel1_->last_sent_data_params().ssrc); |
| 3555 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 3555 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
| 3556 } | 3556 } |
| 3557 | 3557 |
| 3558 // TODO(pthatcher): TestSetReceiver? | 3558 // TODO(pthatcher): TestSetReceiver? |
| OLD | NEW |