| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 * | 188 * |
| 189 * Input: | 189 * Input: |
| 190 * - inst : Encoder context | 190 * - inst : Encoder context |
| 191 * - complexity : New target complexity (0-10, inclusive) | 191 * - complexity : New target complexity (0-10, inclusive) |
| 192 * | 192 * |
| 193 * Return value : 0 - Success | 193 * Return value : 0 - Success |
| 194 * -1 - Error | 194 * -1 - Error |
| 195 */ | 195 */ |
| 196 int16_t WebRtcOpus_SetComplexity(OpusEncInst* inst, int32_t complexity); | 196 int16_t WebRtcOpus_SetComplexity(OpusEncInst* inst, int32_t complexity); |
| 197 | 197 |
| 198 /* |
| 199 * WebRtcOpus_SetForceChannels(...) |
| 200 * |
| 201 * If the encoder is initialized as a stereo encoder, Opus will by default |
| 202 * decide whether to encode in mono or stereo based on the bitrate. This |
| 203 * function overrules the previous setting, and forces the encoder to encode |
| 204 * in auto/mono/stereo. |
| 205 * |
| 206 * If the Encoder is initialized as a mono encoder, and one tries to force |
| 207 * stereo, the function will return an error. |
| 208 * |
| 209 * Input: |
| 210 * - inst : Encoder context |
| 211 * - num_channels : 0 - Not forced |
| 212 * 1 - Mono |
| 213 * 2 - Stereo |
| 214 * |
| 215 * Return value : 0 - Success |
| 216 * -1 - Error |
| 217 */ |
| 218 int16_t WebRtcOpus_SetForceChannels(OpusEncInst* inst, int32_t num_channels); |
| 219 |
| 198 int16_t WebRtcOpus_DecoderCreate(OpusDecInst** inst, size_t channels); | 220 int16_t WebRtcOpus_DecoderCreate(OpusDecInst** inst, size_t channels); |
| 199 int16_t WebRtcOpus_DecoderFree(OpusDecInst* inst); | 221 int16_t WebRtcOpus_DecoderFree(OpusDecInst* inst); |
| 200 | 222 |
| 201 /**************************************************************************** | 223 /**************************************************************************** |
| 202 * WebRtcOpus_DecoderChannels(...) | 224 * WebRtcOpus_DecoderChannels(...) |
| 203 * | 225 * |
| 204 * This function returns the number of channels created for Opus decoder. | 226 * This function returns the number of channels created for Opus decoder. |
| 205 */ | 227 */ |
| 206 size_t WebRtcOpus_DecoderChannels(OpusDecInst* inst); | 228 size_t WebRtcOpus_DecoderChannels(OpusDecInst* inst); |
| 207 | 229 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 * 1 - the packet contains FEC. | 362 * 1 - the packet contains FEC. |
| 341 */ | 363 */ |
| 342 int WebRtcOpus_PacketHasFec(const uint8_t* payload, | 364 int WebRtcOpus_PacketHasFec(const uint8_t* payload, |
| 343 size_t payload_length_bytes); | 365 size_t payload_length_bytes); |
| 344 | 366 |
| 345 #ifdef __cplusplus | 367 #ifdef __cplusplus |
| 346 } // extern "C" | 368 } // extern "C" |
| 347 #endif | 369 #endif |
| 348 | 370 |
| 349 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INTERFACE_H_ | 371 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INTERFACE_H_ |
| OLD | NEW |