Mercurial > hg > audiostuff
comparison spandsp-0.0.6pre17/src/spandsp/private/fax_modems.h @ 4:26cd8f1ef0b1
import spandsp-0.0.6pre17
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 15:50:58 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3:c6c5a16ce2f2 | 4:26cd8f1ef0b1 |
---|---|
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 * $Id: fax_modems.h,v 1.4 2009/09/04 14:38:47 steveu Exp $ | |
26 */ | |
27 | |
28 /*! \file */ | |
29 | |
30 #if !defined(_SPANDSP_PRIVATE_FAX_MODEMS_H_) | |
31 #define _SPANDSP_PRIVATE_FAX_MODEMS_H_ | |
32 | |
33 /*! | |
34 The set of modems needed for FAX, plus the auxilliary stuff, like tone generation. | |
35 */ | |
36 struct fax_modems_state_s | |
37 { | |
38 /*! TRUE is talker echo protection should be sent for the image modems */ | |
39 int use_tep; | |
40 | |
41 /*! If TRUE, transmit silence when there is nothing else to transmit. If FALSE return only | |
42 the actual generated audio. Note that this only affects untimed silences. Timed silences | |
43 (e.g. the 75ms silence between V.21 and a high speed modem) will alway be transmitted as | |
44 silent audio. */ | |
45 int transmit_on_idle; | |
46 | |
47 /*! \brief An HDLC context used when transmitting HDLC messages. */ | |
48 hdlc_tx_state_t hdlc_tx; | |
49 /*! \brief An HDLC context used when receiving HDLC messages. */ | |
50 hdlc_rx_state_t hdlc_rx; | |
51 /*! \brief A V.21 FSK modem context used when transmitting HDLC over V.21 | |
52 messages. */ | |
53 fsk_tx_state_t v21_tx; | |
54 /*! \brief A V.21 FSK modem context used when receiving HDLC over V.21 | |
55 messages. */ | |
56 fsk_rx_state_t v21_rx; | |
57 /*! \brief A V.17 modem context used when sending FAXes at 7200bps, 9600bps | |
58 12000bps or 14400bps */ | |
59 v17_tx_state_t v17_tx; | |
60 /*! \brief A V.29 modem context used when receiving FAXes at 7200bps, 9600bps | |
61 12000bps or 14400bps */ | |
62 v17_rx_state_t v17_rx; | |
63 /*! \brief A V.29 modem context used when sending FAXes at 7200bps or | |
64 9600bps */ | |
65 v29_tx_state_t v29_tx; | |
66 /*! \brief A V.29 modem context used when receiving FAXes at 7200bps or | |
67 9600bps */ | |
68 v29_rx_state_t v29_rx; | |
69 /*! \brief A V.27ter modem context used when sending FAXes at 2400bps or | |
70 4800bps */ | |
71 v27ter_tx_state_t v27ter_tx; | |
72 /*! \brief A V.27ter modem context used when receiving FAXes at 2400bps or | |
73 4800bps */ | |
74 v27ter_rx_state_t v27ter_rx; | |
75 /*! \brief Used to insert timed silences. */ | |
76 silence_gen_state_t silence_gen; | |
77 /*! \brief CED or CNG generator */ | |
78 modem_connect_tones_tx_state_t connect_tx; | |
79 /*! \brief CED or CNG detector */ | |
80 modem_connect_tones_rx_state_t connect_rx; | |
81 /*! \brief */ | |
82 dc_restore_state_t dc_restore; | |
83 | |
84 /*! \brief The currently select receiver type */ | |
85 int current_rx_type; | |
86 /*! \brief The currently select transmitter type */ | |
87 int current_tx_type; | |
88 | |
89 /*! \brief TRUE if a carrier is present. Otherwise FALSE. */ | |
90 int rx_signal_present; | |
91 /*! \brief TRUE if a modem has trained correctly. */ | |
92 int rx_trained; | |
93 /*! \brief TRUE if an HDLC frame has been received correctly. */ | |
94 int rx_frame_received; | |
95 | |
96 /*! The current receive signal handler */ | |
97 span_rx_handler_t *rx_handler; | |
98 /*! The current receive missing signal fill-in handler */ | |
99 span_rx_fillin_handler_t *rx_fillin_handler; | |
100 void *rx_user_data; | |
101 | |
102 /*! The current transmit signal handler */ | |
103 span_tx_handler_t *tx_handler; | |
104 void *tx_user_data; | |
105 | |
106 /*! The next transmit signal handler, for two stage transmit operations. | |
107 E.g. a short silence followed by a modem signal. */ | |
108 span_tx_handler_t *next_tx_handler; | |
109 void *next_tx_user_data; | |
110 | |
111 /*! The current bit rate of the transmitter. */ | |
112 int tx_bit_rate; | |
113 /*! The current bit rate of the receiver. */ | |
114 int rx_bit_rate; | |
115 | |
116 /*! If TRUE, transmission is in progress */ | |
117 int transmit; | |
118 /*! \brief Audio logging file handle for received audio. */ | |
119 int audio_rx_log; | |
120 /*! \brief Audio logging file handle for transmitted audio. */ | |
121 int audio_tx_log; | |
122 /*! \brief Error and flow logging control */ | |
123 logging_state_t logging; | |
124 }; | |
125 | |
126 #endif | |
127 /*- End of file ------------------------------------------------------------*/ |