| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 AddLegacyStreamInContent(kSsrc2, flags2, &remote_media_content2_); | 181 AddLegacyStreamInContent(kSsrc2, flags2, &remote_media_content2_); |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 typename T::Channel* CreateChannel( | 184 typename T::Channel* CreateChannel( |
| 185 rtc::Thread* worker_thread, | 185 rtc::Thread* worker_thread, |
| 186 rtc::Thread* network_thread, | 186 rtc::Thread* network_thread, |
| 187 cricket::MediaEngineInterface* engine, | 187 cricket::MediaEngineInterface* engine, |
| 188 typename T::MediaChannel* ch, | 188 typename T::MediaChannel* ch, |
| 189 cricket::TransportController* transport_controller, | 189 cricket::TransportController* transport_controller, |
| 190 int flags) { | 190 int flags) { |
| 191 typename T::Channel* channel = | 191 typename T::Channel* channel = new typename T::Channel( |
| 192 new typename T::Channel(worker_thread, network_thread, engine, ch, | 192 worker_thread, network_thread, engine, ch, transport_controller, |
| 193 transport_controller, cricket::CN_AUDIO, | 193 cricket::CN_AUDIO, (flags & RTCP) != 0, (flags & SECURE) != 0); |
| 194 (flags & RTCP) != 0); | |
| 195 rtc::CryptoOptions crypto_options; | 194 rtc::CryptoOptions crypto_options; |
| 196 crypto_options.enable_gcm_crypto_suites = (flags & GCM_CIPHER) != 0; | 195 crypto_options.enable_gcm_crypto_suites = (flags & GCM_CIPHER) != 0; |
| 197 channel->SetCryptoOptions(crypto_options); | 196 channel->SetCryptoOptions(crypto_options); |
| 198 if (!channel->Init_w(nullptr)) { | 197 if (!channel->Init_w(nullptr)) { |
| 199 delete channel; | 198 delete channel; |
| 200 channel = NULL; | 199 channel = NULL; |
| 201 } | 200 } |
| 202 return channel; | 201 return channel; |
| 203 } | 202 } |
| 204 | 203 |
| (...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2063 | 2062 |
| 2064 // override to add NULL parameter | 2063 // override to add NULL parameter |
| 2065 template <> | 2064 template <> |
| 2066 cricket::VideoChannel* ChannelTest<VideoTraits>::CreateChannel( | 2065 cricket::VideoChannel* ChannelTest<VideoTraits>::CreateChannel( |
| 2067 rtc::Thread* worker_thread, | 2066 rtc::Thread* worker_thread, |
| 2068 rtc::Thread* network_thread, | 2067 rtc::Thread* network_thread, |
| 2069 cricket::MediaEngineInterface* engine, | 2068 cricket::MediaEngineInterface* engine, |
| 2070 cricket::FakeVideoMediaChannel* ch, | 2069 cricket::FakeVideoMediaChannel* ch, |
| 2071 cricket::TransportController* transport_controller, | 2070 cricket::TransportController* transport_controller, |
| 2072 int flags) { | 2071 int flags) { |
| 2073 cricket::VideoChannel* channel = | 2072 cricket::VideoChannel* channel = new cricket::VideoChannel( |
| 2074 new cricket::VideoChannel(worker_thread, network_thread, ch, | 2073 worker_thread, network_thread, ch, transport_controller, |
| 2075 transport_controller, cricket::CN_VIDEO, | 2074 cricket::CN_VIDEO, (flags & RTCP) != 0, (flags & SECURE) != 0); |
| 2076 (flags & RTCP) != 0); | |
| 2077 rtc::CryptoOptions crypto_options; | 2075 rtc::CryptoOptions crypto_options; |
| 2078 crypto_options.enable_gcm_crypto_suites = (flags & GCM_CIPHER) != 0; | 2076 crypto_options.enable_gcm_crypto_suites = (flags & GCM_CIPHER) != 0; |
| 2079 channel->SetCryptoOptions(crypto_options); | 2077 channel->SetCryptoOptions(crypto_options); |
| 2080 if (!channel->Init_w(nullptr)) { | 2078 if (!channel->Init_w(nullptr)) { |
| 2081 delete channel; | 2079 delete channel; |
| 2082 channel = NULL; | 2080 channel = NULL; |
| 2083 } | 2081 } |
| 2084 return channel; | 2082 return channel; |
| 2085 } | 2083 } |
| 2086 | 2084 |
| (...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3336 | 3334 |
| 3337 // Override to avoid engine channel parameter. | 3335 // Override to avoid engine channel parameter. |
| 3338 template <> | 3336 template <> |
| 3339 cricket::DataChannel* ChannelTest<DataTraits>::CreateChannel( | 3337 cricket::DataChannel* ChannelTest<DataTraits>::CreateChannel( |
| 3340 rtc::Thread* worker_thread, | 3338 rtc::Thread* worker_thread, |
| 3341 rtc::Thread* network_thread, | 3339 rtc::Thread* network_thread, |
| 3342 cricket::MediaEngineInterface* engine, | 3340 cricket::MediaEngineInterface* engine, |
| 3343 cricket::FakeDataMediaChannel* ch, | 3341 cricket::FakeDataMediaChannel* ch, |
| 3344 cricket::TransportController* transport_controller, | 3342 cricket::TransportController* transport_controller, |
| 3345 int flags) { | 3343 int flags) { |
| 3346 cricket::DataChannel* channel = | 3344 cricket::DataChannel* channel = new cricket::DataChannel( |
| 3347 new cricket::DataChannel(worker_thread, network_thread, ch, | 3345 worker_thread, network_thread, ch, transport_controller, cricket::CN_DATA, |
| 3348 transport_controller, cricket::CN_DATA, | 3346 (flags & RTCP) != 0, (flags & SECURE) != 0); |
| 3349 (flags & RTCP) != 0); | |
| 3350 rtc::CryptoOptions crypto_options; | 3347 rtc::CryptoOptions crypto_options; |
| 3351 crypto_options.enable_gcm_crypto_suites = (flags & GCM_CIPHER) != 0; | 3348 crypto_options.enable_gcm_crypto_suites = (flags & GCM_CIPHER) != 0; |
| 3352 channel->SetCryptoOptions(crypto_options); | 3349 channel->SetCryptoOptions(crypto_options); |
| 3353 if (!channel->Init_w(nullptr)) { | 3350 if (!channel->Init_w(nullptr)) { |
| 3354 delete channel; | 3351 delete channel; |
| 3355 channel = NULL; | 3352 channel = NULL; |
| 3356 } | 3353 } |
| 3357 return channel; | 3354 return channel; |
| 3358 } | 3355 } |
| 3359 | 3356 |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3678 }; | 3675 }; |
| 3679 rtc::CopyOnWriteBuffer payload(data, 3); | 3676 rtc::CopyOnWriteBuffer payload(data, 3); |
| 3680 cricket::SendDataResult result; | 3677 cricket::SendDataResult result; |
| 3681 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 3678 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
| 3682 EXPECT_EQ(params.ssrc, | 3679 EXPECT_EQ(params.ssrc, |
| 3683 media_channel1_->last_sent_data_params().ssrc); | 3680 media_channel1_->last_sent_data_params().ssrc); |
| 3684 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 3681 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
| 3685 } | 3682 } |
| 3686 | 3683 |
| 3687 // TODO(pthatcher): TestSetReceiver? | 3684 // TODO(pthatcher): TestSetReceiver? |
| OLD | NEW |