spandsp  0.0.6
t38_terminal.h File Reference

Go to the source code of this file.

Macros

#define T38_MAX_HDLC_LEN   260
 

Typedefs

typedef struct t38_terminal_state_s t38_terminal_state_t
 

Enumerations

enum  { T38_TERMINAL_OPTION_NO_PACING = 0x01, T38_TERMINAL_OPTION_REGULAR_INDICATORS = 0x02, T38_TERMINAL_OPTION_2S_REPEATING_INDICATORS = 0x04, T38_TERMINAL_OPTION_NO_INDICATORS = 0x08 }
 

Functions

int t38_terminal_send_timeout (t38_terminal_state_t *s, int samples)
 
void t38_terminal_set_config (t38_terminal_state_t *s, int config)
 Set configuration options. More...
 
void t38_terminal_set_tep_mode (t38_terminal_state_t *s, int use_tep)
 Select whether TEP time will be allowed for. More...
 
void t38_terminal_set_fill_bit_removal (t38_terminal_state_t *s, int remove)
 Select whether non-ECM fill bits are to be removed during transmission. More...
 
t30_state_tt38_terminal_get_t30_state (t38_terminal_state_t *s)
 Get a pointer to the T.30 engine associated with a T.38 context. More...
 
t38_core_state_tt38_terminal_get_t38_core_state (t38_terminal_state_t *s)
 Get a pointer to the T.38 core IFP packet engine associated with a T.38 context. More...
 
logging_state_tt38_terminal_get_logging_state (t38_terminal_state_t *s)
 Get a pointer to the logging context associated with a T.38 context. More...
 
int t38_terminal_restart (t38_terminal_state_t *s, int calling_party)
 Reinitialise a termination mode T.38 context. More...
 
t38_terminal_state_tt38_terminal_init (t38_terminal_state_t *s, int calling_party, t38_tx_packet_handler_t *tx_packet_handler, void *tx_packet_user_data)
 Initialise a termination mode T.38 context. More...
 
int t38_terminal_release (t38_terminal_state_t *s)
 Release a T.38 context. More...
 
int t38_terminal_free (t38_terminal_state_t *s)
 Free a T.38 context. More...
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
T38_TERMINAL_OPTION_NO_PACING 

This option enables the continuous streaming of FAX data, with no allowance for FAX machine speeds. This is usually used with TCP/TPKT transmission of T.38 FAXes

T38_TERMINAL_OPTION_REGULAR_INDICATORS 

This option enables the regular repeat transmission of indicator signals, during periods when no FAX signal transmission occurs.

T38_TERMINAL_OPTION_2S_REPEATING_INDICATORS 

This option enables the regular repeat transmission of indicator signals for the first 2s, during periods when no FAX signal transmission occurs.

T38_TERMINAL_OPTION_NO_INDICATORS 

This option suppresses the transmission of indicators. This is usually used with TCP/TPKT transmission of T.38 FAXes

Function Documentation

◆ t38_terminal_free()

int t38_terminal_free ( t38_terminal_state_t s)

Free a T.38 context.

Free a a termination mode T.38 context.

Parameters
sThe T.38 context.
Returns
0 for OK, else -1.

References t38_terminal_release().

◆ t38_terminal_get_logging_state()

logging_state_t* t38_terminal_get_logging_state ( t38_terminal_state_t s)

Get a pointer to the logging context associated with a T.38 context.

Get a pointer to the logging context associated with a T.38 context.

Parameters
sThe T.38 context.
Returns
A pointer to the logging context, or NULL.

References t38_terminal_state_s::logging.

◆ t38_terminal_get_t30_state()

t30_state_t* t38_terminal_get_t30_state ( t38_terminal_state_t s)

Get a pointer to the T.30 engine associated with a T.38 context.

Get a pointer to the T.30 engine associated with a termination mode T.38 context.

Parameters
sThe T.38 context.
Returns
A pointer to the T.30 context, or NULL.

References t38_terminal_state_s::t30.

◆ t38_terminal_get_t38_core_state()

t38_core_state_t* t38_terminal_get_t38_core_state ( t38_terminal_state_t s)

Get a pointer to the T.38 core IFP packet engine associated with a T.38 context.

Get a pointer to the T.38 core IFP packet engine associated with a termination mode T.38 context.

Parameters
sThe T.38 context.
Returns
A pointer to the T.38 core context, or NULL.

References t38_terminal_front_end_state_t::t38, and t38_terminal_state_s::t38_fe.

◆ t38_terminal_init()

t38_terminal_state_t* t38_terminal_init ( t38_terminal_state_t s,
int  calling_party,
t38_tx_packet_handler_t *  tx_packet_handler,
void *  tx_packet_user_data 
)

Initialise a termination mode T.38 context.

Parameters
sThe T.38 context.
calling_partyTRUE if the context is for a calling party. FALSE if the context is for an answering party.
tx_packet_handlerA callback routine to encapsulate and transmit T.38 packets.
tx_packet_user_dataAn opaque pointer passed to the tx_packet_handler routine.
Returns
A pointer to the termination mode T.38 context, or NULL if there was a problem.

◆ t38_terminal_release()

int t38_terminal_release ( t38_terminal_state_t s)

Release a T.38 context.

Release a termination mode T.38 context.

Parameters
sThe T.38 context.
Returns
0 for OK, else -1.

References t38_terminal_state_s::t30, and t30_release().

Referenced by t38_terminal_free().

◆ t38_terminal_restart()

int t38_terminal_restart ( t38_terminal_state_t s,
int  calling_party 
)

Reinitialise a termination mode T.38 context.

Parameters
sThe T.38 context.
calling_partyTRUE if the context is for a calling party. FALSE if the context is for an answering party.
Returns
0 for OK, else -1.

◆ t38_terminal_set_config()

void t38_terminal_set_config ( t38_terminal_state_t s,
int  config 
)

Set configuration options.

Set configuration options.

Parameters
sThe T.38 context.
configA combinations of T38_TERMINAL_OPTION_* bits.

References T38_TERMINAL_OPTION_NO_PACING.

◆ t38_terminal_set_fill_bit_removal()

void t38_terminal_set_fill_bit_removal ( t38_terminal_state_t s,
int  remove 
)

Select whether non-ECM fill bits are to be removed during transmission.

Select whether non-ECM fill bits are to be removed during transmission.

Parameters
sThe T.38 context.
removeTRUE if fill bits are to be removed.

References t38_terminal_front_end_state_t::iaf, t38_terminal_state_s::t30, T30_IAF_MODE_NO_FILL_BITS, t30_set_iaf_mode(), and t38_terminal_state_s::t38_fe.

◆ t38_terminal_set_tep_mode()

void t38_terminal_set_tep_mode ( t38_terminal_state_t s,
int  use_tep 
)

Select whether TEP time will be allowed for.

Select whether the time for talker echo protection tone will be allowed for when sending.

Parameters
sThe T.38 context.
use_tepTRUE if TEP should be allowed for.