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

Unified Diff: webrtc/audio/audio_receive_stream_unittest.cc

Issue 2688473004: RtpPacketReceiver base class and OnRtpPacket, with a pre-parsed RTP packet. (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..5c934dde5e295060018cf622bce6fb93eacf9d86 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.
+#if 0
EXPECT_CALL(*helper.channel_proxy(),
- ReceivedRTPPacket(&rtp_packet[0],
- rtp_packet.size(),
- _))
+ ReceivedRTPPacket(parsed_packet))
.WillOnce(Return(true));
- EXPECT_TRUE(
- recv_stream.DeliverRtp(&rtp_packet[0], rtp_packet.size(), packet_time));
+#endif
+
+ EXPECT_TRUE(recv_stream.OnRtpPacket(parsed_packet));
}
TEST(AudioReceiveStreamTest, ReceiveRtcpPacket) {

Powered by Google App Engine
This is Rietveld 408576698