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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 kTransportSequenceNumberId, kTransportSequenceNumberValue, 2); | 247 kTransportSequenceNumberId, kTransportSequenceNumberValue, 2); |
248 PacketTime packet_time(5678000, 0); | 248 PacketTime packet_time(5678000, 0); |
249 | 249 |
250 RtpPacketReceived parsed_packet; | 250 RtpPacketReceived parsed_packet; |
251 ASSERT_TRUE(parsed_packet.Parse(&rtp_packet[0], rtp_packet.size())); | 251 ASSERT_TRUE(parsed_packet.Parse(&rtp_packet[0], rtp_packet.size())); |
252 parsed_packet.set_arrival_time_ms((packet_time.timestamp + 500) / 1000); | 252 parsed_packet.set_arrival_time_ms((packet_time.timestamp + 500) / 1000); |
253 | 253 |
254 EXPECT_CALL(*helper.channel_proxy(), | 254 EXPECT_CALL(*helper.channel_proxy(), |
255 OnRtpPacket(testing::Ref(parsed_packet))); | 255 OnRtpPacket(testing::Ref(parsed_packet))); |
256 | 256 |
257 recv_stream.OnRtpPacket(parsed_packet); | 257 recv_stream.OnRtpPacketReceive(&parsed_packet); |
258 } | 258 } |
259 | 259 |
260 TEST(AudioReceiveStreamTest, ReceiveRtcpPacket) { | 260 TEST(AudioReceiveStreamTest, ReceiveRtcpPacket) { |
261 ConfigHelper helper; | 261 ConfigHelper helper; |
262 helper.config().rtp.transport_cc = true; | 262 helper.config().rtp.transport_cc = true; |
263 internal::AudioReceiveStream recv_stream( | 263 internal::AudioReceiveStream recv_stream( |
264 helper.packet_router(), | 264 helper.packet_router(), |
265 helper.config(), helper.audio_state(), helper.event_log()); | 265 helper.config(), helper.audio_state(), helper.event_log()); |
266 | 266 |
267 std::vector<uint8_t> rtcp_packet = CreateRtcpSenderReport(); | 267 std::vector<uint8_t> rtcp_packet = CreateRtcpSenderReport(); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 346 |
347 EXPECT_CALL(helper.voice_engine(), StartPlayout(_)).WillOnce(Return(0)); | 347 EXPECT_CALL(helper.voice_engine(), StartPlayout(_)).WillOnce(Return(0)); |
348 EXPECT_CALL(helper.voice_engine(), StopPlayout(_)); | 348 EXPECT_CALL(helper.voice_engine(), StopPlayout(_)); |
349 EXPECT_CALL(*helper.audio_mixer(), AddSource(&recv_stream)) | 349 EXPECT_CALL(*helper.audio_mixer(), AddSource(&recv_stream)) |
350 .WillOnce(Return(true)); | 350 .WillOnce(Return(true)); |
351 | 351 |
352 recv_stream.Start(); | 352 recv_stream.Start(); |
353 } | 353 } |
354 } // namespace test | 354 } // namespace test |
355 } // namespace webrtc | 355 } // namespace webrtc |
OLD | NEW |