Go to the documentation of this file.
28 #if !defined(_SPANDSP_FAX_UTILS_H_)
29 #define _SPANDSP_FAX_UTILS_H_
31 #if defined(__cplusplus)
36 void fax_log_tx_parameters(
t30_state_t *s,
const char *tag);
38 void fax_log_rx_parameters(
t30_state_t *s,
const char *tag);
40 void fax_log_page_transfer_statistics(
t30_state_t *s,
const char *tag);
42 void fax_log_final_transfer_statistics(
t30_state_t *s,
const char *tag);
44 int get_tiff_total_pages(
const char *file);
46 #if defined(__cplusplus)
void t30_set_rx_file(t30_state_t *s, const char *file, int stop_page)
Set next receive file name.
Definition: t30_api.c:614
const char * t30_get_rx_model(t30_state_t *s)
Get the name of the model of the remote FAX machine associated with a T.30 context.
Definition: t30_api.c:608
int bit_rate
The current bit rate for image transfer.
Definition: t30.h:521
int t30_set_tx_nsf(t30_state_t *s, const uint8_t *nsf, int len)
Set the transmitted NSF frame to be associated with a T.30 context.
Definition: t30_api.c:271
const char * t30_get_rx_vendor(t30_state_t *s)
Get the name of the vendor of the remote FAX machine associated with a T.30 context.
Definition: t30_api.c:602
@ T30_SUPPORT_T6_COMPRESSION
Definition: t30.h:362
const char * t30_completion_code_to_str(int result)
Convert a phase E completion code to a short text description.
Definition: t30_logging.c:108
@ T30_SUPPORT_600_1200_RESOLUTION
Definition: t30.h:408
@ T30_SUPPORT_300_300_RESOLUTION
Definition: t30.h:396
int t30_set_minimum_scan_line_time(t30_state_t *s, int min_time)
Specify minimum scan line time.
Definition: t30_api.c:659
void fax_set_transmit_on_idle(fax_state_t *s, int transmit_on_idle)
Select whether silent audio will be sent when FAX transmit is idle.
Definition: fax.c:579
int error_correcting_mode_retries
The number of HDLC frame retries, if error correcting mode is used.
Definition: t30.h:547
int x_resolution
The horizontal column-to-column resolution of the most recent page, in pixels per metre.
Definition: t30.h:531
void t30_set_document_handler(t30_state_t *s, t30_document_handler_t *handler, void *user_data)
Set a callback function for T.30 end of document handling.
Definition: t30_api.c:770
fax_state_t * fax_init(fax_state_t *s, int calling_party)
Initialise a FAX context.
Definition: fax.c:664
int t30_set_supported_compressions(t30_state_t *s, int supported_compressions)
Specify supported compression types.
Definition: t30_api.c:688
void t30_set_real_time_frame_handler(t30_state_t *s, t30_real_time_frame_handler_t *handler, void *user_data)
Set a callback function for T.30 frame exchange monitoring.
Definition: t30_api.c:777
const char * t30_frametype(uint8_t x)
Return a text name for a T.30 frame type.
Definition: t30_logging.c:241
@ T30_PIP
Definition: t30_fcf.h:87
Definition: private/awgn.h:33
const char * t30_get_rx_country(t30_state_t *s)
Get the country of origin of the remote FAX machine associated with a T.30 context.
Definition: t30_api.c:596
int y_resolution
The vertical row-to-row resolution of the most recent page, in pixels per metre.
Definition: t30.h:533
const char * t30_get_rx_sub_address(t30_state_t *s)
Get the received sub-address associated with a T.30 context.
Definition: t30_api.c:143
int t30_set_rx_encoding(t30_state_t *s, int encoding)
Specify the output encoding for TIFF files created during FAX reception.
Definition: t30_api.c:645
@ T30_SUPPORT_SUB_ADDRESSING
Definition: t30.h:435
const char * t30_get_rx_selective_polling_address(t30_state_t *s)
Get the received selective polling address associated with a T.30 context.
Definition: t30_api.c:173
@ T30_SUPPORT_SELECTIVE_POLLING
Definition: t30.h:429
const char * t30_get_tx_ident(t30_state_t *s)
Set the transmitted identifier associated with a T.30 context.
Definition: t30_api.c:105
const char * t30_get_tx_sub_address(t30_state_t *s)
Get the received sub-address associated with a T.30 context.
Definition: t30_api.c:135
int encoding
The type of compression used between the FAX machines.
Definition: t30.h:541
const char * t30_get_tx_selective_polling_address(t30_state_t *s)
Get the received selective polling address associated with a T.30 context.
Definition: t30_api.c:165
union t30_state_s::@57 t4
T.4 context for reading or writing image data.
int t30_set_tx_sub_address(t30_state_t *s, const char *sub_address)
Set the transmitted sub-address associated with a T.30 context.
Definition: t30_api.c:121
const char * t30_get_rx_ident(t30_state_t *s)
Set the transmitted identifier associated with a T.30 context.
Definition: t30_api.c:113
void fax_set_tep_mode(fax_state_t *s, int use_tep)
Select whether TEP will be sent for the image modems.
Definition: fax.c:585
int error_correcting_mode
TRUE if error correcting mode is used.
Definition: t30.h:523
@ T30_SUPPORT_600_600_RESOLUTION
Definition: t30.h:400
@ T30_PRI_EOM
Definition: t30_fcf.h:75
@ T30_SUPPORT_300_600_RESOLUTION
Definition: t30.h:404
int pages_in_file
The number of pages in the file (<0 if not known).
Definition: t30.h:529
@ T30_SUPPORT_T4_2D_COMPRESSION
Definition: t30.h:360
Definition: fax_tests.c:60
int t30_set_tx_sender_ident(t30_state_t *s, const char *sender_ident)
Set the transmitted sender ident associated with a T.30 context.
Definition: t30_api.c:211
@ T30_SUPPORT_V29
Definition: t30.h:344
@ T30_SUPPORT_400_400_RESOLUTION
Definition: t30.h:398
const char * t30_get_rx_polled_sub_address(t30_state_t *s)
Get the received polled sub-address associated with a T.30 context.
Definition: t30_api.c:203
const char * t30_get_rx_sender_ident(t30_state_t *s)
Get the received sender ident associated with a T.30 context.
Definition: t30_api.c:233
int t30_set_supported_resolutions(t30_state_t *s, int supported_resolutions)
Specify supported resolutions.
Definition: t30_api.c:708
logging_state_t * t30_get_logging_state(t30_state_t *s)
Get a pointer to the logging context associated with a T.30 context.
Definition: t30_api.c:784
int image_size
The size of the image, in bytes.
Definition: t30.h:539
@ T30_SUPPORT_V27TER
Definition: t30.h:342
@ T30_SUPPORT_R8_RESOLUTION
Definition: t30.h:391
int state
The current state of the T.30 state machine.
Definition: private/t30.h:146
Definition: private/fax.h:36
const char * t30_get_tx_sender_ident(t30_state_t *s)
Get the received sender ident associated with a T.30 context.
Definition: t30_api.c:225
@ T30_SUPPORT_R16_RESOLUTION
Definition: t30.h:393
@ T30_PRI_MPS
Definition: t30_fcf.h:76
int t30_set_supported_image_sizes(t30_state_t *s, int supported_image_sizes)
Specify supported image sizes.
Definition: t30_api.c:716
@ T30_SUPPORT_FINE_RESOLUTION
Definition: t30.h:384
@ T30_PRI_EOP
Definition: t30_fcf.h:77
int t30_set_tx_selective_polling_address(t30_state_t *s, const char *selective_polling_address)
Set the transmitted selective polling address associated with a T.30 context.
Definition: t30_api.c:151
@ T4_COMPRESSION_ITU_T6
Definition: t4_rx.h:58
void t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t)
Get the current transfer statistics.
Definition: t30.c:6229
void t30_set_phase_d_handler(t30_state_t *s, t30_phase_d_handler_t *handler, void *user_data)
Set a callback function for T.30 phase D handling.
Definition: t30_api.c:756
const char * t30_get_tx_password(t30_state_t *s)
Get the received password associated with a T.30 context.
Definition: t30_api.c:255
void t30_set_tx_file(t30_state_t *s, const char *file, int start_page, int stop_page)
Set next transmit file name.
Definition: t30_api.c:622
@ T30_SUPPORT_1200_1200_RESOLUTION
Definition: t30.h:402
Definition: private/t30.h:36
void t30_set_phase_b_handler(t30_state_t *s, t30_phase_b_handler_t *handler, void *user_data)
Set a callback function for T.30 phase B handling.
Definition: t30_api.c:749
int width
The number of horizontal pixels in the most recent page.
Definition: t30.h:535
logging_state_t logging
Error and flow logging control.
Definition: private/t4_tx.h:104
t30_state_t * fax_get_t30_state(fax_state_t *s)
Get a pointer to the T.30 engine associated with a FAX context.
Definition: fax.c:591
@ T30_PIN
Definition: t30_fcf.h:88
void t30_set_phase_e_handler(t30_state_t *s, t30_phase_e_handler_t *handler, void *user_data)
Set a callback function for T.30 phase E handling.
Definition: t30_api.c:763
int length
The number of vertical pixels in the most recent page.
Definition: t30.h:537
const char * t4_encoding_to_str(int encoding)
Get the short text name of an encoding format.
Definition: t4_rx.c:1148
int t30_set_supported_t30_features(t30_state_t *s, int supported_t30_features)
Specify supported T.30 features.
Definition: t30_api.c:724
int fax_release(fax_state_t *s)
Release a FAX context.
Definition: fax.c:719
@ T30_SUPPORT_SUPERFINE_RESOLUTION
Definition: t30.h:386
int bad_rows
The number of bad pixel rows in the most recent page.
Definition: t30.h:543
int pages_rx
The number of pages received so far.
Definition: t30.h:527
int t30_set_receiver_not_ready(t30_state_t *s, int count)
Specify a period of responding with receiver not ready.
Definition: t30_api.c:742
@ T30_SUPPORT_T4_1D_COMPRESSION
Definition: t30.h:358
@ T30_SUPPORT_STANDARD_RESOLUTION
Definition: t30.h:382
int pages_tx
The number of pages sent so far.
Definition: t30.h:525
@ T30_SUPPORT_IDENTIFICATION
Definition: t30.h:427
const char * t30_get_tx_polled_sub_address(t30_state_t *s)
Get the received polled sub-address associated with a T.30 context.
Definition: t30_api.c:195
int t30_set_supported_modems(t30_state_t *s, int supported_modems)
Specify supported modems.
Definition: t30_api.c:680
logging_state_t * fax_get_logging_state(fax_state_t *s)
Get a pointer to the logging context associated with a FAX context.
Definition: fax.c:597
@ T30_SUPPORT_V17
Definition: t30.h:346
const char * t30_get_rx_password(t30_state_t *s)
Get the received password associated with a T.30 context.
Definition: t30_api.c:263
int longest_bad_row_run
The largest number of bad pixel rows in a block in the most recent page.
Definition: t30.h:545
@ T30_SUPPORT_400_800_RESOLUTION
Definition: t30.h:406
int t30_set_tx_ident(t30_state_t *s, const char *id)
Set the transmitted identifier associated with a T.30 context.
Definition: t30_api.c:90
Definition: private/logging.h:34
@ T30_SUPPORT_T85_COMPRESSION
Definition: t30.h:364
int t30_set_ecm_capability(t30_state_t *s, int enabled)
Select ECM capability.
Definition: t30_api.c:637
int t30_set_tx_page_header_info(t30_state_t *s, const char *info)
Set the transmitted header information associated with a T.30 context.
Definition: t30_api.c:561
int t30_set_tx_polled_sub_address(t30_state_t *s, const char *polled_sub_address)
Set the transmitted polled sub-address associated with a T.30 context.
Definition: t30_api.c:181
void t30_local_interrupt_request(t30_state_t *s, int state)
Request a local interrupt of FAX exchange.
Definition: t30.c:6269
int t30_set_tx_password(t30_state_t *s, const char *password)
Set the transmitted password associated with a T.30 context.
Definition: t30_api.c:241