spandsp 0.0.6
t31_tests.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <sndfile.h>
#include "spandsp.h"
#include "spandsp/t30_fcf.h"
#include "spandsp-sim.h"
#include "fax_utils.h"

Classes

struct  command_response_s
 

Macros

#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
 
#define INPUT_FILE_NAME   "../test-data/itu/fax/itu1.tif"
 
#define OUTPUT_FILE_NAME   "t31.tif"
 
#define OUTPUT_WAVE_FILE_NAME   "t31_tests.wav"
 
#define MANUFACTURER   "www.soft-switch.org"
 
#define SAMPLES_PER_CHUNK   160
 
#define EXCHANGE(a, b)   {a, sizeof(a) - 1, b, sizeof(b) - 1}
 
#define RESPONSE(b)   {"", 0, b, sizeof(b) - 1}
 
#define FAST_RESPONSE(b)   {NULL, -1, b, sizeof(b) - 1}
 
#define FAST_SEND(b)   {(const char *) 1, -2, b, sizeof(b) - 1}
 
#define FAST_SEND_TCF(b)   {(const char *) 2, -2, b, sizeof(b) - 1}
 
#define END_OF_SEQUENCE   {NULL, -1, NULL, -1}
 

Enumerations

enum  { ETX = 0x03 , DLE = 0x10 , SUB = 0x1A }
 

Functions

int main (int argc, char *argv[])
 

Variables

g1050_state_tpath_a_to_b
 
g1050_state_tpath_b_to_a
 
double when = 0.0
 
int t38_mode = FALSE
 
char * decode_test_file = NULL
 
int countdown = 0
 
int command_response_test_step = -1
 
char response_buf [1000]
 
int response_buf_ptr = 0
 
int answered = FALSE
 
int kick = FALSE
 
int dled = FALSE
 
int done = FALSE
 
int sequence_terminated = FALSE
 
int test_seq_ptr = 0
 
t31_state_tt31_state