| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 29 matching lines...) Expand all Loading... |
| 40 timestamp_(0), | 40 timestamp_(0), |
| 41 sequence_number_(0) { | 41 sequence_number_(0) { |
| 42 input_frame_.sample_rate_hz_ = source_rate_hz_; | 42 input_frame_.sample_rate_hz_ = source_rate_hz_; |
| 43 input_frame_.num_channels_ = 1; | 43 input_frame_.num_channels_ = 1; |
| 44 input_frame_.samples_per_channel_ = input_block_size_samples_; | 44 input_frame_.samples_per_channel_ = input_block_size_samples_; |
| 45 assert(input_block_size_samples_ * input_frame_.num_channels_ <= | 45 assert(input_block_size_samples_ * input_frame_.num_channels_ <= |
| 46 AudioFrame::kMaxDataSizeSamples); | 46 AudioFrame::kMaxDataSizeSamples); |
| 47 acm_->RegisterTransportCallback(this); | 47 acm_->RegisterTransportCallback(this); |
| 48 } | 48 } |
| 49 | 49 |
| 50 AcmSendTestOldApi::~AcmSendTestOldApi() = default; |
| 51 |
| 50 bool AcmSendTestOldApi::RegisterCodec(const char* payload_name, | 52 bool AcmSendTestOldApi::RegisterCodec(const char* payload_name, |
| 51 int sampling_freq_hz, | 53 int sampling_freq_hz, |
| 52 int channels, | 54 int channels, |
| 53 int payload_type, | 55 int payload_type, |
| 54 int frame_size_samples) { | 56 int frame_size_samples) { |
| 55 CodecInst codec; | 57 CodecInst codec; |
| 56 RTC_CHECK_EQ(0, AudioCodingModule::Codec(payload_name, &codec, | 58 RTC_CHECK_EQ(0, AudioCodingModule::Codec(payload_name, &codec, |
| 57 sampling_freq_hz, channels)); | 59 sampling_freq_hz, channels)); |
| 58 codec.pltype = payload_type; | 60 codec.pltype = payload_type; |
| 59 codec.pacsize = frame_size_samples; | 61 codec.pacsize = frame_size_samples; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 last_payload_vec_.size()); | 151 last_payload_vec_.size()); |
| 150 std::unique_ptr<Packet> packet( | 152 std::unique_ptr<Packet> packet( |
| 151 new Packet(packet_memory, allocated_bytes, clock_.TimeInMilliseconds())); | 153 new Packet(packet_memory, allocated_bytes, clock_.TimeInMilliseconds())); |
| 152 RTC_DCHECK(packet); | 154 RTC_DCHECK(packet); |
| 153 RTC_DCHECK(packet->valid_header()); | 155 RTC_DCHECK(packet->valid_header()); |
| 154 return packet; | 156 return packet; |
| 155 } | 157 } |
| 156 | 158 |
| 157 } // namespace test | 159 } // namespace test |
| 158 } // namespace webrtc | 160 } // namespace webrtc |
| OLD | NEW |