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

Unified Diff: webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc

Issue 1429943004: AcmReceiver::InsertPacket and NetEq::InsertPacket: Take ArrayView arguments (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix log message Created 5 years, 1 month 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
« no previous file with comments | « webrtc/modules/audio_coding/neteq/include/neteq.h ('k') | webrtc/modules/audio_coding/neteq/neteq_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
diff --git a/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
index 09eb5614fe9d10bd58388c5ab5078ad076a3635a..cf229539624b919c1271862304e19c726894f83d 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
@@ -105,7 +105,8 @@ class NetEqExternalDecoderUnitTest : public test::NetEqExternalDecoderTest {
uint32_t time_now = 0;
for (int k = 0; k < num_loops; ++k) {
while (time_now >= next_arrival_time) {
- InsertPacket(rtp_header_, encoded_, payload_size_bytes_,
+ InsertPacket(rtp_header_, rtc::ArrayView<const uint8_t>(
+ encoded_, payload_size_bytes_),
next_arrival_time);
// Get next input packet.
do {
@@ -124,17 +125,14 @@ class NetEqExternalDecoderUnitTest : public test::NetEqExternalDecoderTest {
}
}
- void InsertPacket(WebRtcRTPHeader rtp_header, const uint8_t* payload,
- size_t payload_size_bytes,
+ void InsertPacket(WebRtcRTPHeader rtp_header,
+ rtc::ArrayView<const uint8_t> payload,
uint32_t receive_timestamp) override {
- EXPECT_CALL(*external_decoder_,
- IncomingPacket(_,
- payload_size_bytes,
- rtp_header.header.sequenceNumber,
- rtp_header.header.timestamp,
- receive_timestamp));
+ EXPECT_CALL(
+ *external_decoder_,
+ IncomingPacket(_, payload.size(), rtp_header.header.sequenceNumber,
+ rtp_header.header.timestamp, receive_timestamp));
NetEqExternalDecoderTest::InsertPacket(rtp_header, payload,
- payload_size_bytes,
receive_timestamp);
}
@@ -210,18 +208,15 @@ class NetEqExternalVsInternalDecoderTest : public NetEqExternalDecoderUnitTest,
}
}
- void InsertPacket(WebRtcRTPHeader rtp_header, const uint8_t* payload,
- size_t payload_size_bytes,
+ void InsertPacket(WebRtcRTPHeader rtp_header,
+ rtc::ArrayView<const uint8_t> payload,
uint32_t receive_timestamp) override {
// Insert packet in internal decoder.
- ASSERT_EQ(
- NetEq::kOK,
- neteq_internal_->InsertPacket(
- rtp_header, payload, payload_size_bytes, receive_timestamp));
+ ASSERT_EQ(NetEq::kOK, neteq_internal_->InsertPacket(rtp_header, payload,
+ receive_timestamp));
// Insert packet in external decoder instance.
NetEqExternalDecoderUnitTest::InsertPacket(rtp_header, payload,
- payload_size_bytes,
receive_timestamp);
}
« no previous file with comments | « webrtc/modules/audio_coding/neteq/include/neteq.h ('k') | webrtc/modules/audio_coding/neteq/neteq_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698