| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 } | 113 } |
| 114 static inline int16_t SetMaxPayloadSize(instance_type* inst, | 114 static inline int16_t SetMaxPayloadSize(instance_type* inst, |
| 115 int16_t max_payload_size_bytes) { | 115 int16_t max_payload_size_bytes) { |
| 116 return WebRtcIsacfix_SetMaxPayloadSize(inst, max_payload_size_bytes); | 116 return WebRtcIsacfix_SetMaxPayloadSize(inst, max_payload_size_bytes); |
| 117 } | 117 } |
| 118 static inline int16_t SetMaxRate(instance_type* inst, int32_t max_bit_rate) { | 118 static inline int16_t SetMaxRate(instance_type* inst, int32_t max_bit_rate) { |
| 119 return WebRtcIsacfix_SetMaxRate(inst, max_bit_rate); | 119 return WebRtcIsacfix_SetMaxRate(inst, max_bit_rate); |
| 120 } | 120 } |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 typedef AudioEncoderDecoderIsacT<IsacFix> AudioEncoderDecoderIsacFix; | 123 using AudioEncoderIsacFix = AudioEncoderIsacT<IsacFix>; |
| 124 using AudioDecoderIsacFix = AudioDecoderIsacT<IsacFix>; |
| 124 | 125 |
| 125 struct CodecInst; | 126 struct CodecInst; |
| 126 | 127 |
| 127 class AudioEncoderDecoderMutableIsacFix | 128 class AudioEncoderMutableIsacFix |
| 128 : public AudioEncoderMutableImpl<AudioEncoderDecoderIsacFix, | 129 : public AudioEncoderMutableImpl<AudioEncoderIsacFix> { |
| 129 AudioEncoderDecoderMutableIsac> { | |
| 130 public: | 130 public: |
| 131 explicit AudioEncoderDecoderMutableIsacFix(const CodecInst& codec_inst); | 131 explicit AudioEncoderMutableIsacFix(const CodecInst& codec_inst, |
| 132 void UpdateSettings(const CodecInst& codec_inst) override; | 132 LockedIsacBandwidthInfo* bwinfo); |
| 133 void SetMaxPayloadSize(int max_payload_size_bytes) override; | 133 void SetMaxPayloadSize(int max_payload_size_bytes) override; |
| 134 void SetMaxRate(int max_rate_bps) override; | 134 void SetMaxRate(int max_rate_bps) override; |
| 135 | |
| 136 // From AudioDecoder. | |
| 137 int Decode(const uint8_t* encoded, | |
| 138 size_t encoded_len, | |
| 139 int sample_rate_hz, | |
| 140 size_t max_decoded_bytes, | |
| 141 int16_t* decoded, | |
| 142 SpeechType* speech_type) override; | |
| 143 int DecodeRedundant(const uint8_t* encoded, | |
| 144 size_t encoded_len, | |
| 145 int sample_rate_hz, | |
| 146 size_t max_decoded_bytes, | |
| 147 int16_t* decoded, | |
| 148 SpeechType* speech_type) override; | |
| 149 bool HasDecodePlc() const override; | |
| 150 int DecodePlc(int num_frames, int16_t* decoded) override; | |
| 151 int Init() override; | |
| 152 int IncomingPacket(const uint8_t* payload, | |
| 153 size_t payload_len, | |
| 154 uint16_t rtp_sequence_number, | |
| 155 uint32_t rtp_timestamp, | |
| 156 uint32_t arrival_timestamp) override; | |
| 157 int ErrorCode() override; | |
| 158 int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override; | |
| 159 int PacketDurationRedundant(const uint8_t* encoded, | |
| 160 size_t encoded_len) const override; | |
| 161 bool PacketHasFec(const uint8_t* encoded, size_t encoded_len) const override; | |
| 162 size_t Channels() const override; | |
| 163 }; | 135 }; |
| 164 | 136 |
| 165 } // namespace webrtc | 137 } // namespace webrtc |
| 166 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INTERFACE_AUDIO_ENCODER_I
SACFIX_H_ | 138 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INTERFACE_AUDIO_ENCODER_I
SACFIX_H_ |
| OLD | NEW |