OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 3420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3431 // This will trigger SetSink(NULL) if no OnClose() callback. | 3431 // This will trigger SetSink(NULL) if no OnClose() callback. |
3432 session_->SetAudioSend(send_ssrc, true, options, NULL); | 3432 session_->SetAudioSend(send_ssrc, true, options, NULL); |
3433 } | 3433 } |
3434 | 3434 |
3435 TEST_F(WebRtcSessionTest, SetVideoPlayout) { | 3435 TEST_F(WebRtcSessionTest, SetVideoPlayout) { |
3436 Init(); | 3436 Init(); |
3437 SendAudioVideoStream1(); | 3437 SendAudioVideoStream1(); |
3438 CreateAndSetRemoteOfferAndLocalAnswer(); | 3438 CreateAndSetRemoteOfferAndLocalAnswer(); |
3439 cricket::FakeVideoMediaChannel* channel = media_engine_->GetVideoChannel(0); | 3439 cricket::FakeVideoMediaChannel* channel = media_engine_->GetVideoChannel(0); |
3440 ASSERT_TRUE(channel != NULL); | 3440 ASSERT_TRUE(channel != NULL); |
3441 ASSERT_LT(0u, channel->renderers().size()); | 3441 ASSERT_LT(0u, channel->sinks().size()); |
3442 EXPECT_TRUE(channel->renderers().begin()->second == NULL); | 3442 EXPECT_TRUE(channel->sinks().begin()->second == NULL); |
3443 ASSERT_EQ(1u, channel->recv_streams().size()); | 3443 ASSERT_EQ(1u, channel->recv_streams().size()); |
3444 uint32_t receive_ssrc = channel->recv_streams()[0].first_ssrc(); | 3444 uint32_t receive_ssrc = channel->recv_streams()[0].first_ssrc(); |
3445 cricket::FakeVideoRenderer renderer; | 3445 cricket::FakeVideoRenderer renderer; |
3446 session_->SetVideoPlayout(receive_ssrc, true, &renderer); | 3446 session_->SetVideoPlayout(receive_ssrc, true, &renderer); |
3447 EXPECT_TRUE(channel->renderers().begin()->second == &renderer); | 3447 EXPECT_TRUE(channel->sinks().begin()->second == &renderer); |
3448 session_->SetVideoPlayout(receive_ssrc, false, &renderer); | 3448 session_->SetVideoPlayout(receive_ssrc, false, &renderer); |
3449 EXPECT_TRUE(channel->renderers().begin()->second == NULL); | 3449 EXPECT_TRUE(channel->sinks().begin()->second == NULL); |
3450 } | 3450 } |
3451 | 3451 |
3452 TEST_F(WebRtcSessionTest, SetVideoSend) { | 3452 TEST_F(WebRtcSessionTest, SetVideoSend) { |
3453 Init(); | 3453 Init(); |
3454 SendAudioVideoStream1(); | 3454 SendAudioVideoStream1(); |
3455 CreateAndSetRemoteOfferAndLocalAnswer(); | 3455 CreateAndSetRemoteOfferAndLocalAnswer(); |
3456 cricket::FakeVideoMediaChannel* channel = media_engine_->GetVideoChannel(0); | 3456 cricket::FakeVideoMediaChannel* channel = media_engine_->GetVideoChannel(0); |
3457 ASSERT_TRUE(channel != NULL); | 3457 ASSERT_TRUE(channel != NULL); |
3458 ASSERT_EQ(1u, channel->send_streams().size()); | 3458 ASSERT_EQ(1u, channel->send_streams().size()); |
3459 uint32_t send_ssrc = channel->send_streams()[0].first_ssrc(); | 3459 uint32_t send_ssrc = channel->send_streams()[0].first_ssrc(); |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4310 } | 4310 } |
4311 | 4311 |
4312 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4312 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
4313 // currently fails because upon disconnection and reconnection OnIceComplete is | 4313 // currently fails because upon disconnection and reconnection OnIceComplete is |
4314 // called more than once without returning to IceGatheringGathering. | 4314 // called more than once without returning to IceGatheringGathering. |
4315 | 4315 |
4316 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4316 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
4317 WebRtcSessionTest, | 4317 WebRtcSessionTest, |
4318 testing::Values(ALREADY_GENERATED, | 4318 testing::Values(ALREADY_GENERATED, |
4319 DTLS_IDENTITY_STORE)); | 4319 DTLS_IDENTITY_STORE)); |
OLD | NEW |