v8.h File Reference

Go to the source code of this file.

Classes

struct  v8_state_t
struct  v8_result_s

Typedefs

typedef struct v8_result_s v8_result_t
typedef void( v8_result_handler_t )(void *user_data, v8_result_t *result)

Enumerations

enum  v8_call_function_e {
  V8_CALL_TBS = 0, V8_CALL_H324, V8_CALL_V18, V8_CALL_T101,
  V8_CALL_T30_TX, V8_CALL_T30_RX, V8_CALL_V_SERIES, V8_CALL_FUNCTION_EXTENSION
}
enum  v8_modulation_e {
  V8_MOD_V17 = (1 << 0), V8_MOD_V21 = (1 << 1), V8_MOD_V22 = (1 << 2), V8_MOD_V23HALF = (1 << 3),
  V8_MOD_V23 = (1 << 4), V8_MOD_V26BIS = (1 << 5), V8_MOD_V26TER = (1 << 6), V8_MOD_V27TER = (1 << 7),
  V8_MOD_V29 = (1 << 8), V8_MOD_V32 = (1 << 9), V8_MOD_V34HALF = (1 << 10), V8_MOD_V34 = (1 << 11),
  V8_MOD_V90 = (1 << 12), V8_MOD_V92 = (1 << 13), V8_MOD_FAILED = (1 << 15)
}
enum  v8_protocol_e { V8_PROTOCOL_NONE = 0, V8_PROTOCOL_LAPM_V42 = 1, V8_PROTOCOL_EXTENSION = 7 }
enum  v8_pstn_access_e { V8_PSTN_ACCESS_CALL_DCE_CELLULAR = 0x20, V8_PSTN_ACCESS_ANSWER_DCE_CELLULAR = 0x40, V8_PSTN_ACCESS_DCE_ON_DIGTIAL = 0x80 }
enum  v8_pcm_modem_availability_e { V8_PSTN_PCM_MODEM_V90_V92_ANALOGUE = 0x20, V8_PSTN_PCM_MODEM_V90_V92_DIGITAL = 0x40, V8_PSTN_PCM_MODEM_V91 = 0x80 }

Functions

v8_state_t * v8_init (v8_state_t *s, int caller, int available_modulations, v8_result_handler_t *result_handler, void *user_data)
 Initialise a V.8 context.
int v8_release (v8_state_t *s)
 Release a V.8 context.
int v8_tx (v8_state_t *s, int16_t *amp, int max_len)
 Generate a block of V.8 audio samples.
int v8_rx (v8_state_t *s, const int16_t *amp, int len)
 Process a block of received V.8 audio samples.
void v8_log_supported_modulations (v8_state_t *s, int modulation_schemes)
 Log the list of supported modulations.
const char * v8_call_function_to_str (int call_function)
const char * v8_modulation_to_str (int modulation_scheme)
const char * v8_protocol_to_str (int protocol)
const char * v8_pstn_access_to_str (int pstn_access)
const char * v8_pcm_modem_availability_to_str (int pcm_modem_availability)


Detailed Description


Function Documentation

v8_state_t* v8_init ( v8_state_t *  s,
int  caller,
int  available_modulations,
v8_result_handler_t *  result_handler,
void *  user_data 
)

Initialise a V.8 context.

Initialise a V.8 context.

Parameters:
s The V.8 context.
caller TRUE if caller mode, else answerer mode.
available_modulations A bitwise list of the modulation schemes to be advertised as available here.
result_handler The callback routine used to handle the results of negotiation.
user_data An opaque pointer passed to the result_handler routine.
Returns:
A pointer to the V.8 context, or NULL if there was a problem.

References queue_init().

void v8_log_supported_modulations ( v8_state_t *  s,
int  modulation_schemes 
)

Log the list of supported modulations.

Log the list of supported modulations.

Parameters:
s The V.8 context.
modulation_schemes The list of supported modulations.

References span_log().

int v8_release ( v8_state_t *  s  ) 

Release a V.8 context.

Release a V.8 context.

Parameters:
s The V.8 context.
Returns:
0 for OK.

References queue_free().

int v8_rx ( v8_state_t *  s,
const int16_t *  amp,
int  len 
)

Process a block of received V.8 audio samples.

Process a block of received V.8 audio samples.

Parameters:
s The V.8 context.
amp The audio sample buffer.
len The number of samples in the buffer.

References fsk_rx(), fsk_tx_init(), MODEM_CONNECT_TONES_ANS_PR, MODEM_CONNECT_TONES_ANSAM_PR, modem_connect_tones_rx(), modem_connect_tones_rx_get(), modem_connect_tones_rx_init(), modem_connect_tones_tx_init(), queue_empty(), queue_flush(), and queue_write().

int v8_tx ( v8_state_t *  s,
int16_t *  amp,
int  max_len 
)

Generate a block of V.8 audio samples.

Generate a block of V.8 audio samples.

Parameters:
s The V.8 context.
amp The audio sample buffer.
max_len The number of samples to be generated.
Returns:
The number of samples actually generated.

References fsk_tx(), and modem_connect_tones_tx().


Generated on Tue Oct 7 20:25:52 2008 for spandsp by  doxygen 1.5.6