OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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/tools/encode_neteq_input.h" | 11 #include "webrtc/modules/audio_coding/neteq/tools/encode_neteq_input.h" |
12 | 12 |
13 #include <utility> | 13 #include <utility> |
14 | 14 |
15 #include "webrtc/rtc_base/checks.h" | 15 #include "webrtc/base/checks.h" |
16 #include "webrtc/rtc_base/safe_conversions.h" | 16 #include "webrtc/base/safe_conversions.h" |
17 | 17 |
18 namespace webrtc { | 18 namespace webrtc { |
19 namespace test { | 19 namespace test { |
20 | 20 |
21 EncodeNetEqInput::EncodeNetEqInput(std::unique_ptr<Generator> generator, | 21 EncodeNetEqInput::EncodeNetEqInput(std::unique_ptr<Generator> generator, |
22 std::unique_ptr<AudioEncoder> encoder, | 22 std::unique_ptr<AudioEncoder> encoder, |
23 int64_t input_duration_ms) | 23 int64_t input_duration_ms) |
24 : generator_(std::move(generator)), | 24 : generator_(std::move(generator)), |
25 encoder_(std::move(encoder)), | 25 encoder_(std::move(encoder)), |
26 input_duration_ms_(input_duration_ms) { | 26 input_duration_ms_(input_duration_ms) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 } | 79 } |
80 packet_data_->header.timestamp = info.encoded_timestamp; | 80 packet_data_->header.timestamp = info.encoded_timestamp; |
81 packet_data_->header.payloadType = info.payload_type; | 81 packet_data_->header.payloadType = info.payload_type; |
82 packet_data_->header.sequenceNumber = sequence_number_++; | 82 packet_data_->header.sequenceNumber = sequence_number_++; |
83 packet_data_->time_ms = next_packet_time_ms_; | 83 packet_data_->time_ms = next_packet_time_ms_; |
84 next_packet_time_ms_ += num_blocks * kOutputPeriodMs; | 84 next_packet_time_ms_ += num_blocks * kOutputPeriodMs; |
85 } | 85 } |
86 | 86 |
87 } // namespace test | 87 } // namespace test |
88 } // namespace webrtc | 88 } // namespace webrtc |
OLD | NEW |