Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Side by Side Diff: webrtc/modules/audio_coding/codecs/isac/main/interface/audio_encoder_isac.h

Issue 1208993010: iSAC: Make separate AudioEncoder and AudioDecoder objects (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: review fixes Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 static inline int16_t SetMaxPayloadSize(instance_type* inst, 112 static inline int16_t SetMaxPayloadSize(instance_type* inst,
113 int16_t max_payload_size_bytes) { 113 int16_t max_payload_size_bytes) {
114 return WebRtcIsac_SetMaxPayloadSize(inst, max_payload_size_bytes); 114 return WebRtcIsac_SetMaxPayloadSize(inst, max_payload_size_bytes);
115 } 115 }
116 static inline int16_t SetMaxRate(instance_type* inst, int32_t max_bit_rate) { 116 static inline int16_t SetMaxRate(instance_type* inst, int32_t max_bit_rate) {
117 return WebRtcIsac_SetMaxRate(inst, max_bit_rate); 117 return WebRtcIsac_SetMaxRate(inst, max_bit_rate);
118 } 118 }
119 }; 119 };
120 120
121 typedef AudioEncoderDecoderIsacT<IsacFloat> AudioEncoderDecoderIsac; 121 using AudioEncoderIsac = AudioEncoderIsacT<IsacFloat>;
122 using AudioDecoderIsac = AudioDecoderIsacT<IsacFloat>;
122 123
123 struct CodecInst; 124 struct CodecInst;
124 125
125 class AudioEncoderDecoderMutableIsacFloat 126 class AudioEncoderMutableIsacFloat
126 : public AudioEncoderMutableImpl<AudioEncoderDecoderIsac, 127 : public AudioEncoderMutableImpl<AudioEncoderIsac> {
127 AudioEncoderDecoderMutableIsac> {
128 public: 128 public:
129 explicit AudioEncoderDecoderMutableIsacFloat(const CodecInst& codec_inst); 129 AudioEncoderMutableIsacFloat(const CodecInst& codec_inst,
130 void UpdateSettings(const CodecInst& codec_inst) override; 130 LockedIsacBandwidthInfo* bwinfo);
131 void SetMaxPayloadSize(int max_payload_size_bytes) override; 131 void SetMaxPayloadSize(int max_payload_size_bytes) override;
132 void SetMaxRate(int max_rate_bps) override; 132 void SetMaxRate(int max_rate_bps) override;
133
134 // From AudioDecoder.
135 int Decode(const uint8_t* encoded,
136 size_t encoded_len,
137 int sample_rate_hz,
138 size_t max_decoded_bytes,
139 int16_t* decoded,
140 SpeechType* speech_type) override;
141 int DecodeRedundant(const uint8_t* encoded,
142 size_t encoded_len,
143 int sample_rate_hz,
144 size_t max_decoded_bytes,
145 int16_t* decoded,
146 SpeechType* speech_type) override;
147 bool HasDecodePlc() const override;
148 int DecodePlc(int num_frames, int16_t* decoded) override;
149 int Init() override;
150 int IncomingPacket(const uint8_t* payload,
151 size_t payload_len,
152 uint16_t rtp_sequence_number,
153 uint32_t rtp_timestamp,
154 uint32_t arrival_timestamp) override;
155 int ErrorCode() override;
156 int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override;
157 int PacketDurationRedundant(const uint8_t* encoded,
158 size_t encoded_len) const override;
159 bool PacketHasFec(const uint8_t* encoded, size_t encoded_len) const override;
160 size_t Channels() const override;
161 }; 133 };
162 134
163 } // namespace webrtc 135 } // namespace webrtc
164 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INTERFACE_AUDIO_ENCODER_ ISAC_H_ 136 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_INTERFACE_AUDIO_ENCODER_ ISAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698