Go to the source code of this file.
Classes | |
struct | t38_gateway_state_t |
struct | t38_stats_t |
Defines | |
#define | _SPANDSP_T38_GATEWAY_H_ |
#define | T38_RX_BUF_LEN 2048 |
#define | T38_NON_ECM_TX_BUF_LEN 16384 |
#define | T38_TX_HDLC_BUFS 256 |
#define | T38_MAX_HDLC_LEN 260 |
Functions | |
t38_gateway_state_t * | t38_gateway_init (t38_gateway_state_t *s, t38_tx_packet_handler_t *tx_packet_handler, void *tx_packet_user_data) |
Initialise a gateway mode T.38 context. | |
int | t38_gateway_free (t38_gateway_state_t *s) |
Free a T.38 context. | |
int | t38_gateway_rx (t38_gateway_state_t *s, int16_t amp[], int len) |
Process a block of received FAX audio samples. | |
int | t38_gateway_tx (t38_gateway_state_t *s, int16_t amp[], int max_len) |
Generate a block of FAX audio samples. | |
void | t38_gateway_set_ecm_capability (t38_gateway_state_t *s, int ecm_allowed) |
Control whether error correcting mode (ECM) is allowed. | |
void | t38_gateway_set_transmit_on_idle (t38_gateway_state_t *s, int transmit_on_idle) |
Select whether silent audio will be sent when transmit is idle. | |
void | t38_gateway_set_supported_modems (t38_gateway_state_t *s, int supported_modems) |
Specify supported modems. | |
void | t38_gateway_set_nsx_suppression (t38_gateway_state_t *s, int suppress_nsx) |
Select whether NSC, NSF, and NSS should be suppressed. | |
void | t38_gateway_set_tep_mode (t38_gateway_state_t *s, int use_tep) |
Select whether TEP will be sent for the image modems. | |
void | t38_gateway_get_transfer_statistics (t38_gateway_state_t *s, t38_stats_t *t) |
Get the current transfer statistics. |
int t38_gateway_free | ( | t38_gateway_state_t * | s | ) |
Free a T.38 context.
Free a gateway mode T.38 context.
s | The T.38 context. |
void t38_gateway_get_transfer_statistics | ( | t38_gateway_state_t * | s, | |
t38_stats_t * | t | |||
) |
Get the current transfer statistics.
Get the current transfer statistics for the current T.38 session.
s | The T.38 context. | |
t | A pointer to a buffer for the statistics. |
References t38_gateway_state_t::ecm_mode, t38_gateway_state_t::fast_bit_rate, and t38_gateway_state_t::pages_confirmed.
t38_gateway_state_t* t38_gateway_init | ( | t38_gateway_state_t * | s, | |
t38_tx_packet_handler_t * | tx_packet_handler, | |||
void * | tx_packet_user_data | |||
) |
Initialise a gateway mode T.38 context.
s | The T.38 context. | |
tx_packet_handler | A callback routine to encapsulate and transmit T.38 packets. | |
tx_packet_user_data | An opaque pointer passed to the tx_packet_handler routine. |
References hdlc_tx_init(), t38_gateway_state_t::hdlctx, t38_gateway_state_t::logging, t38_gateway_state_t::octets_per_data_packet, t38_gateway_state_t::rx_signal_present, silence_gen(), t38_gateway_state_t::silence_gen, silence_gen_init(), t38_gateway_state_t::suppress_nsx, t38_gateway_state_t::t38, t38_gateway_set_nsx_suppression(), t38_gateway_set_supported_modems(), t38_gateway_state_t::tx_handler, t38_gateway_state_t::tx_user_data, t38_gateway_state_t::use_tep, t38_gateway_state_t::v17_rx, v17_rx_init(), t38_gateway_state_t::v17_tx, v17_tx_init(), t38_gateway_state_t::v27ter_rx, v27ter_rx_init(), t38_gateway_state_t::v27ter_tx, v27ter_tx_init(), t38_gateway_state_t::v29_rx, v29_rx_init(), v29_rx_signal_cutoff(), t38_gateway_state_t::v29_tx, and v29_tx_init().
int t38_gateway_rx | ( | t38_gateway_state_t * | s, | |
int16_t | amp[], | |||
int | len | |||
) |
Process a block of received FAX audio samples.
Process a block of received FAX audio samples.
s | The T.38 context. | |
amp | The audio sample buffer. | |
len | The number of samples in the buffer. |
References t38_gateway_state_t::dc_restore, t38_gateway_state_t::fax_audio_rx_log, t38_gateway_state_t::immediate_rx_handler, t38_gateway_state_t::rx_user_data, t38_gateway_state_t::samples_to_timeout, and t38_gateway_state_t::tcf_mode_predictable_modem_start.
void t38_gateway_set_ecm_capability | ( | t38_gateway_state_t * | s, | |
int | ecm_allowed | |||
) |
Control whether error correcting mode (ECM) is allowed.
Control whether error correcting mode (ECM) is allowed.
s | The T.38 context. | |
ecm_allowed | TRUE is ECM is to be allowed. |
References t38_gateway_state_t::ecm_allowed.
void t38_gateway_set_nsx_suppression | ( | t38_gateway_state_t * | s, | |
int | suppress_nsx | |||
) |
Select whether NSC, NSF, and NSS should be suppressed.
Select whether NSC, NSF, and NSS should be suppressed. It selected, the contents of these messages are forced to zero for all octets beyond the message type. This makes them look like manufacturer specific messages, from a manufacturer which does not exist.
s | The T.38 context. | |
suppress_nsx | TRUE if NSC, NSF, and NSS should be suppressed. |
References t38_gateway_state_t::suppress_nsx.
Referenced by t38_gateway_init().
void t38_gateway_set_supported_modems | ( | t38_gateway_state_t * | s, | |
int | supported_modems | |||
) |
Specify supported modems.
Specify which modem types are supported by a T.30 context.
s | The T.38 context. | |
supported_modems | Bit field list of the supported modems. |
References t38_core_state_s::fastest_image_data_rate, t38_gateway_state_t::supported_modems, and t38_gateway_state_t::t38.
Referenced by t38_gateway_init().
void t38_gateway_set_tep_mode | ( | t38_gateway_state_t * | s, | |
int | use_tep | |||
) |
Select whether TEP will be sent for the image modems.
Select whether talker echo protection tone will be sent for the image modems.
s | The T.38 context. | |
use_tep | TRUE if TEP should be sent. |
References t38_gateway_state_t::use_tep.
void t38_gateway_set_transmit_on_idle | ( | t38_gateway_state_t * | s, | |
int | transmit_on_idle | |||
) |
Select whether silent audio will be sent when transmit is idle.
Select whether silent audio will be sent when transmit is idle.
s | The T.38 context. | |
transmit_on_idle | TRUE if silent audio should be output when the FAX transmitter is idle. FALSE to transmit zero length audio when the FAX transmitter is idle. The default behaviour is FALSE. |
References t38_gateway_state_t::transmit_on_idle.
int t38_gateway_tx | ( | t38_gateway_state_t * | s, | |
int16_t | amp[], | |||
int | max_len | |||
) |
Generate a block of FAX audio samples.
Generate a block of FAX audio samples.
s | The T.38 context. | |
amp | The audio sample buffer. | |
max_len | The number of samples to be generated. |
References t38_gateway_state_t::fax_audio_tx_log, t38_gateway_state_t::silence_gen, silence_gen_set(), t38_gateway_state_t::transmit_on_idle, t38_gateway_state_t::tx_handler, and t38_gateway_state_t::tx_user_data.