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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // |num_channels_|, |sample_rate_hz_|, |samples_per_channel_|, and | 150 // |num_channels_|, |sample_rate_hz_|, |samples_per_channel_|, and |
151 // |vad_activity_| are updated upon success. If an error is returned, some | 151 // |vad_activity_| are updated upon success. If an error is returned, some |
152 // fields may not have been updated, or may contain inconsistent values. | 152 // fields may not have been updated, or may contain inconsistent values. |
153 // If muted state is enabled (through Config::enable_muted_state), |muted| | 153 // If muted state is enabled (through Config::enable_muted_state), |muted| |
154 // may be set to true after a prolonged expand period. When this happens, the | 154 // may be set to true after a prolonged expand period. When this happens, the |
155 // |data_| in |audio_frame| is not written, but should be interpreted as being | 155 // |data_| in |audio_frame| is not written, but should be interpreted as being |
156 // all zeros. | 156 // all zeros. |
157 // Returns kOK on success, or kFail in case of an error. | 157 // Returns kOK on success, or kFail in case of an error. |
158 virtual int GetAudio(AudioFrame* audio_frame, bool* muted) = 0; | 158 virtual int GetAudio(AudioFrame* audio_frame, bool* muted) = 0; |
159 | 159 |
| 160 // Replaces the current set of decoders with the given one. |
| 161 virtual void SetCodecs(const std::map<int, SdpAudioFormat>& codecs) = 0; |
| 162 |
160 // Associates |rtp_payload_type| with |codec| and |codec_name|, and stores the | 163 // Associates |rtp_payload_type| with |codec| and |codec_name|, and stores the |
161 // information in the codec database. Returns 0 on success, -1 on failure. | 164 // information in the codec database. Returns 0 on success, -1 on failure. |
162 // The name is only used to provide information back to the caller about the | 165 // The name is only used to provide information back to the caller about the |
163 // decoders. Hence, the name is arbitrary, and may be empty. | 166 // decoders. Hence, the name is arbitrary, and may be empty. |
164 virtual int RegisterPayloadType(NetEqDecoder codec, | 167 virtual int RegisterPayloadType(NetEqDecoder codec, |
165 const std::string& codec_name, | 168 const std::string& codec_name, |
166 uint8_t rtp_payload_type) = 0; | 169 uint8_t rtp_payload_type) = 0; |
167 | 170 |
168 // Provides an externally created decoder object |decoder| to insert in the | 171 // Provides an externally created decoder object |decoder| to insert in the |
169 // decoder database. The decoder implements a decoder of type |codec| and | 172 // decoder database. The decoder implements a decoder of type |codec| and |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 305 |
303 protected: | 306 protected: |
304 NetEq() {} | 307 NetEq() {} |
305 | 308 |
306 private: | 309 private: |
307 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); | 310 RTC_DISALLOW_COPY_AND_ASSIGN(NetEq); |
308 }; | 311 }; |
309 | 312 |
310 } // namespace webrtc | 313 } // namespace webrtc |
311 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ | 314 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INCLUDE_NETEQ_H_ |
OLD | NEW |