| 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 |
| 11 #include "webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h" | 11 #include "webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h" |
| 12 | 12 |
| 13 #include <algorithm> | 13 #include <algorithm> |
| 14 #include <limits> | 14 #include <limits> |
| 15 | 15 |
| 16 #include "webrtc/base/checks.h" | |
| 17 #include "webrtc/base/string_to_number.h" | |
| 18 #include "webrtc/common_types.h" | 16 #include "webrtc/common_types.h" |
| 19 #include "webrtc/modules/audio_coding/codecs/g711/g711_interface.h" | 17 #include "webrtc/modules/audio_coding/codecs/g711/g711_interface.h" |
| 18 #include "webrtc/rtc_base/checks.h" |
| 19 #include "webrtc/rtc_base/string_to_number.h" |
| 20 | 20 |
| 21 namespace webrtc { | 21 namespace webrtc { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 template <typename T> | 25 template <typename T> |
| 26 typename T::Config CreateConfig(const CodecInst& codec_inst) { | 26 typename T::Config CreateConfig(const CodecInst& codec_inst) { |
| 27 typename T::Config config; | 27 typename T::Config config; |
| 28 config.frame_size_ms = codec_inst.pacsize / 8; | 28 config.frame_size_ms = codec_inst.pacsize / 8; |
| 29 config.num_channels = codec_inst.channels; | 29 config.num_channels = codec_inst.channels; |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 size_t AudioEncoderPcmU::BytesPerSample() const { | 182 size_t AudioEncoderPcmU::BytesPerSample() const { |
| 183 return 1; | 183 return 1; |
| 184 } | 184 } |
| 185 | 185 |
| 186 AudioEncoder::CodecType AudioEncoderPcmU::GetCodecType() const { | 186 AudioEncoder::CodecType AudioEncoderPcmU::GetCodecType() const { |
| 187 return AudioEncoder::CodecType::kPcmU; | 187 return AudioEncoder::CodecType::kPcmU; |
| 188 } | 188 } |
| 189 | 189 |
| 190 } // namespace webrtc | 190 } // namespace webrtc |
| OLD | NEW |