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

Side by Side Diff: webrtc/modules/audio_coding/neteq/include/neteq.h

Issue 1484343003: NetEq: Add codec name and RTP timestamp rate to DecoderInfo (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 5 years 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // The number of channels that were written to the output is provided in 167 // The number of channels that were written to the output is provided in
168 // the output variable |num_channels|, and each channel contains 168 // the output variable |num_channels|, and each channel contains
169 // |samples_per_channel| elements. If more than one channel is written, 169 // |samples_per_channel| elements. If more than one channel is written,
170 // the samples are interleaved. 170 // the samples are interleaved.
171 // The speech type is written to |type|, if |type| is not NULL. 171 // The speech type is written to |type|, if |type| is not NULL.
172 // Returns kOK on success, or kFail in case of an error. 172 // Returns kOK on success, or kFail in case of an error.
173 virtual int GetAudio(size_t max_length, int16_t* output_audio, 173 virtual int GetAudio(size_t max_length, int16_t* output_audio,
174 size_t* samples_per_channel, int* num_channels, 174 size_t* samples_per_channel, int* num_channels,
175 NetEqOutputType* type) = 0; 175 NetEqOutputType* type) = 0;
176 176
177 // Associates |rtp_payload_type| with |codec| and stores the information in 177 // Associates |rtp_payload_type| with |codec| and |codec_name|, and stores the
178 // the codec database. Returns 0 on success, -1 on failure. 178 // information in the codec database. Returns 0 on success, -1 on failure.
179 // The name is only used to provide information back to the caller about the
180 // decoders. Hence, the name is arbitrary, and may be empty.
179 virtual int RegisterPayloadType(NetEqDecoder codec, 181 virtual int RegisterPayloadType(NetEqDecoder codec,
182 const std::string& codec_name,
180 uint8_t rtp_payload_type) = 0; 183 uint8_t rtp_payload_type) = 0;
181 184
182 // Provides an externally created decoder object |decoder| to insert in the 185 // Provides an externally created decoder object |decoder| to insert in the
183 // decoder database. The decoder implements a decoder of type |codec| and 186 // decoder database. The decoder implements a decoder of type |codec| and
184 // associates it with |rtp_payload_type|. The decoder will produce samples 187 // associates it with |rtp_payload_type| and |codec_name|. The decoder will
185 // at the rate |sample_rate_hz|. Returns kOK on success, kFail on failure. 188 // produce samples at the rate |sample_rate_hz|. Returns kOK on success, kFail
189 // on failure.
190 // The name is only used to provide information back to the caller about the
191 // decoders. Hence, the name is arbitrary, and may be empty.
186 virtual int RegisterExternalDecoder(AudioDecoder* decoder, 192 virtual int RegisterExternalDecoder(AudioDecoder* decoder,
187 NetEqDecoder codec, 193 NetEqDecoder codec,
194 const std::string& codec_name,
188 uint8_t rtp_payload_type, 195 uint8_t rtp_payload_type,
189 int sample_rate_hz) = 0; 196 int sample_rate_hz) = 0;
190 197
191 // Removes |rtp_payload_type| from the codec database. Returns 0 on success, 198 // Removes |rtp_payload_type| from the codec database. Returns 0 on success,
192 // -1 on failure. 199 // -1 on failure.
193 virtual int RemovePayloadType(uint8_t rtp_payload_type) = 0; 200 virtual int RemovePayloadType(uint8_t rtp_payload_type) = 0;
194 201
195 // Sets a minimum delay in millisecond for packet buffer. The minimum is 202 // Sets a minimum delay in millisecond for packet buffer. The minimum is
196 // maintained unless a higher latency is dictated by channel condition. 203 // maintained unless a higher latency is dictated by channel condition.
197 // Returns true if the minimum is successfully applied, otherwise false is 204 // Returns true if the minimum is successfully applied, otherwise false is
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 299
293 protected: 300 protected:
294 NetEq() {} 301 NetEq() {}
295 302
296 private: 303 private:
297 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); 304 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq);
298 }; 305 };
299 306
300 } // namespace webrtc 307 } // namespace webrtc
301 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ 308 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698