| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 |
| 11 #include "webrtc/modules/audio_coding/neteq/nack_tracker.h" | 11 #include "webrtc/modules/audio_coding/neteq/nack_tracker.h" |
| 12 | 12 |
| 13 #include <stdint.h> | 13 #include <stdint.h> |
| 14 | 14 |
| 15 #include <algorithm> | 15 #include <algorithm> |
| 16 #include <memory> | 16 #include <memory> |
| 17 | 17 |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "webrtc/test/gtest.h" |
| 19 #include "webrtc/typedefs.h" | 19 #include "webrtc/typedefs.h" |
| 20 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" | 20 #include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h" |
| 21 | 21 |
| 22 namespace webrtc { | 22 namespace webrtc { |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 const int kNackThreshold = 3; | 25 const int kNackThreshold = 3; |
| 26 const int kSampleRateHz = 16000; | 26 const int kSampleRateHz = 16000; |
| 27 const int kPacketSizeMs = 30; | 27 const int kPacketSizeMs = 30; |
| 28 const uint32_t kTimestampIncrement = 480; // 30 ms. | 28 const uint32_t kTimestampIncrement = 480; // 30 ms. |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 // sequence number: 1, 2, 3, 4, 5 | 474 // sequence number: 1, 2, 3, 4, 5 |
| 475 // time-to-play: 20, 50, 80, 110, 140 | 475 // time-to-play: 20, 50, 80, 110, 140 |
| 476 // | 476 // |
| 477 std::vector<uint16_t> nack_list = nack->GetNackList(100); | 477 std::vector<uint16_t> nack_list = nack->GetNackList(100); |
| 478 ASSERT_EQ(2u, nack_list.size()); | 478 ASSERT_EQ(2u, nack_list.size()); |
| 479 EXPECT_EQ(4, nack_list[0]); | 479 EXPECT_EQ(4, nack_list[0]); |
| 480 EXPECT_EQ(5, nack_list[1]); | 480 EXPECT_EQ(5, nack_list[1]); |
| 481 } | 481 } |
| 482 | 482 |
| 483 } // namespace webrtc | 483 } // namespace webrtc |
| OLD | NEW |