| 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 3083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3094 Init(); | 3094 Init(); |
| 3095 mediastream_signaling_.SendAudioVideoStream1(); | 3095 mediastream_signaling_.SendAudioVideoStream1(); |
| 3096 CreateAndSetRemoteOfferAndLocalAnswer(); | 3096 CreateAndSetRemoteOfferAndLocalAnswer(); |
| 3097 cricket::FakeVoiceMediaChannel* channel = media_engine_->GetVoiceChannel(0); | 3097 cricket::FakeVoiceMediaChannel* channel = media_engine_->GetVoiceChannel(0); |
| 3098 ASSERT_TRUE(channel != NULL); | 3098 ASSERT_TRUE(channel != NULL); |
| 3099 ASSERT_EQ(1u, channel->recv_streams().size()); | 3099 ASSERT_EQ(1u, channel->recv_streams().size()); |
| 3100 uint32_t receive_ssrc = channel->recv_streams()[0].first_ssrc(); | 3100 uint32_t receive_ssrc = channel->recv_streams()[0].first_ssrc(); |
| 3101 double volume; | 3101 double volume; |
| 3102 EXPECT_TRUE(channel->GetOutputVolume(receive_ssrc, &volume)); | 3102 EXPECT_TRUE(channel->GetOutputVolume(receive_ssrc, &volume)); |
| 3103 EXPECT_EQ(1, volume); | 3103 EXPECT_EQ(1, volume); |
| 3104 rtc::scoped_ptr<FakeAudioRenderer> renderer(new FakeAudioRenderer()); | 3104 session_->SetAudioPlayout(receive_ssrc, false); |
| 3105 session_->SetAudioPlayout(receive_ssrc, false, renderer.get()); | |
| 3106 EXPECT_TRUE(channel->GetOutputVolume(receive_ssrc, &volume)); | 3105 EXPECT_TRUE(channel->GetOutputVolume(receive_ssrc, &volume)); |
| 3107 EXPECT_EQ(0, volume); | 3106 EXPECT_EQ(0, volume); |
| 3108 session_->SetAudioPlayout(receive_ssrc, true, NULL); | 3107 session_->SetAudioPlayout(receive_ssrc, true); |
| 3109 EXPECT_TRUE(channel->GetOutputVolume(receive_ssrc, &volume)); | 3108 EXPECT_TRUE(channel->GetOutputVolume(receive_ssrc, &volume)); |
| 3110 EXPECT_EQ(1, volume); | 3109 EXPECT_EQ(1, volume); |
| 3111 } | 3110 } |
| 3112 | 3111 |
| 3113 TEST_F(WebRtcSessionTest, SetAudioSend) { | 3112 TEST_F(WebRtcSessionTest, SetAudioSend) { |
| 3114 Init(); | 3113 Init(); |
| 3115 mediastream_signaling_.SendAudioVideoStream1(); | 3114 mediastream_signaling_.SendAudioVideoStream1(); |
| 3116 CreateAndSetRemoteOfferAndLocalAnswer(); | 3115 CreateAndSetRemoteOfferAndLocalAnswer(); |
| 3117 cricket::FakeVoiceMediaChannel* channel = media_engine_->GetVoiceChannel(0); | 3116 cricket::FakeVoiceMediaChannel* channel = media_engine_->GetVoiceChannel(0); |
| 3118 ASSERT_TRUE(channel != NULL); | 3117 ASSERT_TRUE(channel != NULL); |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4016 } | 4015 } |
| 4017 | 4016 |
| 4018 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4017 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
| 4019 // currently fails because upon disconnection and reconnection OnIceComplete is | 4018 // currently fails because upon disconnection and reconnection OnIceComplete is |
| 4020 // called more than once without returning to IceGatheringGathering. | 4019 // called more than once without returning to IceGatheringGathering. |
| 4021 | 4020 |
| 4022 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4021 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
| 4023 WebRtcSessionTest, | 4022 WebRtcSessionTest, |
| 4024 testing::Values(ALREADY_GENERATED, | 4023 testing::Values(ALREADY_GENERATED, |
| 4025 DTLS_IDENTITY_STORE)); | 4024 DTLS_IDENTITY_STORE)); |
| OLD | NEW |