41#if !defined(_SPANDSP_V8_H_)
48typedef void (*v8_result_handler_t)(
void *user_data, v8_parms_t *result);
50enum v8_call_function_e
59 V8_CALL_FUNCTION_EXTENSION = 7
64 V8_MOD_V17 = (1 << 0),
65 V8_MOD_V21 = (1 << 1),
66 V8_MOD_V22 = (1 << 2),
67 V8_MOD_V23HDX = (1 << 3),
68 V8_MOD_V23 = (1 << 4),
69 V8_MOD_V26BIS = (1 << 5),
70 V8_MOD_V26TER = (1 << 6),
71 V8_MOD_V27TER = (1 << 7),
72 V8_MOD_V29 = (1 << 8),
73 V8_MOD_V32 = (1 << 9),
74 V8_MOD_V34HDX = (1 << 10),
75 V8_MOD_V34 = (1 << 11),
76 V8_MOD_V90 = (1 << 12),
77 V8_MOD_V92 = (1 << 13)
83 V8_PROTOCOL_LAPM_V42 = 1,
84 V8_PROTOCOL_EXTENSION = 7
89 V8_PSTN_ACCESS_CALL_DCE_CELLULAR = 0x01,
90 V8_PSTN_ACCESS_ANSWER_DCE_CELLULAR = 0x02,
91 V8_PSTN_ACCESS_DCE_ON_DIGITAL = 0x04
94enum v8_pcm_modem_availability_e
96 V8_PSTN_PCM_MODEM_V90_V92_ANALOGUE = 0x01,
97 V8_PSTN_PCM_MODEM_V90_V92_DIGITAL = 0x02,
98 V8_PSTN_PCM_MODEM_V91 = 0x04
127 int32_t call_function;
128 uint32_t modulations;
132 int32_t pcm_modem_availability;
140 int32_t modem_connect_tone;
143 v8_cm_jm_parms_t jm_cm;
146#if defined(__cplusplus)
152SPAN_DECLARE(
int)
v8_continue(v8_state_t *s, v8_parms_t *parms);
154SPAN_DECLARE(
int) v8_restart(v8_state_t *s,
166SPAN_DECLARE(v8_state_t *)
v8_init(v8_state_t *s,
169 v8_result_handler_t result_handler,
182SPAN_DECLARE(
int)
v8_free(v8_state_t *s);
193SPAN_DECLARE(
int)
v8_tx(v8_state_t *s, int16_t *amp,
int max_len);
203SPAN_DECLARE(
int)
v8_decode_rx(v8_state_t *s,
const int16_t *amp,
int len);
211SPAN_DECLARE(
int)
v8_rx(v8_state_t *s,
const int16_t *amp,
int len);
219SPAN_DECLARE(
const char *) v8_status_to_str(
int status);
220SPAN_DECLARE(
const char *) v8_call_function_to_str(
int call_function);
221SPAN_DECLARE(
const char *) v8_modulation_to_str(
int modulation_scheme);
222SPAN_DECLARE(
const char *) v8_protocol_to_str(
int protocol);
223SPAN_DECLARE(
const char *) v8_pstn_access_to_str(
int pstn_access);
224SPAN_DECLARE(
const char *) v8_nsf_to_str(
int nsf);
225SPAN_DECLARE(
const char *) v8_pcm_modem_availability_to_str(
int pcm_modem_availability);
226SPAN_DECLARE(
const char *) v8_t66_to_str(
int t66);
228#if defined(__cplusplus)
struct logging_state_s logging_state_t
Definition logging.h:72
Definition private/v8.h:30
v8_state_t * v8_init(v8_state_t *s, bool calling_party, v8_parms_t *parms, v8_result_handler_t result_handler, void *user_data)
Initialise a V.8 context.
Definition v8.c:1378
int v8_release(v8_state_t *s)
Release a V.8 context.
Definition v8.c:1402
int v8_continue(v8_state_t *s, v8_parms_t *parms)
Definition v8.c:1307
int v8_decode_rx(v8_state_t *s, const int16_t *amp, int len)
Decode a block of received V.8 audio samples.
Definition v8.c:1006
int v8_free(v8_state_t *s)
Release a V.8 context.
Definition v8.c:1408
void v8_log_supported_modulations(v8_state_t *s, int modulation_schemes)
Log the list of supported modulations.
Definition v8.c:316
int v8_rx(v8_state_t *s, const int16_t *amp, int len)
Process a block of received V.8 audio samples.
Definition v8.c:1035
v8_status_e
Definition v8.h:102
@ V8_STATUS_CALL_FUNCTION_RECEIVED
Definition v8.h:116
@ V8_STATUS_FAX_CNG_TONE_RECEIVED
Definition v8.h:120
@ V8_STATUS_CALLING_TONE_RECEIVED
Definition v8.h:118
@ V8_STATUS_NON_V8_CALL
Definition v8.h:112
@ V8_STATUS_IN_PROGRESS
Definition v8.h:104
@ V8_STATUS_V8_OFFERED
Definition v8.h:106
@ V8_STATUS_FAILED
Definition v8.h:114
@ V8_STATUS_V8_CALL
Definition v8.h:110
int v8_tx(v8_state_t *s, int16_t *amp, int max_len)
Generate a block of V.8 audio samples.
Definition v8.c:845