Mercurial > hg > audiostuff
comparison spandsp-0.0.6pre17/src/spandsp/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 * 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.41 2009/02/03 16:28:41 steveu Exp $ | |
26 */ | |
27 | |
28 /*! \file */ | |
29 | |
30 #if !defined(_SPANDSP_T38_TERMINAL_H_) | |
31 #define _SPANDSP_T38_TERMINAL_H_ | |
32 | |
33 /*! \page t38_terminal_page T.38 real time FAX over IP termination | |
34 \section t38_terminal_page_sec_1 What does it do? | |
35 | |
36 \section t38_terminal_page_sec_2 How does it work? | |
37 */ | |
38 | |
39 /* Make sure the HDLC frame buffers are big enough for ECM frames. */ | |
40 #define T38_MAX_HDLC_LEN 260 | |
41 | |
42 typedef struct t38_terminal_state_s t38_terminal_state_t; | |
43 | |
44 #if defined(__cplusplus) | |
45 extern "C" | |
46 { | |
47 #endif | |
48 | |
49 SPAN_DECLARE(int) t38_terminal_send_timeout(t38_terminal_state_t *s, int samples); | |
50 | |
51 SPAN_DECLARE(void) t38_terminal_set_config(t38_terminal_state_t *s, int without_pacing); | |
52 | |
53 /*! Select whether the time for talker echo protection tone will be allowed for when sending. | |
54 \brief Select whether TEP time will be allowed for. | |
55 \param s The T.38 context. | |
56 \param use_tep TRUE if TEP should be allowed for. | |
57 */ | |
58 SPAN_DECLARE(void) t38_terminal_set_tep_mode(t38_terminal_state_t *s, int use_tep); | |
59 | |
60 /*! Select whether non-ECM fill bits are to be removed during transmission. | |
61 \brief Select whether non-ECM fill bits are to be removed during transmission. | |
62 \param s The T.38 context. | |
63 \param remove TRUE if fill bits are to be removed. | |
64 */ | |
65 SPAN_DECLARE(void) t38_terminal_set_fill_bit_removal(t38_terminal_state_t *s, int remove); | |
66 | |
67 /*! Get a pointer to the T.30 engine associated with a termination mode T.38 context. | |
68 \brief Get a pointer to the T.30 engine associated with a T.38 context. | |
69 \param s The T.38 context. | |
70 \return A pointer to the T.30 context, or NULL. | |
71 */ | |
72 SPAN_DECLARE(t30_state_t *) t38_terminal_get_t30_state(t38_terminal_state_t *s); | |
73 | |
74 /*! Get a pointer to the T.38 core IFP packet engine associated with a | |
75 termination mode T.38 context. | |
76 \brief Get a pointer to the T.38 core IFP packet engine associated | |
77 with a T.38 context. | |
78 \param s The T.38 context. | |
79 \return A pointer to the T.38 core context, or NULL. | |
80 */ | |
81 SPAN_DECLARE(t38_core_state_t *) t38_terminal_get_t38_core_state(t38_terminal_state_t *s); | |
82 | |
83 /*! Get a pointer to the logging context associated with a T.38 context. | |
84 \brief Get a pointer to the logging context associated with a T.38 context. | |
85 \param s The T.38 context. | |
86 \return A pointer to the logging context, or NULL. | |
87 */ | |
88 SPAN_DECLARE(logging_state_t *) t38_terminal_get_logging_state(t38_terminal_state_t *s); | |
89 | |
90 /*! \brief Initialise a termination mode T.38 context. | |
91 \param s The T.38 context. | |
92 \param calling_party TRUE if the context is for a calling party. FALSE if the | |
93 context is for an answering party. | |
94 \param tx_packet_handler A callback routine to encapsulate and transmit T.38 packets. | |
95 \param tx_packet_user_data An opaque pointer passed to the tx_packet_handler routine. | |
96 \return A pointer to the termination mode T.38 context, or NULL if there was a problem. */ | |
97 SPAN_DECLARE(t38_terminal_state_t *) t38_terminal_init(t38_terminal_state_t *s, | |
98 int calling_party, | |
99 t38_tx_packet_handler_t *tx_packet_handler, | |
100 void *tx_packet_user_data); | |
101 | |
102 /*! Release a termination mode T.38 context. | |
103 \brief Release a T.38 context. | |
104 \param s The T.38 context. | |
105 \return 0 for OK, else -1. */ | |
106 SPAN_DECLARE(int) t38_terminal_release(t38_terminal_state_t *s); | |
107 | |
108 /*! Free a a termination mode T.38 context. | |
109 \brief Free a T.38 context. | |
110 \param s The T.38 context. | |
111 \return 0 for OK, else -1. */ | |
112 SPAN_DECLARE(int) t38_terminal_free(t38_terminal_state_t *s); | |
113 | |
114 #if defined(__cplusplus) | |
115 } | |
116 #endif | |
117 | |
118 #endif | |
119 /*- End of file ------------------------------------------------------------*/ |