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 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // Method to get the number of calls to the Decode() method of the external | 66 // Method to get the number of calls to the Decode() method of the external |
67 // decoder. | 67 // decoder. |
68 virtual int NumExpectedDecodeCalls(int num_loops) = 0; | 68 virtual int NumExpectedDecodeCalls(int num_loops) = 0; |
69 | 69 |
70 // Method to generate packets and return the send time of the packet. | 70 // Method to generate packets and return the send time of the packet. |
71 int GetNewPacket() { | 71 int GetNewPacket() { |
72 if (!input_file_->Read(frame_size_samples_, input_)) { | 72 if (!input_file_->Read(frame_size_samples_, input_)) { |
73 return -1; | 73 return -1; |
74 } | 74 } |
75 payload_size_bytes_ = WebRtcPcm16b_Encode(input_, frame_size_samples_, | 75 payload_size_bytes_ = WebRtcPcm16b_Encode(input_, frame_size_samples_, |
76 encoded_);; | 76 encoded_); |
77 | 77 |
78 int next_send_time = rtp_generator_->GetRtpHeader( | 78 int next_send_time = rtp_generator_->GetRtpHeader( |
79 kPayloadType, frame_size_samples_, &rtp_header_); | 79 kPayloadType, frame_size_samples_, &rtp_header_); |
80 return next_send_time; | 80 return next_send_time; |
81 } | 81 } |
82 | 82 |
83 // Method to decide packet losses. | 83 // Method to decide packet losses. |
84 virtual bool Lost() { return false; } | 84 virtual bool Lost() { return false; } |
85 | 85 |
86 // Method to calculate packet arrival time. | 86 // Method to calculate packet arrival time. |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 kStartSeqeunceNumber, | 453 kStartSeqeunceNumber, |
454 kStartTimestamp, | 454 kStartTimestamp, |
455 kJumpFromTimestamp, | 455 kJumpFromTimestamp, |
456 kJumpToTimestamp)); | 456 kJumpToTimestamp)); |
457 | 457 |
458 RunTest(130); // Run 130 laps @ 10 ms each in the test loop. | 458 RunTest(130); // Run 130 laps @ 10 ms each in the test loop. |
459 EXPECT_EQ(kRecovered, test_state_); | 459 EXPECT_EQ(kRecovered, test_state_); |
460 } | 460 } |
461 | 461 |
462 } // namespace webrtc | 462 } // namespace webrtc |
OLD | NEW |