| 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/ilbc/include/audio_encoder_ilbc.h" | 11 #include "webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.h" |
| 12 | 12 |
| 13 #include <algorithm> | 13 #include <algorithm> |
| 14 #include <limits> | 14 #include <limits> |
| 15 #include "webrtc/base/checks.h" | 15 #include "webrtc/base/checks.h" |
| 16 #include "webrtc/common_types.h" | 16 #include "webrtc/common_types.h" |
| 17 #include "webrtc/modules/audio_coding/codecs/ilbc/include/ilbc.h" | 17 #include "webrtc/modules/audio_coding/codecs/ilbc/ilbc.h" |
| 18 | 18 |
| 19 namespace webrtc { | 19 namespace webrtc { |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 const int kSampleRateHz = 8000; | 23 const int kSampleRateHz = 8000; |
| 24 | 24 |
| 25 AudioEncoderIlbc::Config CreateConfig(const CodecInst& codec_inst) { | 25 AudioEncoderIlbc::Config CreateConfig(const CodecInst& codec_inst) { |
| 26 AudioEncoderIlbc::Config config; | 26 AudioEncoderIlbc::Config config; |
| 27 config.frame_size_ms = codec_inst.pacsize / 8; | 27 config.frame_size_ms = codec_inst.pacsize / 8; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 switch (num_10ms_frames_per_packet_) { | 144 switch (num_10ms_frames_per_packet_) { |
| 145 case 2: return 38; | 145 case 2: return 38; |
| 146 case 3: return 50; | 146 case 3: return 50; |
| 147 case 4: return 2 * 38; | 147 case 4: return 2 * 38; |
| 148 case 6: return 2 * 50; | 148 case 6: return 2 * 50; |
| 149 default: FATAL(); | 149 default: FATAL(); |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 | 152 |
| 153 } // namespace webrtc | 153 } // namespace webrtc |
| OLD | NEW |