#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <fcntl.h>
#include <time.h>
#include "floating_fudge.h"
#include <tiffio.h>
#include "spandsp/telephony.h"
#include "spandsp/logging.h"
#include "spandsp/bit_operations.h"
#include "spandsp/queue.h"
#include "spandsp/power_meter.h"
#include "spandsp/complex.h"
#include "spandsp/tone_generate.h"
#include "spandsp/async.h"
#include "spandsp/hdlc.h"
#include "spandsp/fsk.h"
#include "spandsp/v29rx.h"
#include "spandsp/v29tx.h"
#include "spandsp/v27ter_rx.h"
#include "spandsp/v27ter_tx.h"
#include "spandsp/t4.h"
#include "spandsp/t30_fcf.h"
#include "spandsp/t35.h"
#include "spandsp/t30.h"
#include "spandsp/t30_api.h"
#include "spandsp/t30_logging.h"
#include "spandsp/private/logging.h"
#include "spandsp/private/t4.h"
#include "spandsp/private/t30.h"
#include "t30_local.h"
Defines | |
#define | MAX_MESSAGE_TRIES 3 |
#define | ms_to_samples(t) (((t)*SAMPLE_RATE)/1000) |
#define | DEFAULT_TIMER_T0 60000 |
#define | DEFAULT_TIMER_T1 35000 |
#define | DEFAULT_TIMER_T2 7000 |
#define | DEFAULT_TIMER_T2A 3000 |
#define | DEFAULT_TIMER_T2B 200 |
#define | DEFAULT_TIMER_T3 15000 |
#define | DEFAULT_TIMER_T4 3450 |
#define | DEFAULT_TIMER_T4A 3000 |
#define | DEFAULT_TIMER_T4B 200 |
#define | DEFAULT_TIMER_T5 65000 |
#define | DEFAULT_TIMER_T6 5000 |
#define | DEFAULT_TIMER_T7 7000 |
#define | DEFAULT_TIMER_T8 10000 |
#define | FINAL_FLUSH_TIME 1000 |
#define | PPR_LIMIT_BEFORE_CTC_OR_EOR 4 |
#define | T30_V17_FALLBACK_START 0 |
#define | T30_V29_FALLBACK_START 3 |
#define | T30_V27TER_FALLBACK_START 6 |
#define | test_ctrl_bit(s, bit) ((s)[3 + ((bit - 1)/8)] & (1 << ((bit - 1)%8))) |
#define | set_ctrl_bit(s, bit) (s)[3 + ((bit - 1)/8)] |= (1 << ((bit - 1)%8)) |
#define | set_ctrl_bits(s, val, bit) (s)[3 + ((bit - 1)/8)] |= ((val) << ((bit - 1)%8)) |
#define | clr_ctrl_bit(s, bit) (s)[3 + ((bit - 1)/8)] &= ~(1 << ((bit - 1)%8)) |
Enumerations | |
enum | { T30_PHASE_IDLE = 0, T30_PHASE_A_CED, T30_PHASE_A_CNG, T30_PHASE_B_RX, T30_PHASE_B_TX, T30_PHASE_C_NON_ECM_RX, T30_PHASE_C_NON_ECM_TX, T30_PHASE_C_ECM_RX, T30_PHASE_C_ECM_TX, T30_PHASE_D_RX, T30_PHASE_D_TX, T30_PHASE_E, T30_PHASE_CALL_FINISHED } |
enum | { T30_STATE_ANSWERING = 1, T30_STATE_B, T30_STATE_C, T30_STATE_D, T30_STATE_D_TCF, T30_STATE_D_POST_TCF, T30_STATE_F_TCF, T30_STATE_F_CFR, T30_STATE_F_FTT, T30_STATE_F_DOC_NON_ECM, T30_STATE_F_POST_DOC_NON_ECM, T30_STATE_F_DOC_ECM, T30_STATE_F_POST_DOC_ECM, T30_STATE_F_POST_RCP_MCF, T30_STATE_F_POST_RCP_PPR, T30_STATE_F_POST_RCP_RNR, T30_STATE_R, T30_STATE_T, T30_STATE_I, T30_STATE_II, T30_STATE_II_Q, T30_STATE_III_Q_MCF, T30_STATE_III_Q_RTP, T30_STATE_III_Q_RTN, T30_STATE_IV, T30_STATE_IV_PPS_NULL, T30_STATE_IV_PPS_Q, T30_STATE_IV_PPS_RNR, T30_STATE_IV_CTC, T30_STATE_IV_EOR, T30_STATE_IV_EOR_RNR, T30_STATE_CALL_FINISHED } |
enum | { T30_MIN_SCAN_20MS = 0, T30_MIN_SCAN_5MS = 1, T30_MIN_SCAN_10MS = 2, T30_MIN_SCAN_40MS = 4, T30_MIN_SCAN_0MS = 7 } |
enum | { T30_MODE_SEND_DOC = 1, T30_MODE_RECEIVE_DOC } |
enum | { T30_COPY_QUALITY_PERFECT = 0, T30_COPY_QUALITY_GOOD, T30_COPY_QUALITY_POOR, T30_COPY_QUALITY_BAD } |
enum | { DISBIT1 = 0x01, DISBIT2 = 0x02, DISBIT3 = 0x04, DISBIT4 = 0x08, DISBIT5 = 0x10, DISBIT6 = 0x20, DISBIT7 = 0x40, DISBIT8 = 0x80 } |
enum | { OPERATION_IN_PROGRESS_NONE = 0, OPERATION_IN_PROGRESS_T4_RX, OPERATION_IN_PROGRESS_T4_TX } |
enum | { TIMER_IS_T2 = 0, TIMER_IS_T2A = 1, TIMER_IS_T2B = 2, TIMER_IS_T2C = 3, TIMER_IS_T4 = 4, TIMER_IS_T4A = 5, TIMER_IS_T4B = 6, TIMER_IS_T4C = 7 } |
Functions | |
int | t30_build_dis_or_dtc (t30_state_t *s) |
SPAN_DECLARE_NONSTD (void) | |
SPAN_DECLARE (void) | |
Cleanup a T.30 context if the call terminates. | |
SPAN_DECLARE_NONSTD (int) | |
Get the next bit of data from a T.38 rate adapting non-ECM buffer context. | |
SPAN_DECLARE (int) | |
Release a V.8 context. | |
SPAN_DECLARE (t30_state_t *) | |
Get a pointer to the T.30 engine associated with a T.38 context. |
|
These are internal assessments of received image quality, used to determine whether we continue, retrain, or abandon the call. |
|
There are high level indications of what is happening at any instant, to guide the cleanup process if the call is abandoned. |
|
Get a pointer to the T.30 engine associated with a T.38 context. Initialise a T.30 context.
|
|
Release a V.8 context. Compress a block of octets.
|
|
Cleanup a T.30 context if the call terminates. Log the list of supported modulations.
|
|
Get the next bit of data from a T.38 rate adapting non-ECM buffer context. A dummy routine to use as a receive callback, when we aren't really trying to process what is received. It just absorbs and ignores the data.
|