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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 113 // Associates |rtp_payload_type| with |codec| and stores the information in |
112 // the codec database. Returns kOK on success, kFail on failure. | 114 // the codec database. Returns kOK on success, kFail on failure. |
113 int RegisterPayloadType(NetEqDecoder codec, | 115 int RegisterPayloadType(NetEqDecoder codec, |
114 uint8_t rtp_payload_type) override; | 116 uint8_t rtp_payload_type) override; |
115 | 117 |
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, | 118 int RegisterExternalDecoder(AudioDecoder* decoder, |
121 NetEqDecoder codec, | 119 NetEqDecoder codec, |
| 120 const std::string& codec_name, |
122 uint8_t rtp_payload_type, | 121 uint8_t rtp_payload_type, |
123 int sample_rate_hz) override; | 122 int sample_rate_hz) override; |
124 | 123 |
125 // Removes |rtp_payload_type| from the codec database. Returns 0 on success, | 124 // Removes |rtp_payload_type| from the codec database. Returns 0 on success, |
126 // -1 on failure. | 125 // -1 on failure. |
127 int RemovePayloadType(uint8_t rtp_payload_type) override; | 126 int RemovePayloadType(uint8_t rtp_payload_type) override; |
128 | 127 |
129 bool SetMinimumDelay(int delay_ms) override; | 128 bool SetMinimumDelay(int delay_ms) override; |
130 | 129 |
131 bool SetMaximumDelay(int delay_ms) override; | 130 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_); | 398 bool enable_fast_accelerate_ GUARDED_BY(crit_sect_); |
400 rtc::scoped_ptr<Nack> nack_ GUARDED_BY(crit_sect_); | 399 rtc::scoped_ptr<Nack> nack_ GUARDED_BY(crit_sect_); |
401 bool nack_enabled_ GUARDED_BY(crit_sect_); | 400 bool nack_enabled_ GUARDED_BY(crit_sect_); |
402 | 401 |
403 private: | 402 private: |
404 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); | 403 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); |
405 }; | 404 }; |
406 | 405 |
407 } // namespace webrtc | 406 } // namespace webrtc |
408 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ | 407 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ |
OLD | NEW |