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
00030
00031
00032
00038 #ifndef OPUS_DEFINES_H
00039 #define OPUS_DEFINES_H
00040
00041 #include "opus_types.h"
00042
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif
00046
00051 #define OPUS_OK 0
00052
00053 #define OPUS_BAD_ARG -1
00054
00055 #define OPUS_BUFFER_TOO_SMALL -2
00056
00057 #define OPUS_INTERNAL_ERROR -3
00058
00059 #define OPUS_INVALID_PACKET -4
00060
00061 #define OPUS_UNIMPLEMENTED -5
00062
00063 #define OPUS_INVALID_STATE -6
00064
00065 #define OPUS_ALLOC_FAIL -7
00066
00071 #if defined(__GNUC__) && defined(OPUS_BUILD)
00072 # define OPUS_EXPORT __attribute__ ((visibility ("default")))
00073 #elif defined(WIN32)
00074 # ifdef OPUS_BUILD
00075 # define OPUS_EXPORT __declspec(dllexport)
00076 # else
00077 # define OPUS_EXPORT __declspec(dllimport)
00078 # endif
00079 #else
00080 # define OPUS_EXPORT
00081 #endif
00082
00085 #define OPUS_SET_APPLICATION_REQUEST 4000
00086 #define OPUS_GET_APPLICATION_REQUEST 4001
00087 #define OPUS_SET_BITRATE_REQUEST 4002
00088 #define OPUS_GET_BITRATE_REQUEST 4003
00089 #define OPUS_SET_MAX_BANDWIDTH_REQUEST 4004
00090 #define OPUS_GET_MAX_BANDWIDTH_REQUEST 4005
00091 #define OPUS_SET_VBR_REQUEST 4006
00092 #define OPUS_GET_VBR_REQUEST 4007
00093 #define OPUS_SET_BANDWIDTH_REQUEST 4008
00094 #define OPUS_GET_BANDWIDTH_REQUEST 4009
00095 #define OPUS_SET_COMPLEXITY_REQUEST 4010
00096 #define OPUS_GET_COMPLEXITY_REQUEST 4011
00097 #define OPUS_SET_INBAND_FEC_REQUEST 4012
00098 #define OPUS_GET_INBAND_FEC_REQUEST 4013
00099 #define OPUS_SET_PACKET_LOSS_PERC_REQUEST 4014
00100 #define OPUS_GET_PACKET_LOSS_PERC_REQUEST 4015
00101 #define OPUS_SET_DTX_REQUEST 4016
00102 #define OPUS_GET_DTX_REQUEST 4017
00103 #define OPUS_SET_VBR_CONSTRAINT_REQUEST 4020
00104 #define OPUS_GET_VBR_CONSTRAINT_REQUEST 4021
00105 #define OPUS_SET_FORCE_CHANNELS_REQUEST 4022
00106 #define OPUS_GET_FORCE_CHANNELS_REQUEST 4023
00107 #define OPUS_SET_SIGNAL_REQUEST 4024
00108 #define OPUS_GET_SIGNAL_REQUEST 4025
00109 #define OPUS_GET_LOOKAHEAD_REQUEST 4027
00110
00111 #define OPUS_GET_FINAL_RANGE_REQUEST 4031
00112 #define OPUS_GET_PITCH_REQUEST 4033
00113
00114
00115 #define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x))
00116 #define __opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr)))
00117 #define __opus_check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr)))
00118
00124
00125 #define OPUS_AUTO -1000
00126 #define OPUS_BITRATE_MAX -1
00130 #define OPUS_APPLICATION_VOIP 2048
00131
00133 #define OPUS_APPLICATION_AUDIO 2049
00134
00136 #define OPUS_APPLICATION_RESTRICTED_LOWDELAY 2051
00137
00138 #define OPUS_SIGNAL_VOICE 3001
00139 #define OPUS_SIGNAL_MUSIC 3002
00140 #define OPUS_BANDWIDTH_NARROWBAND 1101
00141 #define OPUS_BANDWIDTH_MEDIUMBAND 1102
00142 #define OPUS_BANDWIDTH_WIDEBAND 1103
00143 #define OPUS_BANDWIDTH_SUPERWIDEBAND 1104
00144 #define OPUS_BANDWIDTH_FULLBAND 1105
00178 #define OPUS_SET_COMPLEXITY(x) OPUS_SET_COMPLEXITY_REQUEST, __opus_check_int(x)
00179
00182 #define OPUS_GET_COMPLEXITY(x) OPUS_GET_COMPLEXITY_REQUEST, __opus_check_int_ptr(x)
00183
00192 #define OPUS_SET_BITRATE(x) OPUS_SET_BITRATE_REQUEST, __opus_check_int(x)
00193
00196 #define OPUS_GET_BITRATE(x) OPUS_GET_BITRATE_REQUEST, __opus_check_int_ptr(x)
00197
00207 #define OPUS_SET_VBR(x) OPUS_SET_VBR_REQUEST, __opus_check_int(x)
00208
00211 #define OPUS_GET_VBR(x) OPUS_GET_VBR_REQUEST, __opus_check_int_ptr(x)
00212
00224 #define OPUS_SET_VBR_CONSTRAINT(x) OPUS_SET_VBR_CONSTRAINT_REQUEST, __opus_check_int(x)
00225
00228 #define OPUS_GET_VBR_CONSTRAINT(x) OPUS_GET_VBR_CONSTRAINT_REQUEST, __opus_check_int_ptr(x)
00229
00235 #define OPUS_SET_FORCE_CHANNELS(x) OPUS_SET_FORCE_CHANNELS_REQUEST, __opus_check_int(x)
00236
00239 #define OPUS_GET_FORCE_CHANNELS(x) OPUS_GET_FORCE_CHANNELS_REQUEST, __opus_check_int_ptr(x)
00240
00250 #define OPUS_SET_MAX_BANDWIDTH(x) OPUS_SET_MAX_BANDWIDTH_REQUEST, __opus_check_int(x)
00251
00255 #define OPUS_GET_MAX_BANDWIDTH(x) OPUS_GET_MAX_BANDWIDTH_REQUEST, __opus_check_int_ptr(x)
00256
00267 #define OPUS_SET_BANDWIDTH(x) OPUS_SET_BANDWIDTH_REQUEST, __opus_check_int(x)
00268
00277 #define OPUS_SET_SIGNAL(x) OPUS_SET_SIGNAL_REQUEST, __opus_check_int(x)
00278
00282 #define OPUS_GET_SIGNAL(x) OPUS_GET_SIGNAL_REQUEST, __opus_check_int_ptr(x)
00283
00284
00294 #define OPUS_SET_APPLICATION(x) OPUS_SET_APPLICATION_REQUEST, __opus_check_int(x)
00295
00299 #define OPUS_GET_APPLICATION(x) OPUS_GET_APPLICATION_REQUEST, __opus_check_int_ptr(x)
00300
00314 #define OPUS_GET_LOOKAHEAD(x) OPUS_GET_LOOKAHEAD_REQUEST, __opus_check_int_ptr(x)
00315
00321 #define OPUS_SET_INBAND_FEC(x) OPUS_SET_INBAND_FEC_REQUEST, __opus_check_int(x)
00322
00326 #define OPUS_GET_INBAND_FEC(x) OPUS_GET_INBAND_FEC_REQUEST, __opus_check_int_ptr(x)
00327
00335 #define OPUS_SET_PACKET_LOSS_PERC(x) OPUS_SET_PACKET_LOSS_PERC_REQUEST, __opus_check_int(x)
00336
00340 #define OPUS_GET_PACKET_LOSS_PERC(x) OPUS_GET_PACKET_LOSS_PERC_REQUEST, __opus_check_int_ptr(x)
00341
00347 #define OPUS_SET_DTX(x) OPUS_SET_DTX_REQUEST, __opus_check_int(x)
00348
00352 #define OPUS_GET_DTX(x) OPUS_GET_DTX_REQUEST, __opus_check_int_ptr(x)
00353
00394 #define OPUS_RESET_STATE 4028
00395
00404 #define OPUS_GET_FINAL_RANGE(x) OPUS_GET_FINAL_RANGE_REQUEST, __opus_check_uint_ptr(x)
00405
00416 #define OPUS_GET_PITCH(x) OPUS_GET_PITCH_REQUEST, __opus_check_int_ptr(x)
00417
00421 #define OPUS_GET_BANDWIDTH(x) OPUS_GET_BANDWIDTH_REQUEST, __opus_check_int_ptr(x)
00422
00434 OPUS_EXPORT const char *opus_strerror(int error);
00435
00440 OPUS_EXPORT const char *opus_get_version_string(void);
00443 #ifdef __cplusplus
00444 }
00445 #endif
00446
00447 #endif