comparison spandsp-0.0.6pre17/src/spandsp/private/t38_terminal.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/t38_terminal.h - T.38 termination, less the packet exchange part
5 *
6 * Written by Steve Underwood <steveu@coppice.org>
7 *
8 * Copyright (C) 2005 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: t38_terminal.h,v 1.2 2008/12/31 13:57:13 steveu Exp $
26 */
27
28 /*! \file */
29
30 #if !defined(_SPANDSP_PRIVATE_T38_TERMINAL_H_)
31 #define _SPANDSP_PRIVATE_T38_TERMINAL_H_
32
33 typedef struct
34 {
35 /*! \brief Internet Aware FAX mode bit mask. */
36 int iaf;
37 /*! \brief Required time between T.38 transmissions, in ms. */
38 int ms_per_tx_chunk;
39 /*! \brief Bit fields controlling the way data is packed into chunked for transmission. */
40 int chunking_modes;
41
42 /*! \brief Core T.38 IFP support */
43 t38_core_state_t t38;
44
45 /*! \brief The current transmit step being timed */
46 int timed_step;
47
48 /*! \brief TRUE is there has been some T.38 data missed (i.e. lost packets) in the current
49 reception period. */
50 int rx_data_missing;
51
52 /*! \brief The number of octets to send in each image packet (non-ECM or ECM) at the current
53 rate and the current specified packet interval. */
54 int octets_per_data_packet;
55
56 struct
57 {
58 /*! \brief HDLC receive buffer */
59 uint8_t buf[T38_MAX_HDLC_LEN];
60 /*! \brief The length of the contents of the HDLC receive buffer */
61 int len;
62 } hdlc_rx;
63
64 struct
65 {
66 /*! \brief HDLC transmit buffer */
67 uint8_t buf[T38_MAX_HDLC_LEN];
68 /*! \brief The length of the contents of the HDLC transmit buffer */
69 int len;
70 /*! \brief Current pointer within the contents of the HDLC transmit buffer */
71 int ptr;
72 /*! \brief The number of extra bits in a fully stuffed version of the
73 contents of the HDLC transmit buffer. This is needed to accurately
74 estimate the playout time for this frame, through an analogue modem. */
75 int extra_bits;
76 } hdlc_tx;
77
78 /*! \brief Counter for trailing non-ECM bytes, used to flush out the far end's modem. */
79 int non_ecm_trailer_bytes;
80
81 /*! \brief The next T.38 indicator queued for transmission. */
82 int next_tx_indicator;
83 /*! \brief The current T.38 data type being transmitted. */
84 int current_tx_data_type;
85
86 /*! \brief TRUE if a carrier is present. Otherwise FALSE. */
87 int rx_signal_present;
88
89 /*! \brief The current operating mode of the receiver. */
90 int current_rx_type;
91 /*! \brief The current operating mode of the transmitter. */
92 int current_tx_type;
93
94 /*! \brief Current transmission bit rate. */
95 int tx_bit_rate;
96 /*! \brief A "sample" count, used to time events. */
97 int32_t samples;
98 /*! \brief The value for samples at the next transmission point. */
99 int32_t next_tx_samples;
100 /*! \brief The current receive timeout. */
101 int32_t timeout_rx_samples;
102 } t38_terminal_front_end_state_t;
103
104 /*!
105 T.38 terminal state.
106 */
107 struct t38_terminal_state_s
108 {
109 /*! \brief The T.30 back-end */
110 t30_state_t t30;
111
112 /*! \brief The T.38 front-end */
113 t38_terminal_front_end_state_t t38_fe;
114
115 /*! \brief Error and flow logging control */
116 logging_state_t logging;
117 };
118
119 #endif
120 /*- End of file ------------------------------------------------------------*/

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.