tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame^] | 11 | #ifndef MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INTERFACE_H_ |
| 12 | #define MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INTERFACE_H_ |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 13 | |
Peter Kasting | dce40cf | 2015-08-24 14:52:23 -0700 | [diff] [blame] | 14 | #include <stddef.h> |
| 15 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame^] | 16 | #include "typedefs.h" |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 17 | |
| 18 | #ifdef __cplusplus |
| 19 | extern "C" { |
| 20 | #endif |
| 21 | |
| 22 | // Opaque wrapper types for the codec state. |
| 23 | typedef struct WebRtcOpusEncInst OpusEncInst; |
| 24 | typedef struct WebRtcOpusDecInst OpusDecInst; |
| 25 | |
minyue@webrtc.org | 7dba786 | 2015-01-20 16:01:50 +0000 | [diff] [blame] | 26 | /**************************************************************************** |
| 27 | * WebRtcOpus_EncoderCreate(...) |
| 28 | * |
| 29 | * This function create an Opus encoder. |
| 30 | * |
| 31 | * Input: |
| 32 | * - channels : number of channels. |
| 33 | * - application : 0 - VOIP applications. |
| 34 | * Favor speech intelligibility. |
| 35 | * 1 - Audio applications. |
| 36 | * Favor faithfulness to the original input. |
| 37 | * |
| 38 | * Output: |
| 39 | * - inst : a pointer to Encoder context that is created |
| 40 | * if success. |
| 41 | * |
| 42 | * Return value : 0 - Success |
| 43 | * -1 - Error |
| 44 | */ |
| 45 | int16_t WebRtcOpus_EncoderCreate(OpusEncInst** inst, |
Peter Kasting | 6955870 | 2016-01-12 16:26:35 -0800 | [diff] [blame] | 46 | size_t channels, |
minyue@webrtc.org | 7dba786 | 2015-01-20 16:01:50 +0000 | [diff] [blame] | 47 | int32_t application); |
| 48 | |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 49 | int16_t WebRtcOpus_EncoderFree(OpusEncInst* inst); |
| 50 | |
| 51 | /**************************************************************************** |
| 52 | * WebRtcOpus_Encode(...) |
| 53 | * |
| 54 | * This function encodes audio as a series of Opus frames and inserts |
| 55 | * it into a packet. Input buffer can be any length. |
| 56 | * |
| 57 | * Input: |
| 58 | * - inst : Encoder context |
| 59 | * - audio_in : Input speech data buffer |
minyue@webrtc.org | ecbe0aa | 2013-08-12 06:48:09 +0000 | [diff] [blame] | 60 | * - samples : Samples per channel in audio_in |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 61 | * - length_encoded_buffer : Output buffer size |
| 62 | * |
| 63 | * Output: |
| 64 | * - encoded : Output compressed data buffer |
| 65 | * |
minyue@webrtc.org | 0ca768b | 2014-12-11 16:09:35 +0000 | [diff] [blame] | 66 | * Return value : >=0 - Length (in bytes) of coded data |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 67 | * -1 - Error |
| 68 | */ |
Peter Kasting | bba7807 | 2015-06-11 19:02:46 -0700 | [diff] [blame] | 69 | int WebRtcOpus_Encode(OpusEncInst* inst, |
| 70 | const int16_t* audio_in, |
Peter Kasting | dce40cf | 2015-08-24 14:52:23 -0700 | [diff] [blame] | 71 | size_t samples, |
| 72 | size_t length_encoded_buffer, |
Peter Kasting | bba7807 | 2015-06-11 19:02:46 -0700 | [diff] [blame] | 73 | uint8_t* encoded); |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 74 | |
| 75 | /**************************************************************************** |
| 76 | * WebRtcOpus_SetBitRate(...) |
| 77 | * |
| 78 | * This function adjusts the target bitrate of the encoder. |
| 79 | * |
| 80 | * Input: |
| 81 | * - inst : Encoder context |
| 82 | * - rate : New target bitrate |
| 83 | * |
| 84 | * Return value : 0 - Success |
| 85 | * -1 - Error |
| 86 | */ |
| 87 | int16_t WebRtcOpus_SetBitRate(OpusEncInst* inst, int32_t rate); |
| 88 | |
minyue@webrtc.org | 0454688 | 2014-03-07 08:55:48 +0000 | [diff] [blame] | 89 | /**************************************************************************** |
minyue@webrtc.org | 46509c8 | 2014-03-07 11:49:11 +0000 | [diff] [blame] | 90 | * WebRtcOpus_SetPacketLossRate(...) |
| 91 | * |
| 92 | * This function configures the encoder's expected packet loss percentage. |
| 93 | * |
| 94 | * Input: |
| 95 | * - inst : Encoder context |
| 96 | * - loss_rate : loss percentage in the range 0-100, inclusive. |
| 97 | * Return value : 0 - Success |
| 98 | * -1 - Error |
| 99 | */ |
| 100 | int16_t WebRtcOpus_SetPacketLossRate(OpusEncInst* inst, int32_t loss_rate); |
| 101 | |
minyue@webrtc.org | 0040a6e | 2014-08-04 14:41:57 +0000 | [diff] [blame] | 102 | /**************************************************************************** |
minyue@webrtc.org | adee8f9 | 2014-09-03 12:28:06 +0000 | [diff] [blame] | 103 | * WebRtcOpus_SetMaxPlaybackRate(...) |
minyue@webrtc.org | 0040a6e | 2014-08-04 14:41:57 +0000 | [diff] [blame] | 104 | * |
minyue@webrtc.org | adee8f9 | 2014-09-03 12:28:06 +0000 | [diff] [blame] | 105 | * Configures the maximum playback rate for encoding. Due to hardware |
| 106 | * limitations, the receiver may render audio up to a playback rate. Opus |
| 107 | * encoder can use this information to optimize for network usage and encoding |
| 108 | * complexity. This will affect the audio bandwidth in the coded audio. However, |
| 109 | * the input/output sample rate is not affected. |
minyue@webrtc.org | 0040a6e | 2014-08-04 14:41:57 +0000 | [diff] [blame] | 110 | * |
| 111 | * Input: |
| 112 | * - inst : Encoder context |
minyue@webrtc.org | adee8f9 | 2014-09-03 12:28:06 +0000 | [diff] [blame] | 113 | * - frequency_hz : Maximum playback rate in Hz. |
| 114 | * This parameter can take any value. The relation |
| 115 | * between the value and the Opus internal mode is |
| 116 | * as following: |
| 117 | * frequency_hz <= 8000 narrow band |
| 118 | * 8000 < frequency_hz <= 12000 medium band |
| 119 | * 12000 < frequency_hz <= 16000 wide band |
| 120 | * 16000 < frequency_hz <= 24000 super wide band |
| 121 | * frequency_hz > 24000 full band |
minyue@webrtc.org | 0040a6e | 2014-08-04 14:41:57 +0000 | [diff] [blame] | 122 | * Return value : 0 - Success |
| 123 | * -1 - Error |
| 124 | */ |
minyue@webrtc.org | adee8f9 | 2014-09-03 12:28:06 +0000 | [diff] [blame] | 125 | int16_t WebRtcOpus_SetMaxPlaybackRate(OpusEncInst* inst, int32_t frequency_hz); |
minyue@webrtc.org | 0040a6e | 2014-08-04 14:41:57 +0000 | [diff] [blame] | 126 | |
minyue@webrtc.org | 46509c8 | 2014-03-07 11:49:11 +0000 | [diff] [blame] | 127 | /* TODO(minyue): Check whether an API to check the FEC and the packet loss rate |
| 128 | * is needed. It might not be very useful since there are not many use cases and |
| 129 | * the caller can always maintain the states. */ |
| 130 | |
| 131 | /**************************************************************************** |
| 132 | * WebRtcOpus_EnableFec() |
| 133 | * |
| 134 | * This function enables FEC for encoding. |
| 135 | * |
| 136 | * Input: |
| 137 | * - inst : Encoder context |
| 138 | * |
| 139 | * Return value : 0 - Success |
| 140 | * -1 - Error |
| 141 | */ |
| 142 | int16_t WebRtcOpus_EnableFec(OpusEncInst* inst); |
| 143 | |
| 144 | /**************************************************************************** |
| 145 | * WebRtcOpus_DisableFec() |
| 146 | * |
| 147 | * This function disables FEC for encoding. |
| 148 | * |
| 149 | * Input: |
| 150 | * - inst : Encoder context |
| 151 | * |
| 152 | * Return value : 0 - Success |
| 153 | * -1 - Error |
| 154 | */ |
| 155 | int16_t WebRtcOpus_DisableFec(OpusEncInst* inst); |
| 156 | |
minyue@webrtc.org | 0ca768b | 2014-12-11 16:09:35 +0000 | [diff] [blame] | 157 | /**************************************************************************** |
| 158 | * WebRtcOpus_EnableDtx() |
| 159 | * |
| 160 | * This function enables Opus internal DTX for encoding. |
| 161 | * |
| 162 | * Input: |
| 163 | * - inst : Encoder context |
| 164 | * |
| 165 | * Return value : 0 - Success |
| 166 | * -1 - Error |
| 167 | */ |
| 168 | int16_t WebRtcOpus_EnableDtx(OpusEncInst* inst); |
| 169 | |
| 170 | /**************************************************************************** |
| 171 | * WebRtcOpus_DisableDtx() |
| 172 | * |
| 173 | * This function disables Opus internal DTX for encoding. |
| 174 | * |
| 175 | * Input: |
| 176 | * - inst : Encoder context |
| 177 | * |
| 178 | * Return value : 0 - Success |
| 179 | * -1 - Error |
| 180 | */ |
| 181 | int16_t WebRtcOpus_DisableDtx(OpusEncInst* inst); |
| 182 | |
soren | 28dc285 | 2017-04-06 05:48:36 -0700 | [diff] [blame] | 183 | /**************************************************************************** |
| 184 | * WebRtcOpus_EnableCbr() |
| 185 | * |
| 186 | * This function enables CBR for encoding. |
| 187 | * |
| 188 | * Input: |
| 189 | * - inst : Encoder context |
| 190 | * |
| 191 | * Return value : 0 - Success |
| 192 | * -1 - Error |
| 193 | */ |
| 194 | int16_t WebRtcOpus_EnableCbr(OpusEncInst* inst); |
| 195 | |
| 196 | /**************************************************************************** |
| 197 | * WebRtcOpus_DisableCbr() |
| 198 | * |
| 199 | * This function disables CBR for encoding. |
| 200 | * |
| 201 | * Input: |
| 202 | * - inst : Encoder context |
| 203 | * |
| 204 | * Return value : 0 - Success |
| 205 | * -1 - Error |
| 206 | */ |
| 207 | int16_t WebRtcOpus_DisableCbr(OpusEncInst* inst); |
| 208 | |
minyue@webrtc.org | 46509c8 | 2014-03-07 11:49:11 +0000 | [diff] [blame] | 209 | /* |
minyue@webrtc.org | 0454688 | 2014-03-07 08:55:48 +0000 | [diff] [blame] | 210 | * WebRtcOpus_SetComplexity(...) |
| 211 | * |
| 212 | * This function adjusts the computational complexity. The effect is the same as |
| 213 | * calling the complexity setting of Opus as an Opus encoder related CTL. |
| 214 | * |
| 215 | * Input: |
| 216 | * - inst : Encoder context |
| 217 | * - complexity : New target complexity (0-10, inclusive) |
| 218 | * |
| 219 | * Return value : 0 - Success |
| 220 | * -1 - Error |
| 221 | */ |
| 222 | int16_t WebRtcOpus_SetComplexity(OpusEncInst* inst, int32_t complexity); |
| 223 | |
minyue | c8299f9 | 2016-09-27 02:08:47 -0700 | [diff] [blame] | 224 | /* |
| 225 | * WebRtcOpus_SetForceChannels(...) |
| 226 | * |
| 227 | * If the encoder is initialized as a stereo encoder, Opus will by default |
| 228 | * decide whether to encode in mono or stereo based on the bitrate. This |
| 229 | * function overrules the previous setting, and forces the encoder to encode |
| 230 | * in auto/mono/stereo. |
| 231 | * |
| 232 | * If the Encoder is initialized as a mono encoder, and one tries to force |
| 233 | * stereo, the function will return an error. |
| 234 | * |
| 235 | * Input: |
| 236 | * - inst : Encoder context |
| 237 | * - num_channels : 0 - Not forced |
| 238 | * 1 - Mono |
| 239 | * 2 - Stereo |
| 240 | * |
| 241 | * Return value : 0 - Success |
| 242 | * -1 - Error |
| 243 | */ |
minyue | 41b9c80 | 2016-10-06 07:13:54 -0700 | [diff] [blame] | 244 | int16_t WebRtcOpus_SetForceChannels(OpusEncInst* inst, size_t num_channels); |
minyue | c8299f9 | 2016-09-27 02:08:47 -0700 | [diff] [blame] | 245 | |
Peter Kasting | 6955870 | 2016-01-12 16:26:35 -0800 | [diff] [blame] | 246 | int16_t WebRtcOpus_DecoderCreate(OpusDecInst** inst, size_t channels); |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 247 | int16_t WebRtcOpus_DecoderFree(OpusDecInst* inst); |
| 248 | |
| 249 | /**************************************************************************** |
tina.legrand@webrtc.org | c459058 | 2012-11-28 12:23:29 +0000 | [diff] [blame] | 250 | * WebRtcOpus_DecoderChannels(...) |
| 251 | * |
| 252 | * This function returns the number of channels created for Opus decoder. |
| 253 | */ |
Peter Kasting | 6955870 | 2016-01-12 16:26:35 -0800 | [diff] [blame] | 254 | size_t WebRtcOpus_DecoderChannels(OpusDecInst* inst); |
tina.legrand@webrtc.org | c459058 | 2012-11-28 12:23:29 +0000 | [diff] [blame] | 255 | |
| 256 | /**************************************************************************** |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 257 | * WebRtcOpus_DecoderInit(...) |
| 258 | * |
| 259 | * This function resets state of the decoder. |
| 260 | * |
| 261 | * Input: |
| 262 | * - inst : Decoder context |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 263 | */ |
Karl Wiberg | 4376648 | 2015-08-27 15:22:11 +0200 | [diff] [blame] | 264 | void WebRtcOpus_DecoderInit(OpusDecInst* inst); |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 265 | |
| 266 | /**************************************************************************** |
| 267 | * WebRtcOpus_Decode(...) |
| 268 | * |
| 269 | * This function decodes an Opus packet into one or more audio frames at the |
| 270 | * ACM interface's sampling rate (32 kHz). |
| 271 | * |
| 272 | * Input: |
| 273 | * - inst : Decoder context |
| 274 | * - encoded : Encoded data |
| 275 | * - encoded_bytes : Bytes in encoded vector |
| 276 | * |
| 277 | * Output: |
| 278 | * - decoded : The decoded vector |
| 279 | * - audio_type : 1 normal, 2 CNG (for Opus it should |
| 280 | * always return 1 since we're not using Opus's |
| 281 | * built-in DTX/CNG scheme) |
| 282 | * |
minyue@webrtc.org | ecbe0aa | 2013-08-12 06:48:09 +0000 | [diff] [blame] | 283 | * Return value : >0 - Samples per channel in decoded vector |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 284 | * -1 - Error |
| 285 | */ |
Peter Kasting | bba7807 | 2015-06-11 19:02:46 -0700 | [diff] [blame] | 286 | int WebRtcOpus_Decode(OpusDecInst* inst, const uint8_t* encoded, |
Peter Kasting | dce40cf | 2015-08-24 14:52:23 -0700 | [diff] [blame] | 287 | size_t encoded_bytes, int16_t* decoded, |
Peter Kasting | bba7807 | 2015-06-11 19:02:46 -0700 | [diff] [blame] | 288 | int16_t* audio_type); |
minyue@webrtc.org | 46509c8 | 2014-03-07 11:49:11 +0000 | [diff] [blame] | 289 | |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 290 | /**************************************************************************** |
| 291 | * WebRtcOpus_DecodePlc(...) |
| 292 | * |
tina.legrand@webrtc.org | bd21fb5 | 2013-08-08 11:01:07 +0000 | [diff] [blame] | 293 | * This function processes PLC for opus frame(s). |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 294 | * Input: |
| 295 | * - inst : Decoder context |
| 296 | * - number_of_lost_frames : Number of PLC frames to produce |
| 297 | * |
| 298 | * Output: |
| 299 | * - decoded : The decoded vector |
| 300 | * |
| 301 | * Return value : >0 - number of samples in decoded PLC vector |
| 302 | * -1 - Error |
| 303 | */ |
Peter Kasting | bba7807 | 2015-06-11 19:02:46 -0700 | [diff] [blame] | 304 | int WebRtcOpus_DecodePlc(OpusDecInst* inst, int16_t* decoded, |
| 305 | int number_of_lost_frames); |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 306 | |
tina.legrand@webrtc.org | 4275ab1 | 2012-12-19 09:52:45 +0000 | [diff] [blame] | 307 | /**************************************************************************** |
minyue@webrtc.org | 46509c8 | 2014-03-07 11:49:11 +0000 | [diff] [blame] | 308 | * WebRtcOpus_DecodeFec(...) |
| 309 | * |
| 310 | * This function decodes the FEC data from an Opus packet into one or more audio |
| 311 | * frames at the ACM interface's sampling rate (32 kHz). |
| 312 | * |
| 313 | * Input: |
| 314 | * - inst : Decoder context |
| 315 | * - encoded : Encoded data |
| 316 | * - encoded_bytes : Bytes in encoded vector |
| 317 | * |
| 318 | * Output: |
| 319 | * - decoded : The decoded vector (previous frame) |
| 320 | * |
| 321 | * Return value : >0 - Samples per channel in decoded vector |
| 322 | * 0 - No FEC data in the packet |
| 323 | * -1 - Error |
| 324 | */ |
Peter Kasting | bba7807 | 2015-06-11 19:02:46 -0700 | [diff] [blame] | 325 | int WebRtcOpus_DecodeFec(OpusDecInst* inst, const uint8_t* encoded, |
Peter Kasting | dce40cf | 2015-08-24 14:52:23 -0700 | [diff] [blame] | 326 | size_t encoded_bytes, int16_t* decoded, |
Peter Kasting | bba7807 | 2015-06-11 19:02:46 -0700 | [diff] [blame] | 327 | int16_t* audio_type); |
minyue@webrtc.org | 46509c8 | 2014-03-07 11:49:11 +0000 | [diff] [blame] | 328 | |
| 329 | /**************************************************************************** |
tina.legrand@webrtc.org | 4275ab1 | 2012-12-19 09:52:45 +0000 | [diff] [blame] | 330 | * WebRtcOpus_DurationEst(...) |
| 331 | * |
| 332 | * This function calculates the duration of an opus packet. |
| 333 | * Input: |
| 334 | * - inst : Decoder context |
| 335 | * - payload : Encoded data pointer |
| 336 | * - payload_length_bytes : Bytes of encoded data |
| 337 | * |
Minyue | 323b132 | 2015-05-25 13:49:37 +0200 | [diff] [blame] | 338 | * Return value : The duration of the packet, in samples per |
| 339 | * channel. |
tina.legrand@webrtc.org | 4275ab1 | 2012-12-19 09:52:45 +0000 | [diff] [blame] | 340 | */ |
| 341 | int WebRtcOpus_DurationEst(OpusDecInst* inst, |
| 342 | const uint8_t* payload, |
Peter Kasting | dce40cf | 2015-08-24 14:52:23 -0700 | [diff] [blame] | 343 | size_t payload_length_bytes); |
tina.legrand@webrtc.org | 4275ab1 | 2012-12-19 09:52:45 +0000 | [diff] [blame] | 344 | |
minyuel | 6d92bf5 | 2015-09-23 15:20:39 +0200 | [diff] [blame] | 345 | /**************************************************************************** |
| 346 | * WebRtcOpus_PlcDuration(...) |
| 347 | * |
| 348 | * This function calculates the duration of a frame returned by packet loss |
| 349 | * concealment (PLC). |
| 350 | * |
| 351 | * Input: |
| 352 | * - inst : Decoder context |
| 353 | * |
| 354 | * Return value : The duration of a frame returned by PLC, in |
| 355 | * samples per channel. |
| 356 | */ |
| 357 | int WebRtcOpus_PlcDuration(OpusDecInst* inst); |
| 358 | |
minyue@webrtc.org | 46509c8 | 2014-03-07 11:49:11 +0000 | [diff] [blame] | 359 | /* TODO(minyue): Check whether it is needed to add a decoder context to the |
| 360 | * arguments, like WebRtcOpus_DurationEst(...). In fact, the packet itself tells |
| 361 | * the duration. The decoder context in WebRtcOpus_DurationEst(...) is not used. |
| 362 | * So it may be advisable to remove it from WebRtcOpus_DurationEst(...). */ |
| 363 | |
| 364 | /**************************************************************************** |
| 365 | * WebRtcOpus_FecDurationEst(...) |
| 366 | * |
| 367 | * This function calculates the duration of the FEC data within an opus packet. |
| 368 | * Input: |
| 369 | * - payload : Encoded data pointer |
| 370 | * - payload_length_bytes : Bytes of encoded data |
| 371 | * |
| 372 | * Return value : >0 - The duration of the FEC data in the |
Minyue | 323b132 | 2015-05-25 13:49:37 +0200 | [diff] [blame] | 373 | * packet in samples per channel. |
minyue@webrtc.org | 46509c8 | 2014-03-07 11:49:11 +0000 | [diff] [blame] | 374 | * 0 - No FEC data in the packet. |
| 375 | */ |
| 376 | int WebRtcOpus_FecDurationEst(const uint8_t* payload, |
Peter Kasting | dce40cf | 2015-08-24 14:52:23 -0700 | [diff] [blame] | 377 | size_t payload_length_bytes); |
minyue@webrtc.org | 46509c8 | 2014-03-07 11:49:11 +0000 | [diff] [blame] | 378 | |
| 379 | /**************************************************************************** |
| 380 | * WebRtcOpus_PacketHasFec(...) |
| 381 | * |
| 382 | * This function detects if an opus packet has FEC. |
| 383 | * Input: |
| 384 | * - payload : Encoded data pointer |
| 385 | * - payload_length_bytes : Bytes of encoded data |
| 386 | * |
| 387 | * Return value : 0 - the packet does NOT contain FEC. |
| 388 | * 1 - the packet contains FEC. |
| 389 | */ |
| 390 | int WebRtcOpus_PacketHasFec(const uint8_t* payload, |
Peter Kasting | dce40cf | 2015-08-24 14:52:23 -0700 | [diff] [blame] | 391 | size_t payload_length_bytes); |
minyue@webrtc.org | 46509c8 | 2014-03-07 11:49:11 +0000 | [diff] [blame] | 392 | |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 393 | #ifdef __cplusplus |
| 394 | } // extern "C" |
| 395 | #endif |
| 396 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame^] | 397 | #endif // MODULES_AUDIO_CODING_CODECS_OPUS_OPUS_INTERFACE_H_ |