OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 info.active_streams.push_back(std::make_pair(kSsrc1, 9)); | 116 info.active_streams.push_back(std::make_pair(kSsrc1, 9)); |
117 info.active_streams.push_back(std::make_pair(kSsrc2, 1)); | 117 info.active_streams.push_back(std::make_pair(kSsrc2, 1)); |
118 SignalAudioMonitor(info); | 118 SignalAudioMonitor(info); |
119 | 119 |
120 // We expect no speaker change because of the rapid change. | 120 // We expect no speaker change because of the rapid change. |
121 EXPECT_EQ(current_speaker_, kSsrc2); | 121 EXPECT_EQ(current_speaker_, kSsrc2); |
122 EXPECT_EQ(num_changes_, 1); | 122 EXPECT_EQ(num_changes_, 1); |
123 } | 123 } |
124 | 124 |
125 TEST_F(CurrentSpeakerMonitorTest, SpeakerChange) { | 125 // Flaky on iOS: webrtc:7057. |
| 126 #if defined(WEBRTC_IOS) |
| 127 #define MAYBE_SpeakerChange DISABLED_SpeakerChange |
| 128 #else |
| 129 #define MAYBE_SpeakerChange SpeakerChange |
| 130 #endif |
| 131 TEST_F(CurrentSpeakerMonitorTest, MAYBE_SpeakerChange) { |
126 AudioInfo info; | 132 AudioInfo info; |
127 InitAudioInfo(&info, 0, 0); | 133 InitAudioInfo(&info, 0, 0); |
128 | 134 |
129 info.active_streams.push_back(std::make_pair(kSsrc1, 3)); | 135 info.active_streams.push_back(std::make_pair(kSsrc1, 3)); |
130 info.active_streams.push_back(std::make_pair(kSsrc2, 7)); | 136 info.active_streams.push_back(std::make_pair(kSsrc2, 7)); |
131 SignalAudioMonitor(info); | 137 SignalAudioMonitor(info); |
132 | 138 |
133 EXPECT_EQ(current_speaker_, 0U); | 139 EXPECT_EQ(current_speaker_, 0U); |
134 EXPECT_EQ(num_changes_, 0); | 140 EXPECT_EQ(num_changes_, 0); |
135 | 141 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 info.active_streams.push_back(std::make_pair(kSsrc1, 3)); | 206 info.active_streams.push_back(std::make_pair(kSsrc1, 3)); |
201 info.active_streams.push_back(std::make_pair(kSsrc2, 0)); | 207 info.active_streams.push_back(std::make_pair(kSsrc2, 0)); |
202 SignalAudioMonitor(info); | 208 SignalAudioMonitor(info); |
203 | 209 |
204 // At this point, we should have concluded that SSRC2 stopped speaking. | 210 // At this point, we should have concluded that SSRC2 stopped speaking. |
205 EXPECT_EQ(current_speaker_, kSsrc1); | 211 EXPECT_EQ(current_speaker_, kSsrc1); |
206 EXPECT_EQ(num_changes_, 2); | 212 EXPECT_EQ(num_changes_, 2); |
207 } | 213 } |
208 | 214 |
209 } // namespace cricket | 215 } // namespace cricket |
OLD | NEW |