spandsp 3.0.0
|
#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <ctype.h>
#include "floating_fudge.h"
#include <assert.h>
#include <fcntl.h>
#include <time.h>
#include <unistd.h>
#include "spandsp.h"
#include "fax_utils.h"
#include "fax_tester.h"
Classes | |
struct | xml_node_parms_s |
Macros | |
#define | SPANDSP_EXPOSE_INTERNAL_STRUCTURES |
#define | HDLC_FRAMING_OK_THRESHOLD 5 |
Functions | |
void | faxtester_send_hdlc_flags (faxtester_state_t *s, int flags) |
void | faxtester_send_hdlc_msg (faxtester_state_t *s, const uint8_t *msg, int len, int crc_ok) |
int | faxtester_rx (faxtester_state_t *s, int16_t *amp, int len) |
Apply T.30 receive processing to a block of audio samples. | |
int | faxtester_tx (faxtester_state_t *s, int16_t *amp, int max_len) |
Apply T.30 transmit processing to generate a block of audio samples. | |
void | faxtest_set_rx_silence (faxtester_state_t *s) |
void | faxtester_set_rx_type (void *user_data, int type, int bit_rate, int short_train, int use_hdlc) |
void | faxtester_set_tx_type (void *user_data, int type, int bit_rate, int short_train, int use_hdlc) |
void | faxtester_set_timeout (faxtester_state_t *s, int timeout) |
void | faxtester_set_transmit_on_idle (faxtester_state_t *s, int transmit_on_idle) |
Select whether silent audio will be sent when FAX transmit is idle. | |
void | faxtester_set_tep_mode (faxtester_state_t *s, int use_tep) |
Select whether TEP will be sent for the image modems. | |
void | faxtester_set_flush_handler (faxtester_state_t *s, faxtester_flush_handler_t handler, void *user_data) |
int | faxtester_next_step (faxtester_state_t *s) |
logging_state_t * | faxtester_get_logging_state (faxtester_state_t *s) |
Get the logging context associated with a FAX tester context. | |
faxtester_state_t * | faxtester_init (faxtester_state_t *s, const char *test_file, const char *test) |
Initialise a FAX tester context. | |
int | faxtester_release (faxtester_state_t *s) |
Release a FAX context. | |
int | faxtester_free (faxtester_state_t *s) |
Free a FAX context. | |
Variables | ||
const char * | output_tiff_file_name | |
struct { | ||
const char * tag | ||
int code | ||
} | t30_status [] | |
int faxtester_free | ( | faxtester_state_t * | s | ) |
Free a FAX context.
Free a FAX context.
s | The FAX tester context. |
References faxtester_release().
logging_state_t * faxtester_get_logging_state | ( | faxtester_state_t * | s | ) |
Get the logging context associated with a FAX tester context.
Get the logging context associated with a FAX tester context.
s | The FAX tester context. |
References faxtester_state_s::logging.
faxtester_state_t * faxtester_init | ( | faxtester_state_t * | s, |
const char * | test_file, | ||
const char * | test ) |
Initialise a FAX tester context.
Initialise a FAX tester context.
s | The FAX tester context. |
test_file | The name of the file of XML test scripts. |
test | The name of the XML script test. |
References faxtester_state_s::image_path, faxtester_state_s::logging, and t38_non_ecm_buffer_get_bit().
int faxtester_release | ( | faxtester_state_t * | s | ) |
Release a FAX context.
Release a FAX context.
s | The FAX tester context. |
References faxtester_state_s::doc.
Referenced by faxtester_free().
int faxtester_rx | ( | faxtester_state_t * | s, |
int16_t * | amp, | ||
int | len ) |
Apply T.30 receive processing to a block of audio samples.
Apply T.30 receive processing to a block of audio samples.
s | The FAX tester context. |
amp | The audio sample buffer. |
len | The number of samples in the buffer. |
References fax_modems_state_s::rx_handler, and fax_modems_state_s::rx_signal_present.
void faxtester_set_tep_mode | ( | faxtester_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 FAX tester context. |
use_tep | true if TEP should be sent. |
void faxtester_set_transmit_on_idle | ( | faxtester_state_t * | s, |
int | transmit_on_idle ) |
Select whether silent audio will be sent when FAX transmit is idle.
Select whether silent audio will be sent when FAX transmit is idle.
s | The FAX tester 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 fax_modems_state_s::transmit_on_idle.
int faxtester_tx | ( | faxtester_state_t * | s, |
int16_t * | amp, | ||
int | max_len ) |
Apply T.30 transmit processing to generate a block of audio samples.
Apply T.30 transmit processing to generate a block of audio samples.
s | The FAX tester context. |
amp | The audio sample buffer. |
max_len | The number of samples to be generated. |
References faxtester_state_s::transmit, fax_modems_state_s::transmit_on_idle, and fax_modems_state_s::tx_handler.