| 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 |
| 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ | 12 #define WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ |
| 13 | 13 |
| 14 #include <string> |
| 15 |
| 14 #include "webrtc/base/constructormagic.h" | 16 #include "webrtc/base/constructormagic.h" |
| 15 #include "webrtc/base/scoped_ptr.h" | 17 #include "webrtc/base/scoped_ptr.h" |
| 16 #include "webrtc/base/thread_annotations.h" | 18 #include "webrtc/base/thread_annotations.h" |
| 17 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h" | 19 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h" |
| 18 #include "webrtc/modules/audio_coding/neteq/defines.h" | 20 #include "webrtc/modules/audio_coding/neteq/defines.h" |
| 19 #include "webrtc/modules/audio_coding/neteq/include/neteq.h" | 21 #include "webrtc/modules/audio_coding/neteq/include/neteq.h" |
| 20 #include "webrtc/modules/audio_coding/neteq/packet.h" // Declare PacketList. | 22 #include "webrtc/modules/audio_coding/neteq/packet.h" // Declare PacketList. |
| 21 #include "webrtc/modules/audio_coding/neteq/random_vector.h" | 23 #include "webrtc/modules/audio_coding/neteq/random_vector.h" |
| 22 #include "webrtc/modules/audio_coding/neteq/rtcp.h" | 24 #include "webrtc/modules/audio_coding/neteq/rtcp.h" |
| 23 #include "webrtc/modules/audio_coding/neteq/statistics_calculator.h" | 25 #include "webrtc/modules/audio_coding/neteq/statistics_calculator.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // |samples_per_channel| elements. If more than one channel is written, | 103 // |samples_per_channel| elements. If more than one channel is written, |
| 102 // the samples are interleaved. | 104 // the samples are interleaved. |
| 103 // 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. |
| 104 // Returns kOK on success, or kFail in case of an error. | 106 // Returns kOK on success, or kFail in case of an error. |
| 105 int GetAudio(size_t max_length, | 107 int GetAudio(size_t max_length, |
| 106 int16_t* output_audio, | 108 int16_t* output_audio, |
| 107 size_t* samples_per_channel, | 109 size_t* samples_per_channel, |
| 108 int* num_channels, | 110 int* num_channels, |
| 109 NetEqOutputType* type) override; | 111 NetEqOutputType* type) override; |
| 110 | 112 |
| 111 // Associates |rtp_payload_type| with |codec| and stores the information in | |
| 112 // the codec database. Returns kOK on success, kFail on failure. | |
| 113 int RegisterPayloadType(NetEqDecoder codec, | 113 int RegisterPayloadType(NetEqDecoder codec, |
| 114 const std::string& codec_name, |
| 114 uint8_t rtp_payload_type) override; | 115 uint8_t rtp_payload_type) override; |
| 115 | 116 |
| 116 // Provides an externally created decoder object |decoder| to insert in the | |
| 117 // decoder database. The decoder implements a decoder of type |codec| and | |
| 118 // associates it with |rtp_payload_type|. The decoder will produce samples | |
| 119 // at the rate |sample_rate_hz|. Returns kOK on success, kFail on failure. | |
| 120 int RegisterExternalDecoder(AudioDecoder* decoder, | 117 int RegisterExternalDecoder(AudioDecoder* decoder, |
| 121 NetEqDecoder codec, | 118 NetEqDecoder codec, |
| 119 const std::string& codec_name, |
| 122 uint8_t rtp_payload_type, | 120 uint8_t rtp_payload_type, |
| 123 int sample_rate_hz) override; | 121 int sample_rate_hz) override; |
| 124 | 122 |
| 125 // Removes |rtp_payload_type| from the codec database. Returns 0 on success, | 123 // Removes |rtp_payload_type| from the codec database. Returns 0 on success, |
| 126 // -1 on failure. | 124 // -1 on failure. |
| 127 int RemovePayloadType(uint8_t rtp_payload_type) override; | 125 int RemovePayloadType(uint8_t rtp_payload_type) override; |
| 128 | 126 |
| 129 bool SetMinimumDelay(int delay_ms) override; | 127 bool SetMinimumDelay(int delay_ms) override; |
| 130 | 128 |
| 131 bool SetMaximumDelay(int delay_ms) override; | 129 bool SetMaximumDelay(int delay_ms) override; |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 bool enable_fast_accelerate_ GUARDED_BY(crit_sect_); | 397 bool enable_fast_accelerate_ GUARDED_BY(crit_sect_); |
| 400 rtc::scoped_ptr<Nack> nack_ GUARDED_BY(crit_sect_); | 398 rtc::scoped_ptr<Nack> nack_ GUARDED_BY(crit_sect_); |
| 401 bool nack_enabled_ GUARDED_BY(crit_sect_); | 399 bool nack_enabled_ GUARDED_BY(crit_sect_); |
| 402 | 400 |
| 403 private: | 401 private: |
| 404 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); | 402 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); |
| 405 }; | 403 }; |
| 406 | 404 |
| 407 } // namespace webrtc | 405 } // namespace webrtc |
| 408 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ | 406 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ |
| OLD | NEW |