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_FIX_INTERFACE_AUDIO_ENCODER_ISAC
FIX_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INTERFACE_AUDIO_ENCODER_ISAC
FIX_H_ |
12 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INTERFACE_AUDIO_ENCODER_ISAC
FIX_H_ | 12 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INTERFACE_AUDIO_ENCODER_ISAC
FIX_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/fix/interface/isacfix.h" | 17 #include "webrtc/modules/audio_coding/codecs/isac/fix/interface/isacfix.h" |
19 | 18 |
20 namespace webrtc { | 19 namespace webrtc { |
21 | 20 |
22 struct IsacFix { | 21 struct IsacFix { |
23 typedef ISACFIX_MainStruct instance_type; | 22 typedef ISACFIX_MainStruct instance_type; |
24 static const bool has_swb = false; | 23 static const bool has_swb = false; |
25 static const uint16_t kFixSampleRate = 16000; | 24 static const uint16_t kFixSampleRate = 16000; |
26 static inline int16_t Control(instance_type* inst, | 25 static inline int16_t Control(instance_type* inst, |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 return WebRtcIsacfix_SetMaxPayloadSize(inst, max_payload_size_bytes); | 115 return WebRtcIsacfix_SetMaxPayloadSize(inst, max_payload_size_bytes); |
117 } | 116 } |
118 static inline int16_t SetMaxRate(instance_type* inst, int32_t max_bit_rate) { | 117 static inline int16_t SetMaxRate(instance_type* inst, int32_t max_bit_rate) { |
119 return WebRtcIsacfix_SetMaxRate(inst, max_bit_rate); | 118 return WebRtcIsacfix_SetMaxRate(inst, max_bit_rate); |
120 } | 119 } |
121 }; | 120 }; |
122 | 121 |
123 using AudioEncoderIsacFix = AudioEncoderIsacT<IsacFix>; | 122 using AudioEncoderIsacFix = AudioEncoderIsacT<IsacFix>; |
124 using AudioDecoderIsacFix = AudioDecoderIsacT<IsacFix>; | 123 using AudioDecoderIsacFix = AudioDecoderIsacT<IsacFix>; |
125 | 124 |
126 struct CodecInst; | |
127 | |
128 class AudioEncoderMutableIsacFix | |
129 : public AudioEncoderMutableImpl<AudioEncoderIsacFix> { | |
130 public: | |
131 explicit AudioEncoderMutableIsacFix(const CodecInst& codec_inst, | |
132 LockedIsacBandwidthInfo* bwinfo); | |
133 void SetMaxPayloadSize(int max_payload_size_bytes) override; | |
134 void SetMaxRate(int max_rate_bps) override; | |
135 }; | |
136 | |
137 } // namespace webrtc | 125 } // namespace webrtc |
138 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INTERFACE_AUDIO_ENCODER_I
SACFIX_H_ | 126 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INTERFACE_AUDIO_ENCODER_I
SACFIX_H_ |
OLD | NEW |