OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 | 216 |
217 EXPECT_CALL(*recv_channel_proxy, DisassociateSendChannel()).Times(1); | 217 EXPECT_CALL(*recv_channel_proxy, DisassociateSendChannel()).Times(1); |
218 call->DestroyAudioReceiveStream(recv_stream); | 218 call->DestroyAudioReceiveStream(recv_stream); |
219 | 219 |
220 call->DestroyAudioSendStream(send_stream); | 220 call->DestroyAudioSendStream(send_stream); |
221 } | 221 } |
222 | 222 |
223 TEST(CallTest, CreateDestroy_FlexfecReceiveStream) { | 223 TEST(CallTest, CreateDestroy_FlexfecReceiveStream) { |
224 CallHelper call; | 224 CallHelper call; |
225 FlexfecReceiveStream::Config config; | 225 FlexfecReceiveStream::Config config; |
226 config.flexfec_payload_type = 118; | 226 config.payload_type = 118; |
227 config.flexfec_ssrc = 38837212; | 227 config.remote_ssrc = 38837212; |
228 config.protected_media_ssrcs = {27273}; | 228 config.protected_media_ssrcs = {27273}; |
229 | 229 |
230 FlexfecReceiveStream* stream = call->CreateFlexfecReceiveStream(config); | 230 FlexfecReceiveStream* stream = call->CreateFlexfecReceiveStream(config); |
231 EXPECT_NE(stream, nullptr); | 231 EXPECT_NE(stream, nullptr); |
232 call->DestroyFlexfecReceiveStream(stream); | 232 call->DestroyFlexfecReceiveStream(stream); |
233 } | 233 } |
234 | 234 |
235 TEST(CallTest, CreateDestroy_FlexfecReceiveStreams) { | 235 TEST(CallTest, CreateDestroy_FlexfecReceiveStreams) { |
236 CallHelper call; | 236 CallHelper call; |
237 FlexfecReceiveStream::Config config; | 237 FlexfecReceiveStream::Config config; |
238 config.flexfec_payload_type = 118; | 238 config.payload_type = 118; |
239 std::list<FlexfecReceiveStream*> streams; | 239 std::list<FlexfecReceiveStream*> streams; |
240 | 240 |
241 for (int i = 0; i < 2; ++i) { | 241 for (int i = 0; i < 2; ++i) { |
242 for (uint32_t ssrc = 0; ssrc < 1234567; ssrc += 34567) { | 242 for (uint32_t ssrc = 0; ssrc < 1234567; ssrc += 34567) { |
243 config.flexfec_ssrc = ssrc; | 243 config.remote_ssrc = ssrc; |
244 config.protected_media_ssrcs = {ssrc + 1}; | 244 config.protected_media_ssrcs = {ssrc + 1}; |
245 FlexfecReceiveStream* stream = call->CreateFlexfecReceiveStream(config); | 245 FlexfecReceiveStream* stream = call->CreateFlexfecReceiveStream(config); |
246 EXPECT_NE(stream, nullptr); | 246 EXPECT_NE(stream, nullptr); |
247 if (ssrc & 1) { | 247 if (ssrc & 1) { |
248 streams.push_back(stream); | 248 streams.push_back(stream); |
249 } else { | 249 } else { |
250 streams.push_front(stream); | 250 streams.push_front(stream); |
251 } | 251 } |
252 } | 252 } |
253 for (auto s : streams) { | 253 for (auto s : streams) { |
254 call->DestroyFlexfecReceiveStream(s); | 254 call->DestroyFlexfecReceiveStream(s); |
255 } | 255 } |
256 streams.clear(); | 256 streams.clear(); |
257 } | 257 } |
258 } | 258 } |
259 | 259 |
260 TEST(CallTest, MultipleFlexfecReceiveStreamsProtectingSingleVideoStream) { | 260 TEST(CallTest, MultipleFlexfecReceiveStreamsProtectingSingleVideoStream) { |
261 CallHelper call; | 261 CallHelper call; |
262 FlexfecReceiveStream::Config config; | 262 FlexfecReceiveStream::Config config; |
263 config.flexfec_payload_type = 118; | 263 config.payload_type = 118; |
264 config.protected_media_ssrcs = {1324234}; | 264 config.protected_media_ssrcs = {1324234}; |
265 FlexfecReceiveStream* stream; | 265 FlexfecReceiveStream* stream; |
266 std::list<FlexfecReceiveStream*> streams; | 266 std::list<FlexfecReceiveStream*> streams; |
267 | 267 |
268 config.flexfec_ssrc = 838383; | 268 config.remote_ssrc = 838383; |
269 stream = call->CreateFlexfecReceiveStream(config); | 269 stream = call->CreateFlexfecReceiveStream(config); |
270 EXPECT_NE(stream, nullptr); | 270 EXPECT_NE(stream, nullptr); |
271 streams.push_back(stream); | 271 streams.push_back(stream); |
272 | 272 |
273 config.flexfec_ssrc = 424993; | 273 config.remote_ssrc = 424993; |
274 stream = call->CreateFlexfecReceiveStream(config); | 274 stream = call->CreateFlexfecReceiveStream(config); |
275 EXPECT_NE(stream, nullptr); | 275 EXPECT_NE(stream, nullptr); |
276 streams.push_back(stream); | 276 streams.push_back(stream); |
277 | 277 |
278 config.flexfec_ssrc = 99383; | 278 config.remote_ssrc = 99383; |
279 stream = call->CreateFlexfecReceiveStream(config); | 279 stream = call->CreateFlexfecReceiveStream(config); |
280 EXPECT_NE(stream, nullptr); | 280 EXPECT_NE(stream, nullptr); |
281 streams.push_back(stream); | 281 streams.push_back(stream); |
282 | 282 |
283 config.flexfec_ssrc = 5548; | 283 config.remote_ssrc = 5548; |
284 stream = call->CreateFlexfecReceiveStream(config); | 284 stream = call->CreateFlexfecReceiveStream(config); |
285 EXPECT_NE(stream, nullptr); | 285 EXPECT_NE(stream, nullptr); |
286 streams.push_back(stream); | 286 streams.push_back(stream); |
287 | 287 |
288 for (auto s : streams) { | 288 for (auto s : streams) { |
289 call->DestroyFlexfecReceiveStream(s); | 289 call->DestroyFlexfecReceiveStream(s); |
290 } | 290 } |
291 } | 291 } |
292 | 292 |
293 } // namespace webrtc | 293 } // namespace webrtc |
OLD | NEW |