| 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 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INTERFACE_AUDIO_ENCODER_ISA
C_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INTERFACE_AUDIO_ENCODER_ISA
C_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INTERFACE_AUDIO_ENCODER_ISA
C_H_ | 12 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INTERFACE_AUDIO_ENCODER_ISA
C_H_ |
| 13 | 13 |
| 14 #include "webrtc/base/checks.h" | 14 #include "webrtc/base/checks.h" |
| 15 #include "webrtc/base/scoped_ptr.h" | 15 #include "webrtc/base/scoped_ptr.h" |
| 16 #include "webrtc/modules/audio_coding/codecs/audio_encoder_mutable_impl.h" | |
| 17 #include "webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h" | 16 #include "webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h" |
| 18 #include "webrtc/modules/audio_coding/codecs/isac/main/interface/isac.h" | 17 #include "webrtc/modules/audio_coding/codecs/isac/main/interface/isac.h" |
| 19 | 18 |
| 20 namespace webrtc { | 19 namespace webrtc { |
| 21 | 20 |
| 22 struct IsacFloat { | 21 struct IsacFloat { |
| 23 typedef ISACStruct instance_type; | 22 typedef ISACStruct instance_type; |
| 24 static const bool has_swb = true; | 23 static const bool has_swb = true; |
| 25 static inline int16_t Control(instance_type* inst, | 24 static inline int16_t Control(instance_type* inst, |
| 26 int32_t rate, | 25 int32_t rate, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 return WebRtcIsac_SetMaxPayloadSize(inst, max_payload_size_bytes); | 113 return WebRtcIsac_SetMaxPayloadSize(inst, max_payload_size_bytes); |
| 115 } | 114 } |
| 116 static inline int16_t SetMaxRate(instance_type* inst, int32_t max_bit_rate) { | 115 static inline int16_t SetMaxRate(instance_type* inst, int32_t max_bit_rate) { |
| 117 return WebRtcIsac_SetMaxRate(inst, max_bit_rate); | 116 return WebRtcIsac_SetMaxRate(inst, max_bit_rate); |
| 118 } | 117 } |
| 119 }; | 118 }; |
| 120 | 119 |
| 121 using AudioEncoderIsac = AudioEncoderIsacT<IsacFloat>; | 120 using AudioEncoderIsac = AudioEncoderIsacT<IsacFloat>; |
| 122 using AudioDecoderIsac = AudioDecoderIsacT<IsacFloat>; | 121 using AudioDecoderIsac = AudioDecoderIsacT<IsacFloat>; |
| 123 | 122 |
| 124 struct CodecInst; | |
| 125 | |
| 126 class AudioEncoderMutableIsacFloat | |
| 127 : public AudioEncoderMutableImpl<AudioEncoderIsac> { | |
| 128 public: | |
| 129 AudioEncoderMutableIsacFloat(const CodecInst& codec_inst, | |
| 130 LockedIsacBandwidthInfo* bwinfo); | |
| 131 void SetMaxPayloadSize(int max_payload_size_bytes) override; | |
| 132 void SetMaxRate(int max_rate_bps) override; | |
| 133 }; | |
| 134 | |
| 135 } // namespace webrtc | 123 } // namespace webrtc |
| 136 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INTERFACE_AUDIO_ENCODER_
ISAC_H_ | 124 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INTERFACE_AUDIO_ENCODER_
ISAC_H_ |
| OLD | NEW |