28#if !defined(_SPANDSP_T38_GATEWAY_H_)
29#define _SPANDSP_T38_GATEWAY_H_
43#define MAX_NSX_SUPPRESSION 10
73#if defined(__cplusplus)
84 t38_tx_packet_handler_t tx_packet_handler,
85 void *tx_packet_user_data);
105SPAN_DECLARE(
int)
t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[],
int len);
124SPAN_DECLARE(
int)
t38_gateway_tx(t38_gateway_state_t *s, int16_t amp[],
int max_len);
162 const uint8_t *from_t38,
164 const uint8_t *from_modem,
213#if defined(__cplusplus)
struct logging_state_s logging_state_t
Definition logging.h:72
Definition private/t38_gateway.h:190
Definition t38_gateway.h:64
bool error_correcting_mode
True if error correcting mode is used.
Definition t38_gateway.h:68
int bit_rate
The current bit rate for image transfer.
Definition t38_gateway.h:66
int pages_transferred
The number of pages transferred so far.
Definition t38_gateway.h:70
struct t38_core_state_s t38_core_state_t
Definition t38_core.h:216
int t38_gateway_release(t38_gateway_state_t *s)
Release a T.38 context.
Definition t38_gateway.c:2464
void t38_gateway_set_supported_modems(t38_gateway_state_t *s, int supported_modems)
Specify supported modems.
Definition t38_gateway.c:2300
int t38_gateway_free(t38_gateway_state_t *s)
Free a T.38 context.
Definition t38_gateway.c:2470
logging_state_t * t38_gateway_get_logging_state(t38_gateway_state_t *s)
Get a pointer to the logging context associated with a T.38 context.
Definition t38_gateway.c:2282
void t38_gateway_set_transmit_on_idle(t38_gateway_state_t *s, bool transmit_on_idle)
Select whether silent audio will be sent when transmit is idle.
Definition t38_gateway.c:2294
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.
Definition t38_gateway.c:2399
void t38_gateway_set_nsx_suppression(t38_gateway_state_t *s, const uint8_t *from_t38, int from_t38_len, const uint8_t *from_modem, int from_modem_len)
Select whether NSC, NSF, and NSS should be suppressed.
Definition t38_gateway.c:2313
int t38_gateway_tx(t38_gateway_state_t *s, int16_t amp[], int max_len)
Generate a block of FAX audio samples.
Definition t38_gateway.c:2222
void t38_gateway_set_tep_mode(t38_gateway_state_t *s, bool use_tep)
Select whether TEP will be sent for the image modems.
Definition t38_gateway.c:2334
void t38_gateway_set_real_time_frame_handler(t38_gateway_state_t *s, t38_gateway_real_time_frame_handler_t handler, void *user_data)
Set a callback function for T.30 frame exchange monitoring.
Definition t38_gateway.c:2346
void t38_gateway_set_fill_bit_removal(t38_gateway_state_t *s, bool remove)
Select whether non-ECM fill bits are to be removed during transmission.
Definition t38_gateway.c:2340
void t38_gateway_set_ecm_capability(t38_gateway_state_t *s, bool ecm_allowed)
Control whether error correcting mode (ECM) is allowed.
Definition t38_gateway.c:2288
void(* t38_gateway_real_time_frame_handler_t)(void *user_data, bool incoming, const uint8_t *msg, int len)
T.38 gateway real time frame handler.
Definition t38_gateway.h:55
int t38_gateway_rx_fillin(t38_gateway_state_t *s, int len)
Apply fake received audio processing.
Definition t38_gateway.c:2193
int t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[], int len)
Process a block of received FAX audio samples.
Definition t38_gateway.c:2173
void t38_gateway_get_transfer_statistics(t38_gateway_state_t *s, t38_stats_t *t)
Get the current transfer statistics.
Definition t38_gateway.c:2267
t38_core_state_t * t38_gateway_get_t38_core_state(t38_gateway_state_t *s)
Get a pointer to the T.38 core IFP packet engine associated with a T.38 context.
Definition t38_gateway.c:2276