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(...) | |
tlegrand-webrtc
2016/09/22 12:15:42
I don't think this function need to be as general
minyue-webrtc
2016/09/22 15:02:19
This function is very much doing the same as Opus
tlegrand-webrtc
2016/09/23 11:37:41
Acknowledged.
| |
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 this decision and forces the encoder to encode in | |
tlegrand-webrtc
2016/09/22 12:15:42
this -> that
minyue-webrtc
2016/09/22 15:02:19
sure
tlegrand-webrtc
2016/09/23 11:37:41
Or maybe change the comment to
"This function ove
minyue-webrtc
2016/09/26 08:21:23
Done.
| |
204 * 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 a error. | |
208 * | |
209 * Input: | |
210 * - inst : Encoder context | |
211 * - num_channels : 0 - Not forced | |
tlegrand-webrtc
2016/09/22 12:15:42
Why would you call a SetForce-function with the in
minyue-webrtc
2016/09/22 15:02:19
I do not like that name either, but it resembles t
| |
212 * 1 - Mono | |
213 * 2 - Stereo | |
214 * | |
215 * Return value : 0 - Success | |
216 * -1 - Error | |
tlegrand-webrtc
2016/09/22 12:15:42
Maybe we shouldn't return -1, but instead return m
minyue-webrtc
2016/09/22 15:02:19
A problem can be: if the encoder is in stereo mode
tlegrand-webrtc
2016/09/23 11:37:41
Right! Because this is a C-file, so we can't add a
kwiberg-webrtc
2016/09/23 11:40:52
Yes, you can! I made variants of the [D]CHECK macr
minyue-webrtc
2016/09/26 08:21:23
That is good news. We may consider doing a refacto
| |
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 |