spandsp  0.0.6
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 */
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. */
44 
45  /*! \brief An HDLC context used when transmitting HDLC messages. */
47  /*! \brief An HDLC context used when receiving HDLC messages. */
49  /*! \brief A V.21 FSK modem context used when transmitting HDLC over V.21
50  messages. */
52  /*! \brief A V.21 FSK modem context used when receiving HDLC over V.21
53  messages. */
55  /*! \brief A V.17 modem context used when sending FAXes at 7200bps, 9600bps
56  12000bps or 14400bps */
58  /*! \brief A V.29 modem context used when receiving FAXes at 7200bps, 9600bps
59  12000bps or 14400bps */
61  /*! \brief A V.29 modem context used when sending FAXes at 7200bps or
62  9600bps */
64  /*! \brief A V.29 modem context used when receiving FAXes at 7200bps or
65  9600bps */
67  /*! \brief A V.27ter modem context used when sending FAXes at 2400bps or
68  4800bps */
70  /*! \brief A V.27ter modem context used when receiving FAXes at 2400bps or
71  4800bps */
73  /*! \brief Used to insert timed silences. */
75  /*! \brief CED or CNG generator */
77  /*! \brief CED or CNG detector */
79  /*! \brief */
80  dc_restore_state_t dc_restore;
81 
82  /*! \brief The currently select receiver type */
84  /*! \brief The currently select transmitter type */
86 
87  /*! \brief TRUE if a carrier is present. Otherwise FALSE. */
89  /*! \brief TRUE if a modem has trained correctly. */
91  /*! \brief TRUE if an HDLC frame has been received correctly. */
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. */
111  /*! The current bit rate of the receiver. */
113 
114  /*! If TRUE, transmission is in progress */
115  int transmit;
116  /*! \brief Audio logging file handle for received audio. */
118  /*! \brief Audio logging file handle for transmitted audio. */
120  /*! \brief Error and flow logging control */
122 };
123 
124 #endif
125 /*- End of file ------------------------------------------------------------*/