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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 cricket::TransportChannel* data_rtp_transport_channel() { | 246 cricket::TransportChannel* data_rtp_transport_channel() { |
247 return rtp_transport_channel(data_channel()); | 247 return rtp_transport_channel(data_channel()); |
248 } | 248 } |
249 | 249 |
250 cricket::TransportChannel* data_rtcp_transport_channel() { | 250 cricket::TransportChannel* data_rtcp_transport_channel() { |
251 return rtcp_transport_channel(data_channel()); | 251 return rtcp_transport_channel(data_channel()); |
252 } | 252 } |
253 | 253 |
254 using webrtc::WebRtcSession::SetAudioPlayout; | 254 using webrtc::WebRtcSession::SetAudioPlayout; |
255 using webrtc::WebRtcSession::SetAudioSend; | 255 using webrtc::WebRtcSession::SetAudioSend; |
256 using webrtc::WebRtcSession::SetSource; | |
257 using webrtc::WebRtcSession::SetVideoPlayout; | 256 using webrtc::WebRtcSession::SetVideoPlayout; |
258 using webrtc::WebRtcSession::SetVideoSend; | 257 using webrtc::WebRtcSession::SetVideoSend; |
259 | 258 |
260 private: | 259 private: |
261 cricket::TransportChannel* rtp_transport_channel(cricket::BaseChannel* ch) { | 260 cricket::TransportChannel* rtp_transport_channel(cricket::BaseChannel* ch) { |
262 if (!ch) { | 261 if (!ch) { |
263 return nullptr; | 262 return nullptr; |
264 } | 263 } |
265 return ch->transport_channel(); | 264 return ch->transport_channel(); |
266 } | 265 } |
(...skipping 3266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3533 TEST_F(WebRtcSessionTest, SetVideoSend) { | 3532 TEST_F(WebRtcSessionTest, SetVideoSend) { |
3534 Init(); | 3533 Init(); |
3535 SendAudioVideoStream1(); | 3534 SendAudioVideoStream1(); |
3536 CreateAndSetRemoteOfferAndLocalAnswer(); | 3535 CreateAndSetRemoteOfferAndLocalAnswer(); |
3537 cricket::FakeVideoMediaChannel* channel = media_engine_->GetVideoChannel(0); | 3536 cricket::FakeVideoMediaChannel* channel = media_engine_->GetVideoChannel(0); |
3538 ASSERT_TRUE(channel != NULL); | 3537 ASSERT_TRUE(channel != NULL); |
3539 ASSERT_EQ(1u, channel->send_streams().size()); | 3538 ASSERT_EQ(1u, channel->send_streams().size()); |
3540 uint32_t send_ssrc = channel->send_streams()[0].first_ssrc(); | 3539 uint32_t send_ssrc = channel->send_streams()[0].first_ssrc(); |
3541 EXPECT_FALSE(channel->IsStreamMuted(send_ssrc)); | 3540 EXPECT_FALSE(channel->IsStreamMuted(send_ssrc)); |
3542 cricket::VideoOptions* options = NULL; | 3541 cricket::VideoOptions* options = NULL; |
3543 session_->SetVideoSend(send_ssrc, false, options); | 3542 session_->SetVideoSend(send_ssrc, false, options, nullptr); |
3544 EXPECT_TRUE(channel->IsStreamMuted(send_ssrc)); | 3543 EXPECT_TRUE(channel->IsStreamMuted(send_ssrc)); |
3545 session_->SetVideoSend(send_ssrc, true, options); | 3544 session_->SetVideoSend(send_ssrc, true, options, nullptr); |
3546 EXPECT_FALSE(channel->IsStreamMuted(send_ssrc)); | 3545 EXPECT_FALSE(channel->IsStreamMuted(send_ssrc)); |
3547 } | 3546 } |
3548 | 3547 |
3549 TEST_F(WebRtcSessionTest, CanNotInsertDtmf) { | 3548 TEST_F(WebRtcSessionTest, CanNotInsertDtmf) { |
3550 TestCanInsertDtmf(false); | 3549 TestCanInsertDtmf(false); |
3551 } | 3550 } |
3552 | 3551 |
3553 TEST_F(WebRtcSessionTest, CanInsertDtmf) { | 3552 TEST_F(WebRtcSessionTest, CanInsertDtmf) { |
3554 TestCanInsertDtmf(true); | 3553 TestCanInsertDtmf(true); |
3555 } | 3554 } |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4416 } | 4415 } |
4417 | 4416 |
4418 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4417 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
4419 // currently fails because upon disconnection and reconnection OnIceComplete is | 4418 // currently fails because upon disconnection and reconnection OnIceComplete is |
4420 // called more than once without returning to IceGatheringGathering. | 4419 // called more than once without returning to IceGatheringGathering. |
4421 | 4420 |
4422 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4421 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
4423 WebRtcSessionTest, | 4422 WebRtcSessionTest, |
4424 testing::Values(ALREADY_GENERATED, | 4423 testing::Values(ALREADY_GENERATED, |
4425 DTLS_IDENTITY_STORE)); | 4424 DTLS_IDENTITY_STORE)); |
OLD | NEW |