spandsp
0.0.6
Main Page
Related Pages
Classes
Files
File List
File Members
private/fax_modems.h
Go to the documentation of this file.
1
/*
2
* SpanDSP - a series of DSP components for telephony
3
*
4
* private/fax_modems.h - definitions for the analogue modem set for fax processing
5
*
6
* Written by Steve Underwood <steveu@coppice.org>
7
*
8
* Copyright (C) 2008 Steve Underwood
9
*
10
* All rights reserved.
11
*
12
* This program is free software; you can redistribute it and/or modify
13
* it under the terms of the GNU Lesser General Public License version 2.1,
14
* as published by the Free Software Foundation.
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Lesser General Public License for more details.
20
*
21
* You should have received a copy of the GNU Lesser General Public
22
* License along with this program; if not, write to the Free Software
23
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
*/
25
26
/*! \file */
27
28
#if !defined(_SPANDSP_PRIVATE_FAX_MODEMS_H_)
29
#define _SPANDSP_PRIVATE_FAX_MODEMS_H_
30
31
/*!
32
The set of modems needed for FAX, plus the auxilliary stuff, like tone generation.
33
*/
34
struct
fax_modems_state_s
35
{
36
/*! TRUE is talker echo protection should be sent for the image modems */
37
int
use_tep
;
38
39
/*! If TRUE, transmit silence when there is nothing else to transmit. If FALSE return only
40
the actual generated audio. Note that this only affects untimed silences. Timed silences
41
(e.g. the 75ms silence between V.21 and a high speed modem) will alway be transmitted as
42
silent audio. */
43
int
transmit_on_idle
;
44
45
/*! \brief An HDLC context used when transmitting HDLC messages. */
46
hdlc_tx_state_t
hdlc_tx
;
47
/*! \brief An HDLC context used when receiving HDLC messages. */
48
hdlc_rx_state_t
hdlc_rx
;
49
/*! \brief A V.21 FSK modem context used when transmitting HDLC over V.21
50
messages. */
51
fsk_tx_state_t
v21_tx
;
52
/*! \brief A V.21 FSK modem context used when receiving HDLC over V.21
53
messages. */
54
fsk_rx_state_t
v21_rx
;
55
/*! \brief A V.17 modem context used when sending FAXes at 7200bps, 9600bps
56
12000bps or 14400bps */
57
v17_tx_state_t
v17_tx
;
58
/*! \brief A V.29 modem context used when receiving FAXes at 7200bps, 9600bps
59
12000bps or 14400bps */
60
v17_rx_state_t
v17_rx
;
61
/*! \brief A V.29 modem context used when sending FAXes at 7200bps or
62
9600bps */
63
v29_tx_state_t
v29_tx
;
64
/*! \brief A V.29 modem context used when receiving FAXes at 7200bps or
65
9600bps */
66
v29_rx_state_t
v29_rx
;
67
/*! \brief A V.27ter modem context used when sending FAXes at 2400bps or
68
4800bps */
69
v27ter_tx_state_t
v27ter_tx
;
70
/*! \brief A V.27ter modem context used when receiving FAXes at 2400bps or
71
4800bps */
72
v27ter_rx_state_t
v27ter_rx
;
73
/*! \brief Used to insert timed silences. */
74
silence_gen_state_t
silence_gen
;
75
/*! \brief CED or CNG generator */
76
modem_connect_tones_tx_state_t
connect_tx
;
77
/*! \brief CED or CNG detector */
78
modem_connect_tones_rx_state_t
connect_rx
;
79
/*! \brief */
80
dc_restore_state_t
dc_restore;
81
82
/*! \brief The currently select receiver type */
83
int
current_rx_type
;
84
/*! \brief The currently select transmitter type */
85
int
current_tx_type
;
86
87
/*! \brief TRUE if a carrier is present. Otherwise FALSE. */
88
int
rx_signal_present
;
89
/*! \brief TRUE if a modem has trained correctly. */
90
int
rx_trained
;
91
/*! \brief TRUE if an HDLC frame has been received correctly. */
92
int
rx_frame_received
;
93
94
/*! The current receive signal handler */
95
span_rx_handler_t *
rx_handler
;
96
/*! The current receive missing signal fill-in handler */
97
span_rx_fillin_handler_t *
rx_fillin_handler
;
98
void
*rx_user_data;
99
100
/*! The current transmit signal handler */
101
span_tx_handler_t *
tx_handler
;
102
void
*tx_user_data;
103
104
/*! The next transmit signal handler, for two stage transmit operations.
105
E.g. a short silence followed by a modem signal. */
106
span_tx_handler_t *
next_tx_handler
;
107
void
*next_tx_user_data;
108
109
/*! The current bit rate of the transmitter. */
110
int
tx_bit_rate
;
111
/*! The current bit rate of the receiver. */
112
int
rx_bit_rate
;
113
114
/*! If TRUE, transmission is in progress */
115
int
transmit
;
116
/*! \brief Audio logging file handle for received audio. */
117
int
audio_rx_log
;
118
/*! \brief Audio logging file handle for transmitted audio. */
119
int
audio_tx_log
;
120
/*! \brief Error and flow logging control */
121
logging_state_t
logging
;
122
};
123
124
#endif
125
/*- End of file ------------------------------------------------------------*/
src
spandsp
private
fax_modems.h
Generated by
1.8.1.1