Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1792)

Unified Diff: webrtc/audio/audio_receive_stream_unittest.cc

Issue 2697833002: Replace AudioReceiveStream::DeliverRtp with OnRtpPacket. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/audio/audio_receive_stream_unittest.cc
diff --git a/webrtc/audio/audio_receive_stream_unittest.cc b/webrtc/audio/audio_receive_stream_unittest.cc
index 2f5998c9ffd5ebfaabc574380b0989cb5f363f0a..2932e4e094f912a0bb0611a91f9308ced7c66cc3 100644
--- a/webrtc/audio/audio_receive_stream_unittest.cc
+++ b/webrtc/audio/audio_receive_stream_unittest.cc
@@ -246,13 +246,21 @@ TEST(AudioReceiveStreamTest, ReceiveRtpPacket) {
std::vector<uint8_t> rtp_packet = CreateRtpHeaderWithOneByteExtension(
kTransportSequenceNumberId, kTransportSequenceNumberValue, 2);
PacketTime packet_time(5678000, 0);
+
+ RtpPacketReceived parsed_packet;
+ ASSERT_TRUE(parsed_packet.Parse(&rtp_packet[0], rtp_packet.size()));
+ parsed_packet.set_arrival_time_ms((packet_time.timestamp + 500) / 1000);
+
+ // TODO(nisse): It seems EXPECT_CALL with reference parameters wants
+ // to compare values rather than addresses. And it seems
+ // RtpPacketReceived doesn't have any equality operator.
the sun 2017/02/16 13:47:22 You could add one locally if you want: bool opera
+#if 0
EXPECT_CALL(*helper.channel_proxy(),
- ReceivedRTPPacket(&rtp_packet[0],
- rtp_packet.size(),
- _))
+ ReceivedRTPPacket(parsed_packet))
nisse-webrtc 2017/02/14 13:33:45 I don't understand what to do about this. I'd like
the sun 2017/02/16 13:47:22 ReceivedRtpPacket is copyable, so adding op== shou
nisse-webrtc 2017/02/16 14:35:05 Adding testing::Ref solved the problem. (And then
.WillOnce(Return(true));
- EXPECT_TRUE(
- recv_stream.DeliverRtp(&rtp_packet[0], rtp_packet.size(), packet_time));
+#endif
+
+ recv_stream.OnRtpPacket(parsed_packet);
}
TEST(AudioReceiveStreamTest, ReceiveRtcpPacket) {

Powered by Google App Engine
This is Rietveld 408576698