| OLD | NEW |
| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // Associates |rtp_payload_type| with |codec| and |codec_name|, and stores the | 176 // Associates |rtp_payload_type| with |codec| and |codec_name|, and stores the |
| 177 // information in the codec database. Returns 0 on success, -1 on failure. | 177 // information in the codec database. Returns 0 on success, -1 on failure. |
| 178 // The name is only used to provide information back to the caller about the | 178 // The name is only used to provide information back to the caller about the |
| 179 // decoders. Hence, the name is arbitrary, and may be empty. | 179 // decoders. Hence, the name is arbitrary, and may be empty. |
| 180 virtual int RegisterPayloadType(NetEqDecoder codec, | 180 virtual int RegisterPayloadType(NetEqDecoder codec, |
| 181 const std::string& codec_name, | 181 const std::string& codec_name, |
| 182 uint8_t rtp_payload_type) = 0; | 182 uint8_t rtp_payload_type) = 0; |
| 183 | 183 |
| 184 // Provides an externally created decoder object |decoder| to insert in the | 184 // Provides an externally created decoder object |decoder| to insert in the |
| 185 // decoder database. The decoder implements a decoder of type |codec| and | 185 // decoder database. The decoder implements a decoder of type |codec| and |
| 186 // associates it with |rtp_payload_type| and |codec_name|. The decoder will | 186 // associates it with |rtp_payload_type| and |codec_name|. Returns kOK on |
| 187 // produce samples at the rate |sample_rate_hz|. Returns kOK on success, kFail | 187 // success, kFail on failure. The name is only used to provide information |
| 188 // on failure. | 188 // back to the caller about the decoders. Hence, the name is arbitrary, and |
| 189 // The name is only used to provide information back to the caller about the | 189 // may be empty. |
| 190 // decoders. Hence, the name is arbitrary, and may be empty. | |
| 191 virtual int RegisterExternalDecoder(AudioDecoder* decoder, | 190 virtual int RegisterExternalDecoder(AudioDecoder* decoder, |
| 192 NetEqDecoder codec, | 191 NetEqDecoder codec, |
| 193 const std::string& codec_name, | 192 const std::string& codec_name, |
| 194 uint8_t rtp_payload_type, | 193 uint8_t rtp_payload_type) = 0; |
| 195 int sample_rate_hz) = 0; | |
| 196 | 194 |
| 197 // Removes |rtp_payload_type| from the codec database. Returns 0 on success, | 195 // Removes |rtp_payload_type| from the codec database. Returns 0 on success, |
| 198 // -1 on failure. | 196 // -1 on failure. |
| 199 virtual int RemovePayloadType(uint8_t rtp_payload_type) = 0; | 197 virtual int RemovePayloadType(uint8_t rtp_payload_type) = 0; |
| 200 | 198 |
| 201 // Sets a minimum delay in millisecond for packet buffer. The minimum is | 199 // Sets a minimum delay in millisecond for packet buffer. The minimum is |
| 202 // maintained unless a higher latency is dictated by channel condition. | 200 // maintained unless a higher latency is dictated by channel condition. |
| 203 // Returns true if the minimum is successfully applied, otherwise false is | 201 // Returns true if the minimum is successfully applied, otherwise false is |
| 204 // returned. | 202 // returned. |
| 205 virtual bool SetMinimumDelay(int delay_ms) = 0; | 203 virtual bool SetMinimumDelay(int delay_ms) = 0; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 296 |
| 299 protected: | 297 protected: |
| 300 NetEq() {} | 298 NetEq() {} |
| 301 | 299 |
| 302 private: | 300 private: |
| 303 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); | 301 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); |
| 304 }; | 302 }; |
| 305 | 303 |
| 306 } // namespace webrtc | 304 } // namespace webrtc |
| 307 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ | 305 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ |
| OLD | NEW |