| 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 27 matching lines...) Expand all Loading... |
| 38 uint16_t speech_expand_rate; // Fraction (of original stream) of synthesized | 38 uint16_t speech_expand_rate; // Fraction (of original stream) of synthesized |
| 39 // speech inserted through expansion (in Q14). | 39 // speech inserted through expansion (in Q14). |
| 40 uint16_t preemptive_rate; // Fraction of data inserted through pre-emptive | 40 uint16_t preemptive_rate; // Fraction of data inserted through pre-emptive |
| 41 // expansion (in Q14). | 41 // expansion (in Q14). |
| 42 uint16_t accelerate_rate; // Fraction of data removed through acceleration | 42 uint16_t accelerate_rate; // Fraction of data removed through acceleration |
| 43 // (in Q14). | 43 // (in Q14). |
| 44 uint16_t secondary_decoded_rate; // Fraction of data coming from secondary | 44 uint16_t secondary_decoded_rate; // Fraction of data coming from secondary |
| 45 // decoding (in Q14). | 45 // decoding (in Q14). |
| 46 int32_t clockdrift_ppm; // Average clock-drift in parts-per-million | 46 int32_t clockdrift_ppm; // Average clock-drift in parts-per-million |
| 47 // (positive or negative). | 47 // (positive or negative). |
| 48 int added_zero_samples; // Number of zero samples added in "off" mode. | 48 size_t added_zero_samples; // Number of zero samples added in "off" mode. |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 enum NetEqOutputType { | 51 enum NetEqOutputType { |
| 52 kOutputNormal, | 52 kOutputNormal, |
| 53 kOutputPLC, | 53 kOutputPLC, |
| 54 kOutputCNG, | 54 kOutputCNG, |
| 55 kOutputPLCtoCNG, | 55 kOutputPLCtoCNG, |
| 56 kOutputVADPassive | 56 kOutputVADPassive |
| 57 }; | 57 }; |
| 58 | 58 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 80 // |max_delay_ms| has the same effect as calling SetMaximumDelay(). | 80 // |max_delay_ms| has the same effect as calling SetMaximumDelay(). |
| 81 max_delay_ms(2000), | 81 max_delay_ms(2000), |
| 82 background_noise_mode(kBgnOff), | 82 background_noise_mode(kBgnOff), |
| 83 playout_mode(kPlayoutOn), | 83 playout_mode(kPlayoutOn), |
| 84 enable_fast_accelerate(false) {} | 84 enable_fast_accelerate(false) {} |
| 85 | 85 |
| 86 std::string ToString() const; | 86 std::string ToString() const; |
| 87 | 87 |
| 88 int sample_rate_hz; // Initial value. Will change with input data. | 88 int sample_rate_hz; // Initial value. Will change with input data. |
| 89 bool enable_audio_classifier; | 89 bool enable_audio_classifier; |
| 90 int max_packets_in_buffer; | 90 size_t max_packets_in_buffer; |
| 91 int max_delay_ms; | 91 int max_delay_ms; |
| 92 BackgroundNoiseMode background_noise_mode; | 92 BackgroundNoiseMode background_noise_mode; |
| 93 NetEqPlayoutMode playout_mode; | 93 NetEqPlayoutMode playout_mode; |
| 94 bool enable_fast_accelerate; | 94 bool enable_fast_accelerate; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 enum ReturnCodes { | 97 enum ReturnCodes { |
| 98 kOK = 0, | 98 kOK = 0, |
| 99 kFail = -1, | 99 kFail = -1, |
| 100 kNotImplemented = -2 | 100 kNotImplemented = -2 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 // Instructs NetEq to deliver 10 ms of audio data. The data is written to | 159 // Instructs NetEq to deliver 10 ms of audio data. The data is written to |
| 160 // |output_audio|, which can hold (at least) |max_length| elements. | 160 // |output_audio|, which can hold (at least) |max_length| elements. |
| 161 // The number of channels that were written to the output is provided in | 161 // The number of channels that were written to the output is provided in |
| 162 // the output variable |num_channels|, and each channel contains | 162 // the output variable |num_channels|, and each channel contains |
| 163 // |samples_per_channel| elements. If more than one channel is written, | 163 // |samples_per_channel| elements. If more than one channel is written, |
| 164 // the samples are interleaved. | 164 // the samples are interleaved. |
| 165 // The speech type is written to |type|, if |type| is not NULL. | 165 // The speech type is written to |type|, if |type| is not NULL. |
| 166 // Returns kOK on success, or kFail in case of an error. | 166 // Returns kOK on success, or kFail in case of an error. |
| 167 virtual int GetAudio(size_t max_length, int16_t* output_audio, | 167 virtual int GetAudio(size_t max_length, int16_t* output_audio, |
| 168 int* samples_per_channel, int* num_channels, | 168 size_t* samples_per_channel, int* num_channels, |
| 169 NetEqOutputType* type) = 0; | 169 NetEqOutputType* type) = 0; |
| 170 | 170 |
| 171 // Associates |rtp_payload_type| with |codec| and stores the information in | 171 // Associates |rtp_payload_type| with |codec| and stores the information in |
| 172 // the codec database. Returns 0 on success, -1 on failure. | 172 // the codec database. Returns 0 on success, -1 on failure. |
| 173 virtual int RegisterPayloadType(enum NetEqDecoder codec, | 173 virtual int RegisterPayloadType(enum NetEqDecoder codec, |
| 174 uint8_t rtp_payload_type) = 0; | 174 uint8_t rtp_payload_type) = 0; |
| 175 | 175 |
| 176 // Provides an externally created decoder object |decoder| to insert in the | 176 // Provides an externally created decoder object |decoder| to insert in the |
| 177 // decoder database. The decoder implements a decoder of type |codec| and | 177 // decoder database. The decoder implements a decoder of type |codec| and |
| 178 // associates it with |rtp_payload_type|. The decoder will produce samples | 178 // associates it with |rtp_payload_type|. The decoder will produce samples |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 279 |
| 280 protected: | 280 protected: |
| 281 NetEq() {} | 281 NetEq() {} |
| 282 | 282 |
| 283 private: | 283 private: |
| 284 DISALLOW_COPY_AND_ASSIGN(NetEq); | 284 DISALLOW_COPY_AND_ASSIGN(NetEq); |
| 285 }; | 285 }; |
| 286 | 286 |
| 287 } // namespace webrtc | 287 } // namespace webrtc |
| 288 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INTERFACE_NETEQ_H_ | 288 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INTERFACE_NETEQ_H_ |
| OLD | NEW |