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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // |output_audio|, which can hold (at least) |max_length| elements. | 100 // |output_audio|, which can hold (at least) |max_length| elements. |
101 // The number of channels that were written to the output is provided in | 101 // The number of channels that were written to the output is provided in |
102 // the output variable |num_channels|, and each channel contains | 102 // the output variable |num_channels|, and each channel contains |
103 // |samples_per_channel| elements. If more than one channel is written, | 103 // |samples_per_channel| elements. If more than one channel is written, |
104 // the samples are interleaved. | 104 // the samples are interleaved. |
105 // The speech type is written to |type|, if |type| is not NULL. | 105 // The speech type is written to |type|, if |type| is not NULL. |
106 // Returns kOK on success, or kFail in case of an error. | 106 // Returns kOK on success, or kFail in case of an error. |
107 int GetAudio(size_t max_length, | 107 int GetAudio(size_t max_length, |
108 int16_t* output_audio, | 108 int16_t* output_audio, |
109 size_t* samples_per_channel, | 109 size_t* samples_per_channel, |
110 int* num_channels, | 110 size_t* num_channels, |
111 NetEqOutputType* type) override; | 111 NetEqOutputType* type) override; |
112 | 112 |
113 int RegisterPayloadType(NetEqDecoder codec, | 113 int RegisterPayloadType(NetEqDecoder codec, |
114 const std::string& codec_name, | 114 const std::string& codec_name, |
115 uint8_t rtp_payload_type) override; | 115 uint8_t rtp_payload_type) override; |
116 | 116 |
117 int RegisterExternalDecoder(AudioDecoder* decoder, | 117 int RegisterExternalDecoder(AudioDecoder* decoder, |
118 NetEqDecoder codec, | 118 NetEqDecoder codec, |
119 const std::string& codec_name, | 119 const std::string& codec_name, |
120 uint8_t rtp_payload_type, | 120 uint8_t rtp_payload_type, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 // Delivers 10 ms of audio data. The data is written to |output|, which can | 214 // Delivers 10 ms of audio data. The data is written to |output|, which can |
215 // hold (at least) |max_length| elements. The number of channels that were | 215 // hold (at least) |max_length| elements. The number of channels that were |
216 // written to the output is provided in the output variable |num_channels|, | 216 // written to the output is provided in the output variable |num_channels|, |
217 // and each channel contains |samples_per_channel| elements. If more than one | 217 // and each channel contains |samples_per_channel| elements. If more than one |
218 // channel is written, the samples are interleaved. | 218 // channel is written, the samples are interleaved. |
219 // Returns 0 on success, otherwise an error code. | 219 // Returns 0 on success, otherwise an error code. |
220 int GetAudioInternal(size_t max_length, | 220 int GetAudioInternal(size_t max_length, |
221 int16_t* output, | 221 int16_t* output, |
222 size_t* samples_per_channel, | 222 size_t* samples_per_channel, |
223 int* num_channels) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 223 size_t* num_channels) |
| 224 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
224 | 225 |
225 // Provides a decision to the GetAudioInternal method. The decision what to | 226 // Provides a decision to the GetAudioInternal method. The decision what to |
226 // do is written to |operation|. Packets to decode are written to | 227 // do is written to |operation|. Packets to decode are written to |
227 // |packet_list|, and a DTMF event to play is written to |dtmf_event|. When | 228 // |packet_list|, and a DTMF event to play is written to |dtmf_event|. When |
228 // DTMF should be played, |play_dtmf| is set to true by the method. | 229 // DTMF should be played, |play_dtmf| is set to true by the method. |
229 // Returns 0 on success, otherwise an error code. | 230 // Returns 0 on success, otherwise an error code. |
230 int GetDecision(Operations* operation, | 231 int GetDecision(Operations* operation, |
231 PacketList* packet_list, | 232 PacketList* packet_list, |
232 DtmfEvent* dtmf_event, | 233 DtmfEvent* dtmf_event, |
233 bool* play_dtmf) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 234 bool* play_dtmf) EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 bool enable_fast_accelerate_ GUARDED_BY(crit_sect_); | 398 bool enable_fast_accelerate_ GUARDED_BY(crit_sect_); |
398 rtc::scoped_ptr<Nack> nack_ GUARDED_BY(crit_sect_); | 399 rtc::scoped_ptr<Nack> nack_ GUARDED_BY(crit_sect_); |
399 bool nack_enabled_ GUARDED_BY(crit_sect_); | 400 bool nack_enabled_ GUARDED_BY(crit_sect_); |
400 | 401 |
401 private: | 402 private: |
402 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); | 403 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); |
403 }; | 404 }; |
404 | 405 |
405 } // namespace webrtc | 406 } // namespace webrtc |
406 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ | 407 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ |
OLD | NEW |