Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00035 #ifndef OPUS_CUSTOM_H
00036 #define OPUS_CUSTOM_H
00037
00038 #include "opus_defines.h"
00039
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043
00044 #ifdef CUSTOM_MODES
00045 #define OPUS_CUSTOM_EXPORT OPUS_EXPORT
00046 #define OPUS_CUSTOM_EXPORT_STATIC OPUS_EXPORT
00047 #else
00048 #define OPUS_CUSTOM_EXPORT
00049 #ifdef CELT_C
00050 #define OPUS_CUSTOM_EXPORT_STATIC static inline
00051 #else
00052 #define OPUS_CUSTOM_EXPORT_STATIC
00053 #endif
00054 #endif
00055
00095 typedef struct OpusCustomEncoder OpusCustomEncoder;
00096
00102 typedef struct OpusCustomDecoder OpusCustomDecoder;
00103
00110 typedef struct OpusCustomMode OpusCustomMode;
00111
00121 OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error);
00122
00127 OPUS_CUSTOM_EXPORT void opus_custom_mode_destroy(OpusCustomMode *mode);
00128
00129
00135 OPUS_CUSTOM_EXPORT_STATIC OPUS_WARN_UNUSED_RESULT int opus_custom_encoder_get_size(
00136 const OpusCustomMode *mode,
00137 int channels
00138 ) OPUS_ARG_NONNULL(1);
00139
00149 OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomEncoder *opus_custom_encoder_create(
00150 const OpusCustomMode *mode,
00151 int channels,
00152 int *error
00153 ) OPUS_ARG_NONNULL(1);
00154
00167 OPUS_CUSTOM_EXPORT_STATIC int opus_custom_encoder_init(
00168 OpusCustomEncoder *st,
00169 const OpusCustomMode *mode,
00170 int channels
00171 ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);
00172
00176 OPUS_CUSTOM_EXPORT void opus_custom_encoder_destroy(OpusCustomEncoder *st);
00177
00195 OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_encode_float(
00196 OpusCustomEncoder *st,
00197 const float *pcm,
00198 int frame_size,
00199 unsigned char *compressed,
00200 int maxCompressedBytes
00201 ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
00202
00216 OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_encode(
00217 OpusCustomEncoder *st,
00218 const opus_int16 *pcm,
00219 int frame_size,
00220 unsigned char *compressed,
00221 int maxCompressedBytes
00222 ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
00223
00230 OPUS_CUSTOM_EXPORT int opus_custom_encoder_ctl(OpusCustomEncoder * OPUS_RESTRICT st, int request, ...) OPUS_ARG_NONNULL(1);
00231
00232
00233
00239 OPUS_CUSTOM_EXPORT_STATIC OPUS_WARN_UNUSED_RESULT int opus_custom_decoder_get_size(
00240 const OpusCustomMode *mode,
00241 int channels
00242 ) OPUS_ARG_NONNULL(1);
00243
00252 OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomDecoder *opus_custom_decoder_create(
00253 const OpusCustomMode *mode,
00254 int channels,
00255 int *error
00256 ) OPUS_ARG_NONNULL(1);
00257
00270 OPUS_CUSTOM_EXPORT_STATIC int opus_custom_decoder_init(
00271 OpusCustomDecoder *st,
00272 const OpusCustomMode *mode,
00273 int channels
00274 ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);
00275
00279 OPUS_CUSTOM_EXPORT void opus_custom_decoder_destroy(OpusCustomDecoder *st);
00280
00290 OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_decode_float(
00291 OpusCustomDecoder *st,
00292 const unsigned char *data,
00293 int len,
00294 float *pcm,
00295 int frame_size
00296 ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
00297
00307 OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_decode(
00308 OpusCustomDecoder *st,
00309 const unsigned char *data,
00310 int len,
00311 opus_int16 *pcm,
00312 int frame_size
00313 ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
00314
00321 OPUS_CUSTOM_EXPORT int opus_custom_decoder_ctl(OpusCustomDecoder * OPUS_RESTRICT st, int request, ...) OPUS_ARG_NONNULL(1);
00322
00325 #ifdef __cplusplus
00326 }
00327 #endif
00328
00329 #endif